@@ -169,6 +169,9 @@ if "%target%"=="Clean" echo deleting %~dp0deps\icu
169
169
if " %target% " == " Clean" rmdir /S /Q %~dp0 deps\icu
170
170
:no-depsicu
171
171
172
+ call tools\msvs\find_python.cmd
173
+ if errorlevel 1 echo Could not find python2 & goto :exit
174
+
172
175
call :getnodeversion || exit /b 1
173
176
174
177
if defined TAG set configure_flags = %configure_flags% --tag=%TAG%
@@ -265,7 +268,8 @@ goto run
265
268
if defined noprojgen goto msbuild
266
269
267
270
@ rem Generate the VS project.
268
- call :run-python configure %configure_flags%
271
+ echo configure %configure_flags%
272
+ python configure %configure_flags%
269
273
if errorlevel 1 goto create-msvs-files-failed
270
274
if not exist node.sln goto create-msvs-files-failed
271
275
echo Project files generated.
@@ -457,7 +461,7 @@ if defined test_node_inspect goto node-test-inspect
457
461
goto node-tests
458
462
459
463
:node-check-deopts
460
- call : run- python tools\test.py --mode=release --check-deopts parallel sequential -J
464
+ python tools\test.py --mode=release --check-deopts parallel sequential -J
461
465
if defined test_node_inspect goto node-test-inspect
462
466
goto node-tests
463
467
@@ -481,7 +485,8 @@ if defined no_cctest echo Skipping cctest because no-cctest was specified && got
481
485
echo running 'cctest %cctest_args% '
482
486
" %config% \cctest" %cctest_args%
483
487
:run-test-py
484
- call :run-python tools\test.py %test_args%
488
+ echo running 'python tools\test.py %test_args% '
489
+ python tools\test.py %test_args%
485
490
goto test-v8
486
491
487
492
:test-v8
@@ -493,7 +498,7 @@ goto lint-cpp
493
498
:lint-cpp
494
499
if not defined lint_cpp goto lint-js
495
500
call :run-lint-cpp src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\addons-napi\*.cc test\addons-napi\*.h test\cctest\*.cc test\cctest\*.h test\gc\binding.cc tools\icu\*.cc tools\icu\*.h
496
- call : run- python tools/check-imports.py
501
+ python tools/check-imports.py
497
502
goto lint-js
498
503
499
504
:run-lint-cpp
@@ -509,7 +514,7 @@ for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
509
514
( endlocal
510
515
set cppfilelist = %localcppfilelist%
511
516
)
512
- call : run- python tools/cpplint.py %cppfilelist% > nul
517
+ python tools/cpplint.py %cppfilelist% > nul
513
518
goto exit
514
519
515
520
:add-to-list
@@ -571,14 +576,6 @@ echo vcbuild.bat lint : runs the C++ and JavaScript linter
571
576
echo vcbuild.bat no-cctest : skip building cctest.exe
572
577
goto exit
573
578
574
- :run-python
575
- call tools\msvs\find_python.cmd
576
- if errorlevel 1 echo Could not find python2 & goto :exit
577
- set cmd1 = " %VCBUILD_PYTHON_LOCATION% " %*
578
- echo %cmd1%
579
- %cmd1%
580
- exit /b %ERRORLEVEL%
581
-
582
579
:exit
583
580
goto :EOF
584
581
@@ -591,9 +588,8 @@ rem ***************
591
588
set NODE_VERSION =
592
589
set TAG =
593
590
set FULLVERSION =
594
- :: Call as subroutine for validation of python
595
- call :run-python tools\getnodeversion.py > nul
596
- for /F " tokens=*" %%i in ('" %VCBUILD_PYTHON_LOCATION% " tools\getnodeversion.py') do set NODE_VERSION = %%i
591
+
592
+ for /F " usebackq tokens=*" %%i in (`python " %~dp0 tools\getnodeversion.py" `) do set NODE_VERSION = %%i
597
593
if not defined NODE_VERSION (
598
594
echo Cannot determine current version of Node.js
599
595
exit /b 1
0 commit comments