-
Notifications
You must be signed in to change notification settings - Fork 553
Expand file tree
/
Copy pathentrygui.cpp
More file actions
42 lines (33 loc) · 1 KB
/
entrygui.cpp
File metadata and controls
42 lines (33 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//-----------------------------------------------------------------------------
// Our main() function for the graphical interface.
//
// Copyright 2018 <[email protected]>
//-----------------------------------------------------------------------------
#include "solvespace.h"
#if defined(WIN32)
# include <windows.h>
#endif
using namespace SolveSpace;
int main(int argc, char** argv) {
std::vector<std::string> args = Platform::InitGui(argc, argv);
Platform::Open3DConnexion();
SS.Init();
if(args.size() >= 2) {
if(args.size() > 2) {
dbp("Only the first file passed on command line will be opened.");
}
SS.Load(Platform::Path::From(args.back()));
}
Platform::RunGui();
Platform::Close3DConnexion();
SS.Clear();
SK.Clear();
Platform::ClearGui();
return 0;
}
#if defined(WIN32)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, INT nCmdShow) {
return main(0, NULL);
}
#endif