dccsi.cmd 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. :: Set up and run O3DE Python CMD prompt
  10. :: Sets up the DccScriptingInterface_Env,
  11. :: Puts you in the CMD within the dev environment
  12. :: Set up window
  13. TITLE O3DE DCC Scripting Interface Cmd
  14. :: Use obvious color to prevent confusion (Grey with Yellow Text)
  15. COLOR 8E
  16. echo.
  17. echo _____________________________________________________________________
  18. echo.
  19. echo ~ O3DE DCCsi CMD ...
  20. echo _____________________________________________________________________
  21. echo.
  22. %~d0
  23. cd %~dp0
  24. PUSHD %~dp0
  25. SET PATH_DCCSIG_TOOLSDEV_WINDOWS=%CD%\Tools\Dev\Windows
  26. ::SETLOCAL ENABLEDELAYEDEXPANSION
  27. :: if the user has set up a custom env call it
  28. IF EXIST "%PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_Dev.bat" CALL %PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_Dev.bat
  29. :: Initialize env
  30. CALL %PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_O3DE_Core.bat
  31. :: add to the PATH here (this is global)
  32. SET PATH=%PATH_O3DE_BIN%;%PATH_DCCSIG%;%PATH%
  33. CALL %PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_O3DE_Python.bat
  34. :: add to the PYTHONPATH here (this is global)
  35. SET PATH=%PATH_O3DE_PYTHON_INSTALL%;%O3DE_PYTHONHOME%;%PATH%
  36. :: add all python related paths to PYTHONPATH for package imports
  37. SET PYTHONPATH=%PATH_DCCSIG%;%PATH_DCCSI_PYTHON_LIB%;%PATH_O3DE_BIN%;%PYTHONPATH%
  38. CALL %PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_O3DE_Qt.bat
  39. SET PATH=%QT_PLUGIN_PATH%;%QTFORPYTHON_PATH%;%PATH_O3DE_PYTHON_INSTALL%;%O3DE_PYTHONHOME%;%DCCSI_PY_IDE%;%PATH%
  40. SET PYTHONPATH="%QT_PLUGIN_PATH%;%QTFORPYTHON_PATH%;%PATH_DCCSIG%;%PATH_DCCSI_PYTHON_LIB%;%PATH_O3DE_BUILD%;%PYTHONPATH%
  41. :: if the user has set up a custom env call it
  42. IF EXIST "%PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_Dev.bat" CALL %PATH_DCCSIG_TOOLSDEV_WINDOWS%\Env_Dev.bat
  43. echo.
  44. echo _____________________________________________________________________
  45. echo.
  46. echo ~ Starting O3DE DCCsi python CMD
  47. echo _____________________________________________________________________
  48. echo.
  49. echo.
  50. echo PATH = %PATH%
  51. echo.
  52. echo PYTHONPATH = %PYTHONPATH%
  53. echo.
  54. :: Change to root dir
  55. CD /D %PATH_O3DE_PROJECT%
  56. :: Create command prompt with environment
  57. CALL %windir%\system32\cmd.exe
  58. ENDLOCAL
  59. :: Return to starting directory
  60. POPD
  61. :END_OF_FILE