diff options
Diffstat (limited to 'src/script/scons.bat')
-rw-r--r-- | src/script/scons.bat | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/script/scons.bat b/src/script/scons.bat index f927bb1..56443c8 100644 --- a/src/script/scons.bat +++ b/src/script/scons.bat @@ -7,10 +7,14 @@ python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, ' @REM no way to set exit status of this script for 9x/Me
goto endscons
:WinNT
-@REM set path=%path%;%~dp0
+setlocal
+@REM ensure the script will be executed with the Python it was installed for
+set path=%~dp0;%~dp0..;%path%
python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-__VERSION__'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-__VERSION__'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %*
-if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endscons
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endsconsnt
if errorlevel 9009 echo you do not have python in your PATH
@REM color 00 causes this script to exit with non-zero exit status
if errorlevel 1 color 00
+:endsconsnt
+endlocal
:endscons
|