2013-09-06 20:45:07 +03:00
|
|
|
:: Find python from an explicit location relative to the Emscripten SDK.
|
2018-02-26 19:29:27 +02:00
|
|
|
@IF EXIST "%~dp0python\2.7.13.1_64bit\python-2.7.13.amd64\python.exe" (
|
|
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.13.1_64bit\python-2.7.13.amd64\python.exe"
|
|
|
|
|
@GOTO end
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@IF EXIST "%~dp0python\2.7.13.1_32bit\python-2.7.13\python.exe" (
|
|
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.13.1_32bit\python-2.7.13\python.exe"
|
|
|
|
|
@GOTO end
|
|
|
|
|
)
|
|
|
|
|
|
2013-11-19 20:53:03 +02:00
|
|
|
@IF EXIST "%~dp0python\2.7.5.3_64bit\python.exe" (
|
2013-11-20 14:05:09 +02:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.3_64bit\python.exe"
|
2013-11-19 20:53:03 +02:00
|
|
|
@GOTO end
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@IF EXIST "%~dp0python\2.7.5.3_32bit\python.exe" (
|
2013-11-20 14:05:09 +02:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.3_32bit\python.exe"
|
2013-11-19 20:53:03 +02:00
|
|
|
@GOTO end
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@IF EXIST "%~dp0python\2.7.5_64bit\python.exe" (
|
2013-11-20 14:05:09 +02:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5_64bit\python.exe"
|
2013-11-19 20:53:03 +02:00
|
|
|
@GOTO end
|
|
|
|
|
)
|
|
|
|
|
|
2013-09-11 21:30:21 +03:00
|
|
|
@IF EXIST "%~dp0python\2.7.5.1_32bit\python.exe" (
|
2013-11-20 14:05:09 +02:00
|
|
|
@SET EMSDK_PY="%~dp0python\2.7.5.1_32bit\python.exe"
|
2013-09-11 21:30:21 +03:00
|
|
|
@GOTO end
|
2013-09-06 20:45:07 +03:00
|
|
|
)
|
|
|
|
|
|
2017-10-20 14:03:31 +09:00
|
|
|
:: As a last resort, access from PATH.
|
2013-11-19 20:53:03 +02:00
|
|
|
@SET EMSDK_PY=python
|
2013-09-06 20:45:07 +03:00
|
|
|
|
|
|
|
|
:end
|
2019-08-27 14:02:50 -07:00
|
|
|
@call %EMSDK_PY% "%~dp0\emsdk.py" %*
|
2013-11-19 20:53:03 +02:00
|
|
|
|
|
|
|
|
@set EMSDK_PY=
|
2014-04-24 13:10:04 +03: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
|
|
|
|
|
)
|