@@ -9,6 +9,17 @@ SET VsWherePath="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswher
99
1010REM ===========================================================================
1111
12+ SET " PlatformArg = "
13+ SET " ConfigArg = "
14+
15+ IF NOT " %PLATFORM% " == " " (
16+ SET " PlatformArg = PLATFORM=%PLATFORM% "
17+ )
18+
19+ IF NOT " %CONFIG% " == " " (
20+ SET " ConfigArg = CONFIG=%CONFIG% "
21+ )
22+
1223SET vsversion = %1
1324IF " %vsversion% " == " " (
1425 CALL :BootstrapLatest
@@ -67,7 +78,7 @@ IF NOT EXIST "%VsPath%vsdevcmd.bat" (
6778 EXIT /B 2
6879)
6980
70- CALL " %VsPath% vsdevcmd.bat" && nmake MSDEV=" %~1 " -f Bootstrap.mak windows
81+ CALL " %VsPath% vsdevcmd.bat" && nmake MSDEV=" %~1 " %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
7182EXIT /B %ERRORLEVEL%
7283
7384REM :LegacyVisualBootstrap
@@ -94,18 +105,18 @@ SET VsWhereCmdLine="!VsWherePath! -nologo -latest -version [%VsVersionMin%,%VsVe
94105
95106FOR /F " usebackq delims=" %%i in (`!VsWhereCmdLine! `) DO (
96107
97- IF EXIST " %%i \VC\Auxiliary\Build\vcvars32 .bat" (
98- CALL " %%i \VC\Auxiliary\Build\vcvars32 .bat" && nmake MSDEV=" %PremakeVsVersion% " -f Bootstrap.mak windows
108+ IF EXIST " %%i \VC\Auxiliary\Build\vcvars64 .bat" (
109+ CALL " %%i \VC\Auxiliary\Build\vcvars64 .bat" && nmake MSDEV=" %PremakeVsVersion% " %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
99110 EXIT /B %ERRORLEVEL%
100111 ) ELSE (
101- IF EXIST " %%i \VC\Auxiliary\Build\vcvars64 .bat" (
102- CALL " %%i \VC\Auxiliary\Build\vcvars64 .bat" && nmake MSDEV=" %PremakeVsVersion% " -f Bootstrap.mak windows
112+ IF EXIST " %%i \VC\Auxiliary\Build\vcvars32 .bat" (
113+ CALL " %%i \VC\Auxiliary\Build\vcvars32 .bat" && nmake MSDEV=" %PremakeVsVersion% " %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
103114 EXIT /B %ERRORLEVEL%
104115 )
105116 )
106117)
107118
108- ECHO Could not find vcvars32 .bat or vcvars64 .bat to setup Visual Studio environment
119+ ECHO Could not find vcvars64 .bat or vcvars32 .bat to setup Visual Studio environment
109120EXIT /B 2
110121
111122REM :VsWhereVisualBootstrap
0 commit comments