@@ -165,6 +165,9 @@ if "%target%"=="Clean" echo deleting %~dp0deps\icu
165
165
if " %target% " == " Clean" rmdir /S /Q %~dp0 deps\icu
166
166
:no-depsicu
167
167
168
+ call tools\msvs\find_python.cmd
169
+ if errorlevel 1 echo Could not find python2 & goto :exit
170
+
168
171
call :getnodeversion || exit /b 1
169
172
170
173
if defined TAG set configure_flags = %configure_flags% --tag=%TAG%
@@ -234,7 +237,8 @@ goto run
234
237
if defined noprojgen goto msbuild
235
238
236
239
@ rem Generate the VS project.
237
- call :run-python configure %configure_flags%
240
+ echo configure %configure_flags%
241
+ python configure %configure_flags%
238
242
if errorlevel 1 goto create-msvs-files-failed
239
243
if not exist node.sln goto create-msvs-files-failed
240
244
echo Project files generated.
@@ -426,7 +430,7 @@ if defined test_node_inspect goto node-test-inspect
426
430
goto node-tests
427
431
428
432
:node-check-deopts
429
- call : run- python tools\test.py --mode=release --check-deopts parallel sequential -J
433
+ python tools\test.py --mode=release --check-deopts parallel sequential -J
430
434
if defined test_node_inspect goto node-test-inspect
431
435
goto node-tests
432
436
@@ -450,7 +454,8 @@ if defined no_cctest echo Skipping cctest because no-cctest was specified && got
450
454
echo running 'cctest %cctest_args% '
451
455
" %config% \cctest" %cctest_args%
452
456
:run-test-py
453
- call :run-python tools\test.py %test_args%
457
+ echo running 'python tools\test.py %test_args% '
458
+ python tools\test.py %test_args%
454
459
goto test-v8
455
460
456
461
:test-v8
@@ -462,7 +467,7 @@ goto lint-cpp
462
467
:lint-cpp
463
468
if not defined lint_cpp goto lint-js
464
469
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
465
- call : run- python tools/check-imports.py
470
+ python tools/check-imports.py
466
471
goto lint-js
467
472
468
473
:run-lint-cpp
@@ -478,7 +483,7 @@ for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
478
483
( endlocal
479
484
set cppfilelist = %localcppfilelist%
480
485
)
481
- call : run- python tools/cpplint.py %cppfilelist% > nul
486
+ python tools/cpplint.py %cppfilelist% > nul
482
487
goto exit
483
488
484
489
:add-to-list
@@ -540,14 +545,6 @@ echo vcbuild.bat lint : runs the C++ and JavaScript linter
540
545
echo vcbuild.bat no-cctest : skip building cctest.exe
541
546
goto exit
542
547
543
- :run-python
544
- call tools\msvs\find_python.cmd
545
- if errorlevel 1 echo Could not find python2 & goto :exit
546
- set cmd1 = " %VCBUILD_PYTHON_LOCATION% " %*
547
- echo %cmd1%
548
- %cmd1%
549
- exit /b %ERRORLEVEL%
550
-
551
548
:exit
552
549
goto :EOF
553
550
@@ -560,9 +557,8 @@ rem ***************
560
557
set NODE_VERSION =
561
558
set TAG =
562
559
set FULLVERSION =
563
- :: Call as subroutine for validation of python
564
- call :run-python tools\getnodeversion.py > nul
565
- for /F " tokens=*" %%i in ('" %VCBUILD_PYTHON_LOCATION% " tools\getnodeversion.py') do set NODE_VERSION = %%i
560
+
561
+ for /F " usebackq tokens=*" %%i in (`python " %~dp0 tools\getnodeversion.py" `) do set NODE_VERSION = %%i
566
562
if not defined NODE_VERSION (
567
563
echo Cannot determine current version of Node.js
568
564
exit /b 1
0 commit comments