From 060835cf2fadb8b4873005e3d4d8f8b2ba6ed550 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 29 May 2022 19:22:48 +0300 Subject: [PATCH] waf.bat: correctly parse reg query on Windows 10+, fallback only to py.exe wrapper --- waf.bat | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/waf.bat b/waf.bat index 2d15819d..92d4ed37 100644 --- a/waf.bat +++ b/waf.bat @@ -8,17 +8,13 @@ rem from issue #964 Setlocal EnableDelayedExpansion rem Check Windows Version -set TOKEN=tokens=3* +set TOKEN=tokens=2* ver | findstr /i "5\.0\." > nul if %ERRORLEVEL% EQU 0 SET TOKEN=tokens=3* ver | findstr /i "5\.1\." > nul if %ERRORLEVEL% EQU 0 SET TOKEN=tokens=3* ver | findstr /i "5\.2\." > nul if %ERRORLEVEL% EQU 0 SET TOKEN=tokens=3* -ver | findstr /i "6\.0\." > nul -if %ERRORLEVEL% EQU 0 SET TOKEN=tokens=2* -ver | findstr /i "6\.1\." > nul -if %ERRORLEVEL% EQU 0 SET TOKEN=tokens=2* rem Start calculating PYTHON and PYTHON_DIR set PYTHON= @@ -88,7 +84,7 @@ rem @echo %PYTHON_DIR% if "%PYTHON%" == "" ( rem @echo No Python -set PYTHON=python +set PYTHON=py goto running )