Skip to content

Commit 90a5e9f

Browse files
refackMylesBorins
authored andcommitted
build,win: vcbuild refactoring call configure
PR-URL: #17299 Reviewed-By: Tobias Nießen <[email protected]>
1 parent 0e5dc8f commit 90a5e9f

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

‎vcbuild.bat‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if /i "%1"=="upload" set upload=1&goto arg-ok
105105
if /i "%1"=="small-icu"seti18n_arg=%1&goto arg-ok
106106
if /i "%1"=="full-icu"seti18n_arg=%1&goto arg-ok
107107
if /i "%1"=="intl-none"seti18n_arg=%1&goto arg-ok
108-
if /i "%1"=="without-intl"seti18n_arg=%1&goto arg-ok
108+
if /i "%1"=="without-intl"seti18n_arg=intl-none&goto arg-ok
109109
if /i "%1"=="download-all"setdownload_arg="--download=all"&goto arg-ok
110110
if /i "%1"=="ignore-flaky"settest_args=%test_args% --flaky-tests=dontcare&goto arg-ok
111111
if /i "%1"=="enable-vtune"setenable_vtune_arg=1&goto arg-ok
@@ -146,26 +146,21 @@ set "node_gyp_exe="%node_exe%" deps\npm\node_modules\node-gyp\bin\node-gyp"
146146
if"%target_env%"=="vs2015"set"node_gyp_exe=%node_gyp_exe% --msvs_version=2015"
147147
if"%target_env%"=="vs2017"set"node_gyp_exe=%node_gyp_exe% --msvs_version=2017"
148148

149-
if"%config%"=="Debug"setconfigure_flags=%configure_flags% --debug
150-
ifdefined nosnapshot setconfigure_flags=%configure_flags% --without-snapshot
151-
ifdefined noetw setconfigure_flags=%configure_flags% --without-etw&setnoetw_msi_arg=/p:NoETW=1
152-
ifdefined noperfctr setconfigure_flags=%configure_flags% --without-perfctr&setnoperfctr_msi_arg=/p:NoPerfCtr=1
153-
ifdefined release_urlbase setconfigure_flags=%configure_flags% --release-urlbase=%release_urlbase%
154-
ifdefined download_arg setconfigure_flags=%configure_flags%%download_arg%
149+
if"%config%"=="Debug"setconfigure_flags=%configure_flags% --debug
150+
ifdefined nosnapshot setconfigure_flags=%configure_flags% --without-snapshot
151+
ifdefined noetw setconfigure_flags=%configure_flags% --without-etw&setnoetw_msi_arg=/p:NoETW=1
152+
ifdefined noperfctr setconfigure_flags=%configure_flags% --without-perfctr&setnoperfctr_msi_arg=/p:NoPerfCtr=1
153+
ifdefined release_urlbase setconfigure_flags=%configure_flags% --release-urlbase=%release_urlbase%
154+
ifdefined download_arg setconfigure_flags=%configure_flags%%download_arg%
155155
ifdefined enable_vtune_arg setconfigure_flags=%configure_flags% --enable-vtune-profiling
156-
ifdefined dll setconfigure_flags=%configure_flags% --shared
157-
ifdefined enable_static setconfigure_flags=%configure_flags% --enable-static
158-
ifdefined no_NODE_OPTIONS setconfigure_flags=%configure_flags% --without-node-options
159-
160-
REM if defined debug_http2 set configure_flags=%configure_flags% --debug-http2
161-
REM if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp2
162-
163-
if"%i18n_arg%"=="full-icu"setconfigure_flags=%configure_flags% --with-intl=full-icu
164-
if"%i18n_arg%"=="small-icu"setconfigure_flags=%configure_flags% --with-intl=small-icu
165-
if"%i18n_arg%"=="intl-none"setconfigure_flags=%configure_flags% --with-intl=none
166-
if"%i18n_arg%"=="without-intl"setconfigure_flags=%configure_flags% --without-intl
167-
168-
ifdefined config_flags setconfigure_flags=%configure_flags%%config_flags%
156+
ifdefined dll setconfigure_flags=%configure_flags% --shared
157+
ifdefined enable_static setconfigure_flags=%configure_flags% --enable-static
158+
ifdefined no_NODE_OPTIONS setconfigure_flags=%configure_flags% --without-node-options
159+
ifdefined link_module setconfigure_flags=%configure_flags%%link_module%
160+
ifdefined i18n_arg setconfigure_flags=%configure_flags% --with-intl=%i18n_arg%
161+
ifdefined config_flags setconfigure_flags=%configure_flags%%config_flags%
162+
ifdefined target_arch setconfigure_flags=%configure_flags% --dest-cpu=%target_arch%
163+
ifdefined TAG setconfigure_flags=%configure_flags% --tag=%TAG%
169164

170165
ifnotexist"%~dp0deps\icu"goto no-depsicu
171166
if"%target%"=="Clean"echo deleting %~dp0deps\icu
@@ -266,7 +261,7 @@ goto run
266261
ifdefined noprojgen goto msbuild
267262

268263
@rem Generate the VS project.
269-
call :run-python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG%%link_module%
264+
call :run-python configure %configure_flags%
270265
iferrorlevel1goto create-msvs-files-failed
271266
ifnotexist node.sln goto create-msvs-files-failed
272267
echo Project files generated.
@@ -295,7 +290,7 @@ if errorlevel 1 echo Failed to sign exe&goto exit
295290
@rem Skip license.rtf generation if not requested.
296291
ifnotdefined licensertf goto package
297292

298-
%config%\node tools\license2rtf.js < LICENSE >%config%\license.rtf
293+
%config%\node.exe tools\license2rtf.js < LICENSE >%config%\license.rtf
299294
iferrorlevel1echo Failed to generate license.rtf&goto exit
300295

301296
:package

0 commit comments

Comments
(0)