[Misc] Support for upcoming Python releases

This commit is contained in:
¥IGA 2024-12-18 15:27:31 +01:00 committed by GitHub
parent f6ae651cc2
commit fd64846aab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 9 deletions

24
xb.bat
View File

@ -1,5 +1,5 @@
@ECHO OFF @ECHO OFF
REM Copyright 2022 Ben Vanik. All Rights Reserved. REM Copyright 2024 Ben Vanik. All Rights Reserved.
SET "DIR=%~dp0" SET "DIR=%~dp0"
@ -35,14 +35,20 @@ SETLOCAL ENABLEDELAYEDEXPANSION
SET FOUND_PATH="" SET FOUND_PATH=""
SET "CANDIDATE_PATHS[0]=C:\python313\python.exe" SET "CANDIDATE_PATHS[0]=C:\python320\python.exe"
SET "CANDIDATE_PATHS[1]=C:\python312\python.exe" SET "CANDIDATE_PATHS[1]=C:\python319\python.exe"
SET "CANDIDATE_PATHS[2]=C:\python311\python.exe" SET "CANDIDATE_PATHS[2]=C:\python318\python.exe"
SET "CANDIDATE_PATHS[3]=C:\python310\python.exe" SET "CANDIDATE_PATHS[3]=C:\python317\python.exe"
SET "CANDIDATE_PATHS[4]=C:\python39\python.exe" SET "CANDIDATE_PATHS[4]=C:\python316\python.exe"
SET "CANDIDATE_PATHS[5]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe" SET "CANDIDATE_PATHS[5]=C:\python315\python.exe"
SET "CANDIDATE_PATHS[6]=C:\Windows\py.exe" SET "CANDIDATE_PATHS[6]=C:\python314\python.exe"
SET OUTPUT_INDEX=7 SET "CANDIDATE_PATHS[7]=C:\python313\python.exe"
SET "CANDIDATE_PATHS[8]=C:\python312\python.exe"
SET "CANDIDATE_PATHS[9]=C:\python311\python.exe"
SET "CANDIDATE_PATHS[10]=C:\python310\python.exe"
SET "CANDIDATE_PATHS[11]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe"
SET "CANDIDATE_PATHS[12]=C:\Windows\py.exe"
SET OUTPUT_INDEX=13
FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO ( FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO (
IF %%~zL NEQ 0 ( IF %%~zL NEQ 0 (