2017-07-13 10:26:03 +02:00
|
|
|
/*
|
|
|
|
* main.cpp, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2022-08-05 13:32:29 +02:00
|
|
|
#include "main.h"
|
2022-08-07 07:58:04 +02:00
|
|
|
#include "mainwindow_moc.h"
|
|
|
|
|
|
|
|
#include <QApplication>
|
2013-08-22 17:22:49 +03:00
|
|
|
|
2022-10-13 12:04:32 +02:00
|
|
|
// Conan workaround https://github.com/conan-io/conan-center-index/issues/13332
|
|
|
|
#ifdef VCMI_IOS
|
|
|
|
#if __has_include("QIOSIntegrationPlugin.h")
|
|
|
|
#include "QIOSIntegrationPlugin.h"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-08-09 00:09:29 +02:00
|
|
|
int main(int argc, char * argv[])
|
2013-08-22 17:22:49 +03:00
|
|
|
{
|
2022-08-07 07:58:04 +02:00
|
|
|
int result;
|
|
|
|
#ifdef VCMI_IOS
|
|
|
|
{
|
2022-11-07 11:44:58 +02:00
|
|
|
__argc = argc;
|
|
|
|
__argv = argv;
|
2022-08-07 07:58:04 +02:00
|
|
|
#endif
|
2017-01-17 13:17:37 +02:00
|
|
|
QApplication vcmilauncher(argc, argv);
|
2017-08-24 03:52:02 +02:00
|
|
|
MainWindow mainWindow;
|
2017-01-17 13:17:37 +02:00
|
|
|
mainWindow.show();
|
2022-08-07 07:58:04 +02:00
|
|
|
result = vcmilauncher.exec();
|
|
|
|
#ifdef VCMI_IOS
|
|
|
|
}
|
|
|
|
if (result == 0)
|
2022-11-07 11:44:58 +02:00
|
|
|
launchGame(__argc, __argv);
|
2022-08-05 13:32:29 +02:00
|
|
|
#endif
|
2022-08-07 07:58:04 +02:00
|
|
|
return result;
|
2013-08-22 17:22:49 +03:00
|
|
|
}
|