Project_Env.bat 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. :: Sets up environment for O3DE DCC tools and code access
  10. :: Store current dir
  11. %~d0
  12. cd %~dp0
  13. PUSHD %~dp0
  14. :: Put you project env vars and overrides in this file
  15. :: chanhe the relative path up to dev
  16. set ABS_PATH=%~dp0
  17. :: project name as a str tag
  18. IF "%O3DE_PROJECT_NAME%"=="" (
  19. for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set O3DE_PROJECT_NAME=%%~nxJ
  20. )
  21. echo.
  22. echo _____________________________________________________________________
  23. echo.
  24. echo ~ Setting up O3DE DSI %O3DE_PROJECT_NAME% Environment ...
  25. echo _____________________________________________________________________
  26. echo.
  27. echo O3DE_PROJECT_NAME = %O3DE_PROJECT_NAME%
  28. :: if the user has set up a custom env call it
  29. :: this should allow the user to locally
  30. :: set env hooks like O3DE_DEV or O3DE_PROJECT
  31. IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat
  32. echo O3DE_DEV = %O3DE_DEV%
  33. :: Override the default maya version
  34. IF "%MAYA_VERSION%"=="" (set MAYA_VERSION=2020)
  35. echo MAYA_VERSION = %MAYA_VERSION%
  36. :: O3DE_PROJECT is ideally treated as a full path in the env launchers
  37. :: do to changes in o3de, external engine/project/gem folder structures, etc.
  38. IF "%O3DE_PROJECT%"=="" (
  39. for %%i in ("%~dp0..") do set "O3DE_PROJECT=%%~fi"
  40. )
  41. echo O3DE_PROJECT = %O3DE_PROJECT%
  42. :: this is here for archaic reasons, WILL DEPRECATE
  43. IF "%O3DE_PROJECT_PATH%"=="" (set O3DE_PROJECT_PATH=%O3DE_PROJECT%)
  44. echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH%
  45. :: Change to root Lumberyard dev dir
  46. :: You must set this in a User_Env.bat to match youe engine repo location!
  47. IF "%O3DE_DEV%"=="" (set O3DE_DEV=C:\Depot\o3de-engine)
  48. echo O3DE_DEV = %O3DE_DEV%
  49. CALL %O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Tools\Dev\Windows\Env_Maya.bat
  50. :: Constant Vars (Global)
  51. SET DCCSI_GDEBUG=0
  52. echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
  53. SET DCCSI_DEV_MODE=0
  54. echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
  55. SET DCCSI_GDEBUGGER=WING
  56. echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
  57. :: Restore original directory
  58. popd
  59. :: Change to root dir
  60. CD /D %ABS_PATH%
  61. GOTO END_OF_FILE
  62. :: Return to starting directory
  63. POPD
  64. :END_OF_FILE