From be5b485d1dd4b10ab42c0ad6be91ea4ef2bf8694 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 27 Mar 2023 23:18:37 +0000 Subject: [PATCH] waf.bat fixes --- utils/waf.bat | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/utils/waf.bat b/utils/waf.bat index 0816ec13..cc3fc88e 100644 --- a/utils/waf.bat +++ b/utils/waf.bat @@ -5,17 +5,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= @@ -26,7 +22,7 @@ Setlocal EnableDelayedExpansion set PYTHON_DIR_OK=FALSE set REGPATH= -for %%i in (3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) do ( +for %%i in (3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) do ( for %%j in (HKCU HKLM) do ( for %%k in (SOFTWARE\Wow6432Node SOFTWARE) do ( for %%l in (Python\PythonCore IronPython) do ( @@ -77,7 +73,7 @@ Endlocal & SET PYTHON_DIR=%PYTHON_DIR% & SET PYTHON=%PYTHON% if "%PYTHON_DIR%" == "" ( rem @echo No Python dir -set PYTHON=python +set PYTHON=py goto running ) @@ -85,7 +81,7 @@ rem @echo %PYTHON_DIR% if "%PYTHON%" == "" ( rem @echo No Python -set PYTHON=python +set PYTHON=py goto running ) @@ -95,4 +91,4 @@ goto running "%PYTHON%" -x "%~dp0waf" %* Endlocal -exit /b %ERRORLEVEL% \ No newline at end of file +exit /b %ERRORLEVEL%