main.cpp 799 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * main.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "main.h"
  11. #include "mainwindow_moc.h"
  12. #include <QApplication>
  13. // Conan workaround https://github.com/conan-io/conan-center-index/issues/13332
  14. #ifdef VCMI_IOS
  15. #if __has_include("QIOSIntegrationPlugin.h")
  16. #include "QIOSIntegrationPlugin.h"
  17. #endif
  18. #endif
  19. int main(int argc, char * argv[])
  20. {
  21. int result;
  22. #ifdef VCMI_IOS
  23. __argc = argc;
  24. __argv = argv;
  25. {
  26. #endif
  27. QApplication vcmilauncher(argc, argv);
  28. MainWindow mainWindow;
  29. mainWindow.show();
  30. result = vcmilauncher.exec();
  31. #ifdef VCMI_IOS
  32. }
  33. if (result == 0)
  34. launchGame(__argc, __argv);
  35. #endif
  36. return result;
  37. }