@@ -61,9 +61,6 @@ if /i "%1"=="clean" set target=Clean&goto arg-ok
6161if /i " %1 " == " ia32" set target_arch = x86& goto arg-ok
6262if /i " %1 " == " x86" set target_arch = x86& goto arg-ok
6363if /i " %1 " == " x64" set target_arch = x64& goto arg-ok
64- @ rem args should be vs2017 and vs2015. keeping vc2015 for backward compatibility (undocumented)
65- if /i " %1 " == " vc2015" set target_env = vs2015& goto arg-ok
66- if /i " %1 " == " vs2015" set target_env = vs2015& goto arg-ok
6764if /i " %1 " == " vs2017" set target_env = vs2017& goto arg-ok
6865if /i " %1 " == " noprojgen" set noprojgen = 1& goto arg-ok
6966if /i " %1 " == " nobuild" set nobuild = 1& goto arg-ok
@@ -145,7 +142,6 @@ if defined build_release (
145142:: assign path to node_exe
146143set " node_exe = %config% \node.exe"
147144set " node_gyp_exe = " %node_exe% " deps\npm\node_modules\node-gyp\bin\node-gyp"
148- if " %target_env% " == " vs2015" set " node_gyp_exe = %node_gyp_exe% --msvs_version=2015"
149145if " %target_env% " == " vs2017" set " node_gyp_exe = %node_gyp_exe% --msvs_version=2017"
150146
151147if " %config% " == " Debug" set configure_flags = %configure_flags% --debug
@@ -187,20 +183,20 @@ if %target_arch%==x64 if %msvs_host_arch%==amd64 set vcvarsall_arg=amd64
187183
188184@ rem Look for Visual Studio 2017
189185:vs-set-2017
190- if defined target_env if " %target_env% " NEQ " vs2017" goto vs-set-2015
186+ if defined target_env if " %target_env% " NEQ " vs2017" goto msbuild-not-found
191187echo Looking for Visual Studio 2017
192188call tools\msvs\vswhere_usability_wrapper.cmd
193- if " _%VCINSTALLDIR% _" == " __" goto vs-set-2015
189+ if " _%VCINSTALLDIR% _" == " __" goto msbuild-not-found
194190if defined msi (
195191 echo Looking for WiX installation for Visual Studio 2017...
196192 if not exist " %WIX% \SDK\VS2017" (
197193 echo Failed to find WiX install for Visual Studio 2017
198194 echo VS2017 support for WiX is only present starting at version 3.11
199- goto vs-set-2015
195+ goto msbuild-not-found
200196 )
201197 if not exist " %VCINSTALLDIR% \..\MSBuild\Microsoft\WiX" (
202198 echo Failed to find the Wix Toolset Visual Studio 2017 Extension
203- goto vs-set-2015
199+ goto msbuild-not-found
204200 )
205201)
206202@ rem check if VS2017 is already setup, and for the requested arch
@@ -212,40 +208,13 @@ set "VSCMD_START_DIR=%CD%"
212208set vcvars_call = " %VCINSTALLDIR% \Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
213209echo calling: %vcvars_call%
214210call %vcvars_call%
215- if errorlevel 1 goto vs-set-2015
211+ if errorlevel 1 goto msbuild-not-found
216212:found_vs2017
217213echo Found MSVS version %VisualStudioVersion%
218214set GYP_MSVS_VERSION = 2017
219215set PLATFORM_TOOLSET = v141
220216goto msbuild-found
221217
222- @ rem Look for Visual Studio 2015
223- :vs-set-2015
224- if defined target_env if " %target_env% " NEQ " vs2015" goto msbuild-not-found
225- echo Looking for Visual Studio 2015
226- if not defined VS140COMNTOOLS goto msbuild-not-found
227- if not exist " %VS140COMNTOOLS% \..\..\vc\vcvarsall.bat" goto msbuild-not-found
228- if defined msi (
229- echo Looking for WiX installation for Visual Studio 2015...
230- if not exist " %WIX% \SDK\VS2015" (
231- echo Failed to find WiX install for Visual Studio 2015
232- echo VS2015 support for WiX is only present starting at version 3.10
233- goto wix-not-found
234- )
235- )
236-
237- @ rem check if VS2015 is already setup
238- if " _%VisualStudioVersion% _" == " _14.0_" if " _%VCVARS_VER% _" == " _140_" goto found_vs2015
239- call " %VS140COMNTOOLS% \..\..\vc\vcvarsall.bat"
240- SET VCVARS_VER = 140
241- :found_vs2015
242- if not defined VCINSTALLDIR goto msbuild-not-found
243- @ rem Visual C++ Build Tools 2015 does not define VisualStudioVersion
244- echo Found MSVS version 14.0
245- set GYP_MSVS_VERSION = 2015
246- set PLATFORM_TOOLSET = v140
247- goto msbuild-found
248-
249218:msbuild-not-found
250219echo Failed to find a suitable Visual Studio installation.
251220echo Try to run in a " Developer Command Prompt" or consult
@@ -555,7 +524,7 @@ echo Failed to create vc project files.
555524goto exit
556525
557526:help
558- echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2015/ vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest]
527+ echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest]
559528echo Examples:
560529echo vcbuild.bat : builds release build
561530echo vcbuild.bat debug : builds debug build
0 commit comments