win_launch_wingide.bat 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. :: Launches Wing IDE and the O3DE DccScriptingInterface Project Files
  10. :: Status: Prototype
  11. :: Version: 0.0.1
  12. :: Support: Wing Pro 8+
  13. :: Readme.md: https://github.com/o3de/o3de/tree/development/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/IDE/WingIDE/readme.md
  14. :: Notes:
  15. :: - Wing 7.x was previously supported, but it was python2.7 based and we are deprecating support for py2.7
  16. :: - py2.7 deprecation includes apps that are pre-py3
  17. :: - Previous versions may still work, however you will need to configure the env yourself
  18. :: - Try overriding envars and paths in your Env_Dev.bat
  19. :: Set up window
  20. TITLE O3DE DCCsi Launch WingIDE
  21. :: Use obvious color to prevent confusion (Grey with Yellow Text)
  22. COLOR 8E
  23. echo.
  24. echo _____________________________________________________________________
  25. echo.
  26. echo ~ O3DE DCCsi Wing Pro Launch Env ...
  27. echo _____________________________________________________________________
  28. echo.
  29. echo ~ default envas for wing pro env
  30. echo.
  31. :: Store current dir
  32. %~d0
  33. cd %~dp0
  34. PUSHD %~dp0
  35. SETLOCAL ENABLEDELAYEDEXPANSION
  36. :: if the user has set up a custom env call it
  37. IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
  38. :: Constant Vars (Global)
  39. :: global debug (propogates)
  40. IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False)
  41. echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
  42. :: initiates debugger connection
  43. IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False)
  44. echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
  45. :: sets debugger, options: WING, PYCHARM
  46. IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
  47. echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
  48. :: Default level logger will handle
  49. :: CRITICAL:50
  50. :: ERROR:40
  51. :: WARNING:30
  52. :: INFO:20
  53. :: DEBUG:10
  54. :: NOTSET:0
  55. IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20)
  56. echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
  57. CALL %~dp0..\..\Dev\Windows\Env_O3DE_Core.bat
  58. :: add to the PATH here (this is global)
  59. SET PATH=%PATH_O3DE_BIN%;%PATH_O3DE_TECHART_GEMS%;%PATH_DCCSIG%;%PATH%
  60. :: Initialize env
  61. CALL %~dp0..\..\Dev\Windows\Env_O3DE_Python.bat
  62. :: add to the PATH here (this is global)
  63. SET PATH=%O3DE_PYTHONHOME%;%PATH_O3DE_PYTHON_INSTALL%;%DCCSI_PY_IDE%;%PATH%
  64. :: add all python related paths to PYTHONPATH for package imports
  65. SET PYTHONPATH=%PATH_O3DE_TECHART_GEMS%;%PATH_DCCSIG%;%PATH_DCCSI_PYTHON_LIB%;%PATH_O3DE_BUILD%
  66. :: This can now only be added late, in the launcher
  67. :: it conflicts with other Qt apps like Wing Pro 8+
  68. REM :: Initialize env
  69. REM CALL %~dp0..\..\Dev\Windows\Env_O3DE_Qt.bat
  70. REM :: add to the PATH
  71. REM SET PATH=%QTFORPYTHON_PATH%;%PATH%
  72. REM SET PYTHONPATH=%QTFORPYTHON_PATH%;%PYTHONPATH%
  73. REM :: add to the PATH
  74. REM :: SET PATH=%QT_PLUGIN_PATH%;%PATH%
  75. REM SET PYTHONPATH=%QT_PLUGIN_PATH%;%PYTHONPATH%
  76. SET PATH=%PATH_O3DE_BIN%;%PATH%
  77. :: Initialize env
  78. CALL %~dp0..\..\Dev\Windows\Env_DCC_Maya.bat
  79. SET PATH=%DCCSI_PY_MAYA%;%PATH%
  80. CALL %~dp0..\..\Dev\Windows\Env_DCC_Blender.bat
  81. SET PATH=%DCCSI_BLENDER_PY_EXE%;%PATH%
  82. CALL %~dp0..\..\Dev\Windows\Env_DCC_Substance.bat
  83. SET PATH=%DCCSI_SUBSTANCE_PY_EXE%;%PATH%
  84. CALL %~dp0..\..\Dev\Windows\Env_IDE_Wing.bat
  85. SET PATH=%WINGHOME%;%PATH%
  86. :: if the user has set up a custom env call it
  87. :: this ensures any user envars remain intact after initializing other envs
  88. IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
  89. echo.
  90. echo _____________________________________________________________________
  91. echo.
  92. echo ~ WingIDE Version %DCCSI_WING_VERSION_MAJOR%
  93. echo ~ Launching O3DE project: %O3DE_PROJECT%
  94. echo ~ in Wing Pro %DCCSI_WING_VERSION_MAJOR% ...
  95. echo _____________________________________________________________________
  96. echo.
  97. echo.
  98. echo PATH = %PATH%
  99. echo.
  100. echo PYTHONPATH = %PYTHONPATH%
  101. echo.
  102. :: Change to root dir
  103. CD /D %PATH_O3DE_PROJECT%
  104. pause
  105. IF EXIST "%WINGHOME%\bin\wing.exe" (
  106. start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%"
  107. ) ELSE (
  108. Where wing.exe 2> NUL
  109. IF ERRORLEVEL 1 (
  110. echo wing.exe could not be found
  111. pause
  112. ) ELSE (
  113. start "" wing.exe "%WING_PROJ%"
  114. )
  115. )
  116. ::ENDLOCAL
  117. :: Return to starting directory
  118. POPD
  119. :END_OF_FILE