@echo off\r
-rem A batch program to build or rebuild a particular configuration.\r
+rem A batch program to build or rebuild a particular configuration,\r
rem just for convenience.\r
\r
+rem Arguments:\r
+rem -c Set the configuration (default: Release)\r
+rem -p Set the platform (x64 or Win32, default: Win32)\r
+rem -r Target Rebuild instead of Build\r
+rem -t Set the target manually (Build, Rebuild, or Clean)\r
+rem -d Set the configuration to Debug\r
+rem -e Pull in external libraries using get_externals.bat\r
+rem -m Enable parallel build\r
+rem -M Disable parallel build (disabled by default)\r
+rem -v Increased output messages\r
+rem -k Attempt to kill any running Pythons before building\r
+\r
setlocal\r
set platf=Win32\r
+set vs_platf=x86\r
set conf=Release\r
-set target=build\r
+set target=Build\r
set dir=%~dp0\r
+set parallel=\r
+set verbose=/nologo /v:m\r
+set kill=\r
+set build_tkinter=\r
\r
:CheckOpts\r
-if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts\r
-if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
-if "%1"=="-r" (set target=rebuild) & shift & goto CheckOpts\r
-if "%1"=="-d" (set conf=Debug) & shift & goto CheckOpts\r
-\r
-set cmd=msbuild /p:useenv=true %dir%pcbuild.sln /t:%target% /p:Configuration=%conf% /p:Platform=%platf%\r
-echo %cmd%\r
-%cmd%\r
+if '%1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts\r
+if '%1'=='-p' (set platf=%2) & shift & shift & goto CheckOpts\r
+if '%1'=='-r' (set target=Rebuild) & shift & goto CheckOpts\r
+if '%1'=='-t' (set target=%2) & shift & shift & goto CheckOpts\r
+if '%1'=='-d' (set conf=Debug) & shift & goto CheckOpts\r
+if '%1'=='-e' call "%dir%get_externals.bat" & (set build_tkinter=true) & shift & goto CheckOpts\r
+if '%1'=='-m' (set parallel=/m) & shift & goto CheckOpts\r
+if '%1'=='-M' (set parallel=) & shift & goto CheckOpts\r
+if '%1'=='-v' (set verbose=/v:n) & shift & goto CheckOpts\r
+if '%1'=='-k' (set kill=true) & shift & goto CheckOpts\r
+\r
+if '%conf%'=='Debug' (set dbg_ext=_d) else (set dbg_ext=)\r
+if '%platf%'=='x64' (\r
+ set vs_platf=x86_amd64\r
+ set builddir=%dir%amd64\\r
+) else (\r
+ set builddir=%dir%\r
+)\r
+\r
+rem Setup the environment\r
+call "%dir%env.bat" %vs_platf%\r
+\r
+if '%kill%'=='true' (\r
+ msbuild "%dir%kill_python.vcxproj" %verbose% /p:Configuration=%conf% /p:Platform=%platf% && "%builddir%kill_python%dbg_ext%.exe"\r
+)\r
+\r
+set externals_dir=%dir%..\externals\r
+if '%build_tkinter%'=='true' (\r
+ if '%platf%'=='x64' (\r
+ set tcltkdir=%externals_dir%\tcltk64\r
+ set machine=AMD64\r
+ ) else (\r
+ set tcltkdir=%externals_dir%\tcltk\r
+ set machine=IX86\r
+ )\r
+ if '%conf%'=='Debug' (\r
+ set tcl_dbg_ext=g\r
+ set debug_flag=1\r
+ set options=symbols\r
+ ) else (\r
+ set tcl_dbg_ext=\r
+ set debug_flag=0\r
+ set options=\r
+ )\r
+ set tcldir=%externals_dir%\tcl-8.6.1.0\r
+ set tkdir=%externals_dir%\tk-8.6.1.0\r
+ set tixdir=%externals_dir%\tix-8.4.3.4\r
+)\r
+if '%build_tkinter%'=='true' (\r
+ if not exist "%tcltkdir%\bin\tcl86t%tcl_dbg_ext%.dll" (\r
+ @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install\r
+ pushd "%tcldir%\win"\r
+ nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" clean all\r
+ nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" install-binaries install-libraries\r
+ popd\r
+ )\r
+\r
+ if not exist "%tcltkdir%\bin\tk86t%tcl_dbg_ext%.dll" (\r
+ pushd "%tkdir%\win"\r
+ nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" clean\r
+ nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" all\r
+ nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" install-binaries install-libraries\r
+ popd\r
+ )\r
+\r
+ if not exist "%tcltkdir%\lib\tix8.4.3\tix84%tcl_dbg_ext%.dll" (\r
+ pushd "%tixdir%\win"\r
+ nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" clean\r
+ nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" all\r
+ nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" install\r
+ popd\r
+ )\r
+)\r
+\r
+rem Call on MSBuild to do the work, echo the command.\r
+rem Passing %1-9 is not the preferred option, but argument parsing in\r
+rem batch is, shall we say, "lackluster"\r
+echo on\r
+msbuild "%dir%pcbuild.sln" /t:%target% %parallel% %verbose% /p:Configuration=%conf% /p:Platform=%platf% %1 %2 %3 %4 %5 %6 %7 %8 %9\r
@echo off\r
-set VS10=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\r
-IF EXIST "%VS10%" GOTO ok\r
-set VS10=%ProgramFiles%\Microsoft Visual Studio 10.0\r
-:ok\r
-\r
echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64\r
echo.\r
-call "%VS10%\VC\vcvarsall.bat" %1\r
+call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" %*\r
--- /dev/null
+@echo off\r
+setlocal\r
+rem Simple script to fetch source for external libraries\r
+\r
+if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"\r
+pushd "%~dp0..\externals"\r
+\r
+if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
+\r
+rem Optionally clean up first. Be warned that this can be very destructive!\r
+if not "%1"=="" (\r
+ for %%c in (-c --clean --clean-only) do (\r
+ if "%1"=="%%c" goto clean\r
+ )\r
+ goto usage\r
+)\r
+goto fetch\r
+\r
+:clean\r
+echo.Cleaning up external libraries.\r
+for /D %%d in (\r
+ bzip2-*\r
+ db-*\r
+ nasm-*\r
+ openssl-*\r
+ tcl-*\r
+ tcltk*\r
+ tk-*\r
+ tix-*\r
+ sqlite-*\r
+ xz-*\r
+ ) do (\r
+ echo.Removing %%d\r
+ rmdir /s /q %%d\r
+)\r
+if "%1"=="--clean-only" (\r
+ goto end\r
+)\r
+\r
+:fetch\r
+rem Fetch current versions\r
+\r
+svn --version > nul 2>&1\r
+if ERRORLEVEL 9009 (\r
+ echo.svn.exe must be on your PATH.\r
+ echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the\r
+ echo.command line tools option.\r
+ popd\r
+ exit /b 1\r
+)\r
+\r
+echo.Fetching external libraries...\r
+\r
+for %%e in (\r
+ bzip2-1.0.6\r
+ nasm-2.11.06\r
+ openssl-1.0.2a\r
+ tcl-8.6.1.0\r
+ tk-8.6.1.0\r
+ tix-8.4.3.4\r
+ sqlite-3.8.3.1\r
+ xz-5.0.5\r
+ ) do (\r
+ if exist %%e (\r
+ echo.%%e already exists, skipping.\r
+ ) else (\r
+ echo.Fetching %%e...\r
+ svn export %SVNROOT%%%e\r
+ )\r
+)\r
+\r
+goto end\r
+\r
+:usage\r
+echo.invalid argument: %1\r
+echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]\r
+echo.\r
+echo.Pull all sources necessary for compiling optional extension modules\r
+echo.that rely on external libraries. Requires svn.exe to be on your PATH\r
+echo.and pulls sources from %SVNROOT%.\r
+echo.\r
+echo.Use the -c or --clean option to clean up all external library sources\r
+echo.before pulling in the current versions.\r
+echo.\r
+echo.Use the --clean-only option to do the same cleaning, without pulling in\r
+echo.anything new.\r
+echo.\r
+echo.Only the first argument is checked, all others are ignored.\r
+echo.\r
+echo.**WARNING**: the cleaning options unconditionally remove any directory\r
+echo.that is a child of\r
+echo. %CD%\r
+echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,\r
+echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential\r
+echo.to be very destructive if you are not aware of what it is doing. Use with\r
+echo.caution!\r
+popd\r
+exit /b -1\r
+\r
+\r
+:end\r
+echo Finished.\r
+popd\r
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)\r
rem from the 'amd64' dir instead of the 32-bit build in this dir.\r
rem All leading instances of these switches are shifted off, and\r
-rem whatever remains is passed to regrtest.py. For example,\r
+rem whatever remains (up to 9 arguments) is passed to regrtest.py.\r
+rem For example,\r
rem rt -O -d -x test_thread\r
rem runs\r
rem python_d -O ../lib/test/regrtest.py -x test_thread\r
\r
setlocal\r
\r
-set prefix=.\\r
+set pcbuild=%~dp0\r
+set prefix=%pcbuild%\r
set suffix=\r
set qmode=\r
set dashO=\r
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts\r
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts\r
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts\r
-if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts\r
+if "%1"=="-x64" (set prefix=%prefix%amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts\r
\r
-PATH %PATH%;%~dp0..\externals\%tcltk%\bin\r
-set exe=%prefix%\python%suffix%\r
-set cmd=%exe% %dashO% -Wd -E -bb ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+PATH %PATH%;%pcbuild%..\externals\%tcltk%\bin\r
+set exe="%prefix%\python%suffix%"\r
+set cmd=%exe% %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9\r
if defined qmode goto Qmode\r
\r
echo Deleting .pyc/.pyo files ...\r
-%exe% rmpyc.py\r
+%exe% "%pcbuild%\rmpyc.py"\r
\r
echo on\r
%cmd%\r
+++ /dev/null
-Comments on building tcl/tk for AMD64 with the MS SDK compiler
-==============================================================
-
-I did have to build tcl/tk manually.
-
-First, I had to build the nmakehlp.exe helper utility manually by executing
- cl nmakehlp.c /link bufferoverflowU.lib
-in both the tcl8.4.12\win and tk8.4.12\win directories.
-
-Second, the AMD64 compiler refuses to compile the file
-tcl8.4.12\generic\tclExecute.c because it insists on using intrinsics
-for the 'ceil' and 'floor' functions:
-
- ..\generic\tclExecute.c(394) : error C2099: initializer is not a constant
- ..\generic\tclExecute.c(398) : error C2099: initializer is not a constant
-
-I did comment out these lines; an alternative would have been to use
-the /Oi- compiler flag to disable the intrinsic functions.
-The commands then used were these:
-
- svn export http://svn.python.org/projects/external/tcl8.4.12
- cd tcl8.4.12\win
- REM
- echo patch the tcl8.4.12\generic\tclExecute.c file
- pause
- REM
- cl nmakehlp.c /link bufferoverflowU.lib
- nmake -f makefile.vc MACHINE=AMD64
- nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
- cd ..\..
- svn export http://svn.python.org/projects/external/tk8.4.12
- cd tk8.4.12\win
- cl nmakehlp.c /link bufferoverflowU.lib
- nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 MACHINE=AMD64
- nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
- cd ..\..
@rem Used by the buildbot "compile" step.\r
-cmd /c Tools\buildbot\external-amd64.bat\r
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-cmd /c Tools\buildbot\clean-amd64.bat\r
-\r
-msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64\r
+call "%~dp0build.bat" -p x64 %*\r
@rem Used by the buildbot "compile" step.\r
-cmd /c Tools\buildbot\external.bat\r
-call "%VS100COMNTOOLS%vsvars32.bat"\r
-cmd /c Tools\buildbot\clean.bat\r
\r
-msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32\r
+@rem Clean up\r
+call "%~dp0clean.bat" %*\r
\r
+@rem If you need the buildbots to start fresh (such as when upgrading to\r
+@rem a new version of an external library, especially Tcl/Tk):\r
+@rem 1) uncomment the following line:\r
+\r
+@rem call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only\r
+\r
+@rem 2) commit and push\r
+@rem 3) wait for all Windows bots to start a build with that changeset\r
+@rem 4) re-comment, commit and push again\r
+\r
+@rem Do the build\r
+call "%~dp0..\..\PCbuild\build.bat" -e -d -k -v %*\r
@rem Used by the buildbot "clean" step.\r
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-@echo Deleting .pyc/.pyo files ...\r
-del /s Lib\*.pyc Lib\*.pyo\r
-@echo Deleting test leftovers ...\r
-rmdir /s /q build\r
-cd PCbuild\r
-msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64\r
-msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64\r
-cd ..\r
+call "%~dp0clean.bat" -p x64 %*\r
-@rem Used by the buildbot "clean" step.\r
-call "%VS100COMNTOOLS%vsvars32.bat"\r
-@echo Deleting test leftovers ...\r
-rmdir /s /q build\r
-cd PCbuild\r
-msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x86\r
-msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x86\r
-cd ..\r
+@echo off\r
+rem Used by the buildbot "clean" step.\r
+\r
+setlocal\r
+set root=%~dp0..\..\r
+set pcbuild=%root%\PCbuild\r
+\r
+echo Deleting build\r
+call "%pcbuild%\build.bat" -t Clean -k %*\r
+call "%pcbuild%\build.bat" -t Clean -k -d %*\r
+\r
+echo Deleting .pyc/.pyo files ...\r
+del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"\r
+\r
+echo Deleting test leftovers ...\r
+rmdir /s /q "%root%\build"\r
-@rem Fetches (and builds if necessary) external dependencies\r
-\r
-@rem Assume we start inside the Python source directory\r
-call "Tools\buildbot\external-common.bat"\r
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-\r
-if not exist tcltk64\bin\tcl86tg.dll (\r
- cd tcl-8.6.1.0\win\r
- nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean core shell dlls\r
- nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install-binaries install-libraries\r
- cd ..\..\r
-)\r
-\r
-if not exist tcltk64\bin\tk86tg.dll (\r
- cd tk-8.6.1.0\win\r
- nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 clean\r
- nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 all\r
- nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries\r
- cd ..\..\r
-)\r
-\r
-if not exist tcltk64\lib\tix8.4.3\tix84g.dll (\r
- cd tix-8.4.3.4\win\r
- nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 clean\r
- nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 all\r
- nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 install\r
- cd ..\..\r
-)\r
+@echo Please use PCbuild\get_externals.bat instead.\r
+@"%~dp0..\..\PCbuild\get_externals.bat" %*\r
+++ /dev/null
-@rem Common file shared between external.bat and external-amd64.bat. Responsible for\r
-@rem fetching external components into the root\.. buildbot directories.\r
-\r
-if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
-\r
-if not exist externals mkdir externals\r
-cd externals\r
-@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment\r
-@rem the following, check it in, then check it out, comment it out, then check it back in.\r
-@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6\r
-@rem if exist tcltk rd /s/q tcltk\r
-@rem if exist tcltk64 rd /s/q tcltk64\r
-@rem if exist tcl-8.6.1.0 rd /s/q tcl-8.6.1.0\r
-@rem if exist tk-8.6.1.0 rd /s/q tk-8.6.1.0\r
-@rem if exist tix-8.4.3.4 rd /s/q tix-8.4.3.4\r
-@rem if exist db-4.4.20 rd /s/q db-4.4.20\r
-@rem if exist openssl-1.0.2a rd /s/q openssl-1.0.2a\r
-@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12\r
-\r
-@rem bzip\r
-if not exist bzip2-1.0.6 (\r
- rd /s/q bzip2-1.0.5\r
- svn export %SVNROOT%bzip2-1.0.6\r
-)\r
-\r
-@rem NASM, for OpenSSL build\r
-@rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06\r
-if not exist nasm-2.11.06 svn export %SVNROOT%nasm-2.11.06\r
-\r
-@rem OpenSSL\r
-if not exist openssl-1.0.2a (\r
- rd /s/q openssl-1.0.1l\r
- svn export %SVNROOT%openssl-1.0.2a\r
-)\r
-\r
-@rem tcl/tk\r
-if not exist tcl-8.6.1.0 (\r
- rd /s/q tcltk tcltk64 tcl-8.5.11.0 tk-8.5.11.0\r
- svn export %SVNROOT%tcl-8.6.1.0\r
-)\r
-if not exist tk-8.6.1.0 svn export %SVNROOT%tk-8.6.1.0\r
-if not exist tix-8.4.3.4 svn export %SVNROOT%tix-8.4.3.4\r
-\r
-@rem sqlite3\r
-if not exist sqlite-3.8.3.1 (\r
- rd /s/q sqlite-source-3.8.1\r
- svn export %SVNROOT%sqlite-3.8.3.1\r
-)\r
-\r
-@rem lzma\r
-if not exist xz-5.0.5 (\r
- rd /s/q xz-5.0.3\r
- svn export %SVNROOT%xz-5.0.5\r
-)\r
-@rem Fetches (and builds if necessary) external dependencies\r
-\r
-@rem Assume we start inside the Python source directory\r
-call "Tools\buildbot\external-common.bat"\r
-call "%VS100COMNTOOLS%\vsvars32.bat"\r
-\r
-if not exist tcltk\bin\tcl86tg.dll (\r
- @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install\r
- cd tcl-8.6.1.0\win\r
- nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk clean core shell dlls\r
- nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk install-binaries install-libraries\r
- cd ..\..\r
-)\r
-\r
-if not exist tcltk\bin\tk86tg.dll (\r
- cd tk-8.6.1.0\win\r
- nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 clean\r
- nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 all\r
- nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries\r
- cd ..\..\r
-)\r
-\r
-if not exist tcltk\lib\tix8.4.3\tix84g.dll (\r
- cd tix-8.4.3.4\win\r
- nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk clean\r
- nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk all\r
- nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk install\r
- cd ..\..\r
-)\r
+@echo Please use PCbuild\get_externals.bat instead.\r
+@"%~dp0..\..\PCbuild\get_externals.bat" %*\r
@rem Used by the buildbot "test" step.\r
-cd PCbuild\r
-call rt.bat -d -q -x64 -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+call "%~dp0test.bat" -x64 %*\r
@rem Used by the buildbot "test" step.\r
-cd PCbuild\r
-call rt.bat -d -q -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+@setlocal\r
+\r
+@set here=%~dp0\r
+@set rt_opts=-q -d\r
+\r
+:CheckOpts\r
+@if '%1'=='-x64' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+@if '%1'=='-d' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+@if '%1'=='-O' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+@if '%1'=='-q' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+@if '%1'=='+d' (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts\r
+@if '%1'=='+q' (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts\r
+\r
+call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9\r