Skip to content

Commit 766aa49

Browse files
committed
build, win: vcbuild improvements
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: #16864
1 parent cfad441 commit 766aa49

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎tools/msvs/find_python.cmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ EXIT /B 1
1919
:: Helper subroutine to handle quotes in %1
2020
:find-main-branch
2121
SET main_key="%~1\Python\PythonCore"
22-
REG QUERY %main_key% /s | findstr "2." | findstr InstallPath > NUL 2> NUL
22+
REG QUERY %main_key% /s 2> NUL | findstr "2." | findstr InstallPath > NUL 2> NUL
2323
IF NOT ERRORLEVEL 1 CALL :find-key %main_key%
2424
EXIT /B
2525

‎tools/msvs/vswhere_usability_wrapper.cmd‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
2828

2929
:no-vswhere
3030
endlocal
31-
echo could not find "vswhere"
3231
exit /B 1

‎vcbuild.bat‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@echo off
1+
@if not defined DEBUG_HELPER @ECHO OFF
22

33
cd %~dp0
44

@@ -165,8 +165,9 @@ if "%target%"=="Clean" echo deleting %~dp0deps\icu
165165
if "%target%"=="Clean" rmdir /S /Q %~dp0deps\icu
166166
:no-depsicu
167167

168-
call tools\msvs\find_python.cmd
169-
if errorlevel 1 echo Could not find python2 & goto :exit
168+
echo Looking for Python 2.x
169+
call tools\msvs\find_python.cmd > NUL 2> NUL
170+
if errorlevel 1 echo Could not find Python installation & goto :exit
170171

171172
call :getnodeversion || exit /b 1
172173

0 commit comments

Comments
 (0)