From 8452ae106e3ea40b8ed34cf5cf590ba0604c02a9 Mon Sep 17 00:00:00 2001 From: "julien.waechter" Date: Tue, 12 Jan 2016 09:21:46 +0100 Subject: [PATCH 1/2] build: Add option to select environment for msbuild (vc2015 or vc2013) --- vcbuild.bat | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index 3c710c807a53da..924e3a31b0c27e 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -15,6 +15,7 @@ if /i "%1"=="/?" goto help set config=Release set target=Build set target_arch=x86 +set target_env= set noprojgen= set nobuild= set nosign= @@ -44,6 +45,8 @@ if /i "%1"=="clean" set target=Clean&goto arg-ok if /i "%1"=="ia32" set target_arch=x86&goto arg-ok if /i "%1"=="x86" set target_arch=x86&goto arg-ok if /i "%1"=="x64" set target_arch=x64&goto arg-ok +if /i "%1"=="vc2013" set target_env=vc2013&goto arg-ok +if /i "%1"=="vc2015" set target_env=vc2015&goto arg-ok if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok if /i "%1"=="nobuild" set nobuild=1&goto arg-ok if /i "%1"=="nosign" set nosign=1&goto arg-ok @@ -109,6 +112,10 @@ call :getnodeversion || exit /b 1 @rem Set environment for msbuild +if "%target_env%"=="vc2015" goto vc-set-2015 +if "%target_env%"=="vc2013" goto vc-set-2013 + +:vc-set-2015 @rem Look for Visual Studio 2015 echo Looking for Visual Studio 2015 if not defined VS140COMNTOOLS goto vc-set-2013 @@ -261,7 +268,7 @@ echo Failed to create vc project files. goto exit :help -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] [enable-vtune] +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] [enable-vtune] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build From c726b132c14271b4493138b0b6c0d53548efe31c Mon Sep 17 00:00:00 2001 From: "julien.waechter" Date: Tue, 12 Jan 2016 13:57:37 +0100 Subject: [PATCH 2/2] Update environment option in vcbuild.bat script to filter Visual Studio version --- vcbuild.bat | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index 924e3a31b0c27e..618f91567994aa 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -112,10 +112,7 @@ call :getnodeversion || exit /b 1 @rem Set environment for msbuild -if "%target_env%"=="vc2015" goto vc-set-2015 -if "%target_env%"=="vc2013" goto vc-set-2013 - -:vc-set-2015 +if defined target_env if "%target_env%" NEQ "vc2015" goto vc-set-2013 @rem Look for Visual Studio 2015 echo Looking for Visual Studio 2015 if not defined VS140COMNTOOLS goto vc-set-2013 @@ -139,6 +136,7 @@ set PLATFORM_TOOLSET=v140 goto msbuild-found :vc-set-2013 +if defined target_env if "%target_env%" NEQ "vc2013" goto msbuild-not-found @rem Look for Visual Studio 2013 echo Looking for Visual Studio 2013 if not defined VS120COMNTOOLS goto msbuild-not-found