main.cpp 804 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzQtComponents/Utilities/QtPluginPaths.h>
  9. #include <Application.h>
  10. int main(int argc, char* argv[])
  11. {
  12. const AZ::Debug::Trace tracer;
  13. int runSuccess = 0;
  14. // Call before using any Qt, or the app may not be able to locate Qt libs
  15. AzQtComponents::PrepareQtPaths();
  16. O3DE::ProjectManager::Application application(&argc, &argv);
  17. if (!application.Init())
  18. {
  19. AZ_Error("ProjectManager", false, "Failed to initialize");
  20. runSuccess = 1;
  21. }
  22. else
  23. {
  24. runSuccess = application.Run() ? 0 : 1;
  25. }
  26. return runSuccess;
  27. }