2013-11-19 22:53:03 +04:00
|
|
|
@SET PREVPATH=%PATH%
|
|
|
|
|
2013-09-06 21:45:07 +04:00
|
|
|
:: Find python from an explicit location relative to the Emscripten SDK.
|
2013-11-19 22:53:03 +04:00
|
|
|
@IF EXIST "%~dp0python\2.7.5.3_64bit\python.exe" (
|
2013-11-20 16:05:09 +04:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.3_64bit\python.exe"
|
2013-11-19 22:53:03 +04:00
|
|
|
@GOTO end
|
|
|
|
)
|
|
|
|
|
|
|
|
@IF EXIST "%~dp0python\2.7.5.3_32bit\python.exe" (
|
2013-11-20 16:05:09 +04:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.3_32bit\python.exe"
|
2013-11-19 22:53:03 +04:00
|
|
|
@GOTO end
|
|
|
|
)
|
|
|
|
|
|
|
|
@IF EXIST "%~dp0python\2.7.5_64bit\python.exe" (
|
2013-11-20 16:05:09 +04:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5_64bit\python.exe"
|
2013-11-19 22:53:03 +04:00
|
|
|
@GOTO end
|
|
|
|
)
|
|
|
|
|
2013-09-11 22:30:21 +04:00
|
|
|
@IF EXIST "%~dp0python\2.7.5.1_32bit\python.exe" (
|
2013-11-20 16:05:09 +04:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.1_32bit\python.exe"
|
2013-09-11 22:30:21 +04:00
|
|
|
@GOTO end
|
2013-09-06 21:45:07 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
:: As last resort, access from PATH.
|
2013-11-19 22:53:03 +04:00
|
|
|
@SET EMSDK_PY=python
|
2013-09-06 21:45:07 +04:00
|
|
|
|
|
|
|
:end
|
2013-11-19 22:53:03 +04:00
|
|
|
@call %EMSDK_PY% "%~dp0\emsdk" %*
|
|
|
|
|
|
|
|
@set EMSDK_PY=
|
|
|
|
@set PATH=%PREVPATH%
|
|
|
|
@set PREVPATH=
|
2014-04-24 14:10:04 +04:00
|
|
|
|
|
|
|
:: python is not able to set environment variables to the parent calling process, so
|
|
|
|
:: therefore have it craft a .bat file, which we invoke after finishing python execution,
|
|
|
|
:: to set up the environment variables
|
|
|
|
@IF EXIST emsdk_set_env.bat (
|
|
|
|
@CALL emsdk_set_env.bat > NUL
|
|
|
|
@DEL /F /Q emsdk_set_env.bat
|
|
|
|
)
|