o3de.bat 816 B

12345678910111213141516171819202122232425262728293031323334
  1. @ECHO OFF
  2. REM
  3. REM Copyright (c) Contributors to the Open 3D Engine Project.
  4. REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. REM
  6. REM SPDX-License-Identifier: Apache-2.0 OR MIT
  7. REM
  8. REM
  9. pushd %~dp0%
  10. CD %~dp0..
  11. SET "BASE_PATH=%CD%"
  12. popd
  13. SET "PYTHON_DIRECTORY=%BASE_PATH%\python"
  14. IF EXIST "%PYTHON_DIRECTORY%" GOTO pythonPathAvailable
  15. GOTO pythonDirNotFound
  16. :pythonPathAvailable
  17. SET PYTHON_EXECUTABLE=%PYTHON_DIRECTORY%\python.cmd
  18. IF NOT EXIST "%PYTHON_EXECUTABLE%" GOTO pythonExeNotFound
  19. CALL "%PYTHON_EXECUTABLE%" "%BASE_PATH%\scripts\o3de.py" %*
  20. GOTO end
  21. :pythonDirNotFound
  22. ECHO Python directory not found: %PYTHON_DIRECTORY%
  23. GOTO fail
  24. :pythonExeNotFound
  25. ECHO Python executable not found: %PYTHON_EXECUTABLE%
  26. GOTO fail
  27. :fail
  28. EXIT /b 1
  29. :end
  30. EXIT /b %ERRORLEVEL%