@@ -211,7 +211,7 @@ if not "%target%"=="Clean" goto skip-clean
211211rmdir /Q /S " %~dp0 %config% \%TARGET_NAME% " > nul 2 > nul
212212:skip-clean
213213
214- if defined noprojgen if defined nobuild if not defined sign if not defined msi goto licensertf
214+ if defined noprojgen if defined nobuild goto : after-build
215215
216216@ rem Set environment for msbuild
217217
@@ -301,7 +301,7 @@ where /R . /T *.gyp? >> .gyp_configure_stamp
301301
302302:msbuild
303303@ rem Skip build if requested.
304- if defined nobuild goto sign
304+ if defined nobuild goto : after-build
305305
306306@ rem Build the sln with msbuild.
307307set " msbcpu = /m:2"
@@ -319,10 +319,13 @@ if defined msbuild_args set "extra_msbuild_args=%extra_msbuild_args% %msbuild_ar
319319msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoItemAndPropertyList;Verbosity=minimal /nologo %extra_msbuild_args%
320320if errorlevel 1 (
321321 if not defined project_generated echo Building Node with reused solution failed. To regenerate project files use " vcbuild projgen"
322- goto exit
322+ exit /B 1
323323)
324324if " %target% " == " Clean" goto exit
325325
326+ :after-build
327+ if EXIST out\%config% mklink /D %config% out\%config%
328+
326329:sign
327330@ rem Skip signing unless the `sign` option was specified.
328331if not defined sign goto licensertf
@@ -334,7 +337,7 @@ if errorlevel 1 echo Failed to sign exe&goto exit
334337@ rem Skip license.rtf generation if not requested.
335338if not defined licensertf goto stage_package
336339
337- %config% \node.exe tools\license2rtf.js < LICENSE > %config% \license.rtf
340+ %node_exe% tools\license2rtf.js < LICENSE > %config% \license.rtf
338341if errorlevel 1 echo Failed to generate license.rtf& goto exit
339342
340343:stage_package
@@ -553,7 +556,7 @@ goto node-tests
553556
554557:node-test-inspect
555558set USE_EMBEDDED_NODE_INSPECT = 1
556- %config% \node tools\test-npm-package.js --install deps\node-inspect test
559+ %node_exe% tools\test-npm-package.js --install deps\node-inspect test
557560goto node-tests
558561
559562:node-tests
@@ -635,12 +638,12 @@ if defined lint_js_ci goto lint-js-ci
635638if not defined lint_js goto lint-md-build
636639if not exist tools\node_modules\eslint goto no-lint
637640echo running lint-js
638- %config% \node tools\node_modules\eslint\bin\eslint.js --cache --report-unused-disable-directives --rule " linebreak-style: 0" --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools
641+ %node_exe% tools\node_modules\eslint\bin\eslint.js --cache --report-unused-disable-directives --rule " linebreak-style: 0" --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools
639642goto lint-md-build
640643
641644:lint-js-ci
642645echo running lint-js-ci
643- %config% \node tools\lint-js.js -J -f tap -o test-eslint.tap benchmark doc lib test tools
646+ %node_exe% tools\lint-js.js -J -f tap -o test-eslint.tap benchmark doc lib test tools
644647goto lint-md-build
645648
646649:no-lint
@@ -663,7 +666,7 @@ for /D %%D IN (doc\*) do (
663666 set " lint_md_files = " %%F " !lint_md_files! "
664667 )
665668)
666- %config% \node tools\lint-md.js -q -f %lint_md_files%
669+ %node_exe% tools\lint-md.js -q -f %lint_md_files%
667670ENDLOCAL
668671goto exit
669672
0 commit comments