@@ -79,7 +79,6 @@ if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
79
79
if /i " %1 " == " x86" set target_arch = x86& goto arg-ok
80
80
if /i " %1 " == " x64" set target_arch = x64& goto arg-ok
81
81
if /i " %1 " == " arm64" set target_arch = arm64& goto arg-ok
82
- if /i " %1 " == " vs2017" set target_env = vs2017& goto arg-ok
83
82
if /i " %1 " == " vs2019" set target_env = vs2019& goto arg-ok
84
83
if /i " %1 " == " noprojgen" set noprojgen = 1& goto arg-ok
85
84
if /i " %1 " == " projgen" set projgen = 1& goto arg-ok
@@ -175,7 +174,6 @@ if defined package set stage_package=1
175
174
set " node_exe = %config% \node.exe"
176
175
set " node_gyp_exe = " %node_exe% " deps\npm\node_modules\node-gyp\bin\node-gyp"
177
176
set " npm_exe = " %~dp0 %node_exe% " %~dp0 deps\npm\bin\npm-cli.js"
178
- if " %target_env% " == " vs2017" set " node_gyp_exe = %node_gyp_exe% --msvs_version=2017"
179
177
if " %target_env% " == " vs2019" set " node_gyp_exe = %node_gyp_exe% --msvs_version=2019"
180
178
181
179
:: skip building if the only argument received was lint
@@ -242,25 +240,25 @@ if %target_arch%==x86 if %msvs_host_arch%==x86 set vcvarsall_arg=x86
242
240
243
241
@ rem Look for Visual Studio 2019
244
242
:vs-set-2019
245
- if defined target_env if " %target_env% " NEQ " vs2019" goto vs-set-2017
243
+ if defined target_env if " %target_env% " NEQ " vs2019" goto msbuild-not-found
246
244
echo Looking for Visual Studio 2019
247
245
@ rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
248
246
@ rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
249
247
@ rem detect the version searched for
250
248
set " VCINSTALLDIR = "
251
249
call tools\msvs\vswhere_usability_wrapper.cmd " [16.0,17.0)"
252
- if " _%VCINSTALLDIR% _" == " __" goto vs-set-2017
250
+ if " _%VCINSTALLDIR% _" == " __" goto msbuild-not-found
253
251
set " WIXSDKDIR = %WIX% \SDK\VS2017"
254
252
if defined msi (
255
253
echo Looking for WiX installation for Visual Studio 2019...
256
254
if not exist " %WIXSDKDIR% " (
257
255
echo Failed to find WiX install for Visual Studio 2019
258
256
echo VS2019 support for WiX is only present starting at version 3.11
259
- goto vs-set-2017
257
+ goto msbuild-not-found
260
258
)
261
259
if not exist " %VCINSTALLDIR% \..\MSBuild\Microsoft\WiX" (
262
260
echo Failed to find the WiX Toolset Visual Studio 2019 Extension
263
- goto vs-set-2017
261
+ goto msbuild-not-found
264
262
)
265
263
)
266
264
@ rem check if VS2019 is already setup, and for the requested arch
@@ -272,50 +270,14 @@ set "VSCMD_START_DIR=%CD%"
272
270
set vcvars_call = " %VCINSTALLDIR% \Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
273
271
echo calling: %vcvars_call%
274
272
call %vcvars_call%
275
- if errorlevel 1 goto vs-set-2017
273
+ if errorlevel 1 goto msbuild-not-found
276
274
if defined DEBUG_HELPER @ ECHO ON
277
275
:found_vs2019
278
276
echo Found MSVS version %VisualStudioVersion%
279
277
set GYP_MSVS_VERSION = 2019
280
278
set PLATFORM_TOOLSET = v142
281
279
goto msbuild-found
282
280
283
- @ rem Look for Visual Studio 2017
284
- :vs-set-2017
285
- if defined target_env if " %target_env% " NEQ " vs2017" goto msbuild-not-found
286
- echo Looking for Visual Studio 2017
287
- call tools\msvs\vswhere_usability_wrapper.cmd " [15.0,16.0)"
288
- if " _%VCINSTALLDIR% _" == " __" goto msbuild-not-found
289
- set " WIXSDKDIR = %WIX% \SDK\VS2017"
290
- if defined msi (
291
- echo Looking for WiX installation for Visual Studio 2017...
292
- if not exist " %WIXSDKDIR% " (
293
- echo Failed to find WiX install for Visual Studio 2017
294
- echo VS2017 support for WiX is only present starting at version 3.11
295
- goto msbuild-not-found
296
- )
297
- if not exist " %VCINSTALLDIR% \..\MSBuild\Microsoft\WiX" (
298
- echo Failed to find the WiX Toolset Visual Studio 2017 Extension
299
- goto msbuild-not-found
300
- )
301
- )
302
- @ rem check if VS2017 is already setup, and for the requested arch
303
- if " _%VisualStudioVersion% _" == " _15.0_" if " _%VSCMD_ARG_TGT_ARCH% _" == " _%target_arch% _" goto found_vs2017
304
- @ rem need to clear VSINSTALLDIR for vcvarsall to work as expected
305
- set " VSINSTALLDIR = "
306
- @ rem prevent VsDevCmd.bat from changing the current working directory
307
- set " VSCMD_START_DIR = %CD% "
308
- set vcvars_call = " %VCINSTALLDIR% \Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
309
- echo calling: %vcvars_call%
310
- call %vcvars_call%
311
- if errorlevel 1 goto msbuild-not-found
312
- if defined DEBUG_HELPER @ ECHO ON
313
- :found_vs2017
314
- echo Found MSVS version %VisualStudioVersion%
315
- set GYP_MSVS_VERSION = 2017
316
- set PLATFORM_TOOLSET = v141
317
- goto msbuild-found
318
-
319
281
:msbuild-not-found
320
282
echo Failed to find a suitable Visual Studio installation.
321
283
echo Try to run in a " Developer Command Prompt" or consult
@@ -705,7 +667,7 @@ set exit_code=1
705
667
goto exit
706
668
707
669
:help
708
- echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/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] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2017/ vs2019] [download-all] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
670
+ echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/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] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2019] [download-all] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
709
671
echo Examples:
710
672
echo vcbuild.bat : builds release build
711
673
echo vcbuild.bat debug : builds debug build
0 commit comments