Skip to content

Commit dac4e64

Browse files
greenjavaMyles Borins
authored andcommitted
build: add option to select VS version
This changes vcbuild.bat to accept a new parameter (vc2015 or vc2013) to select the version of Visual Studio to use. PR-URL: #4645 Reviewed-By: João Reis <reis@janeasystems.com>
1 parent 17a7430 commit dac4e64

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

vcbuild.bat

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if /i "%1"=="/?" goto help
1515
set config=Release
1616
set target=Build
1717
set target_arch=x86
18+
set target_env=
1819
set noprojgen=
1920
set nobuild=
2021
set nosign=
@@ -43,6 +44,8 @@ if /i "%1"=="clean" set target=Clean&goto arg-ok
4344
if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
4445
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
4546
if /i "%1"=="x64" set target_arch=x64&goto arg-ok
47+
if /i "%1"=="vc2013" set target_env=vc2013&goto arg-ok
48+
if /i "%1"=="vc2015" set target_env=vc2015&goto arg-ok
4649
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
4750
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
4851
if /i "%1"=="nosign" set nosign=1&goto arg-ok
@@ -107,6 +110,7 @@ call :getnodeversion || exit /b 1
107110

108111
@rem Set environment for msbuild
109112

113+
if defined target_env if "%target_env%" NEQ "vc2015" goto vc-set-2013
110114
@rem Look for Visual Studio 2015
111115
echo Looking for Visual Studio 2015
112116
if not defined VS140COMNTOOLS goto vc-set-2013
@@ -130,6 +134,7 @@ set PLATFORM_TOOLSET=v140
130134
goto msbuild-found
131135

132136
:vc-set-2013
137+
if defined target_env if "%target_env%" NEQ "vc2013" goto msbuild-not-found
133138
@rem Look for Visual Studio 2013
134139
echo Looking for Visual Studio 2013
135140
if not defined VS120COMNTOOLS goto msbuild-not-found
@@ -261,7 +266,9 @@ echo Failed to create vc project files.
261266
goto exit
262267

263268
:help
264-
echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/intl-none] [nobuild] [nosign] [x86/x64] [download-all]
269+
270+
echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/intl-none] [nobuild] [nosign] [x86/x64] [vc2013/vc2015] [download-all]
271+
265272
echo Examples:
266273
echo vcbuild.bat : builds release build
267274
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)