forked from zackwintermdb/ATools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (30 loc) · 850 Bytes
/
Copy pathmain.cpp
File metadata and controls
39 lines (30 loc) · 850 Bytes
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
///////////
// This file is a part of the ATools project
// Some parts of code are the property of Microsoft, Qt or Aeonsoft
// The rest is released without license and without any warranty
///////////
#include "stdafx.h"
#include "MainFrame.h"
int main(int argc, char *argv[])
{
const string workingDir = QFileInfo(string::fromLocal8Bit(argv[0])).absolutePath();
QCoreApplication::addLibraryPath(workingDir % "/Plugins/");
QDir::setCurrent(workingDir);
InstallMsgHandler();
QApplication app(argc, argv);
CMainFrame* mainFrame = new CMainFrame();
int result = -1;
if (mainFrame->Initialize())
{
mainFrame->show();
if (argc >= 2)
{
mainFrame->OpenFile(string::fromLocal8Bit(argv[1]));
if (argc >= 3)
mainFrame->SetTextureEx(string(argv[2]).toInt());
}
result = app.exec();
}
Delete(mainFrame);
return result;
}