Skip to content

Commit e07c86e

Browse files
committed
build,win: try next MSVS version on failure
Try the next version of Microsoft Visual Studio when vcvarsall.bat fails to set VCINSTALLDIR. PR-URL: #2843 Reviewed-By: rvagg - Rod Vagg <[email protected]> Reviewed-By: orangemocha - Alexis Campailla <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
1 parent 8887666 commit e07c86e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vcbuild.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ if "%VCVARS_VER%" NEQ "140" (
125125
call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat"
126126
SET VCVARS_VER=140
127127
)
128-
if not defined VCINSTALLDIR goto msbuild-not-found
128+
if not defined VCINSTALLDIR goto vc-set-2013
129129
set GYP_MSVS_VERSION=2015
130130
set PLATFORM_TOOLSET=v140
131131
goto msbuild-found
@@ -148,7 +148,7 @@ if "%VCVARS_VER%" NEQ "120" (
148148
call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat"
149149
SET VCVARS_VER=120
150150
)
151-
if not defined VCINSTALLDIR goto msbuild-not-found
151+
if not defined VCINSTALLDIR goto vc-set-2012
152152
set GYP_MSVS_VERSION=2013
153153
set PLATFORM_TOOLSET=v120
154154
goto msbuild-found
@@ -170,7 +170,7 @@ if "%VCVARS_VER%" NEQ "110" (
170170
call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat"
171171
SET VCVARS_VER=110
172172
)
173-
if not defined VCINSTALLDIR goto msbuild-not-found
173+
if not defined VCINSTALLDIR goto vc-set-2010
174174
set GYP_MSVS_VERSION=2012
175175
set PLATFORM_TOOLSET=v110
176176
goto msbuild-found

0 commit comments

Comments
 (0)