@@ -61,9 +61,6 @@ if /i "%1"=="clean" set target=Clean&goto arg-ok
61
61
if /i " %1 " == " ia32" set target_arch = x86& goto arg-ok
62
62
if /i " %1 " == " x86" set target_arch = x86& goto arg-ok
63
63
if /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
67
64
if /i " %1 " == " vs2017" set target_env = vs2017& goto arg-ok
68
65
if /i " %1 " == " noprojgen" set noprojgen = 1& goto arg-ok
69
66
if /i " %1 " == " nobuild" set nobuild = 1& goto arg-ok
@@ -145,7 +142,6 @@ if defined build_release (
145
142
:: assign path to node_exe
146
143
set " node_exe = %config% \node.exe"
147
144
set " 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"
149
145
if " %target_env% " == " vs2017" set " node_gyp_exe = %node_gyp_exe% --msvs_version=2017"
150
146
151
147
if " %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
187
183
188
184
@ rem Look for Visual Studio 2017
189
185
: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
191
187
echo Looking for Visual Studio 2017
192
188
call tools\msvs\vswhere_usability_wrapper.cmd
193
- if " _%VCINSTALLDIR% _" == " __" goto vs-set-2015
189
+ if " _%VCINSTALLDIR% _" == " __" goto msbuild-not-found
194
190
if defined msi (
195
191
echo Looking for WiX installation for Visual Studio 2017...
196
192
if not exist " %WIX% \SDK\VS2017" (
197
193
echo Failed to find WiX install for Visual Studio 2017
198
194
echo VS2017 support for WiX is only present starting at version 3.11
199
- goto vs-set-2015
195
+ goto msbuild-not-found
200
196
)
201
197
if not exist " %VCINSTALLDIR% \..\MSBuild\Microsoft\WiX" (
202
198
echo Failed to find the Wix Toolset Visual Studio 2017 Extension
203
- goto vs-set-2015
199
+ goto msbuild-not-found
204
200
)
205
201
)
206
202
@ rem check if VS2017 is already setup, and for the requested arch
@@ -212,40 +208,13 @@ set "VSCMD_START_DIR=%CD%"
212
208
set vcvars_call = " %VCINSTALLDIR% \Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
213
209
echo calling: %vcvars_call%
214
210
call %vcvars_call%
215
- if errorlevel 1 goto vs-set-2015
211
+ if errorlevel 1 goto msbuild-not-found
216
212
:found_vs2017
217
213
echo Found MSVS version %VisualStudioVersion%
218
214
set GYP_MSVS_VERSION = 2017
219
215
set PLATFORM_TOOLSET = v141
220
216
goto msbuild-found
221
217
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
-
249
218
:msbuild-not-found
250
219
echo Failed to find a suitable Visual Studio installation.
251
220
echo Try to run in a " Developer Command Prompt" or consult
@@ -555,7 +524,7 @@ echo Failed to create vc project files.
555
524
goto exit
556
525
557
526
: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]
559
528
echo Examples:
560
529
echo vcbuild.bat : builds release build
561
530
echo vcbuild.bat debug : builds debug build
0 commit comments