Files
pvd/create_mezzanine.bat
T
2026-05-08 08:35:41 +02:00

43 lines
1.0 KiB
Batchfile

@echo off
setlocal
set "SCRIPT=%~dp0pvd_mezzanine.py"
set "PYTHON_EXE="
set "PYTHON_ARGS="
for %%V in (313 312 311 310) do (
if not defined PYTHON_EXE if exist "%LocalAppData%\Programs\Python\Python%%V\python.exe" (
set "PYTHON_EXE=%LocalAppData%\Programs\Python\Python%%V\python.exe"
)
)
if not defined PYTHON_EXE (
where py.exe >nul 2>nul
if not errorlevel 1 (
set "PYTHON_EXE=py"
set "PYTHON_ARGS=-3"
)
)
if not defined PYTHON_EXE (
where python.exe >nul 2>nul
if not errorlevel 1 set "PYTHON_EXE=python"
)
if not defined PYTHON_EXE (
where python3.exe >nul 2>nul
if not errorlevel 1 set "PYTHON_EXE=python3"
)
if not defined PYTHON_EXE (
echo FEHLER: Python wurde nicht gefunden.
echo Bitte Python 3.10 oder neuer installieren:
echo https://www.python.org/downloads/windows/
echo.
echo Im Installer "Add python.exe to PATH", "py launcher" und "tcl/tk and IDLE" aktivieren.
pause
exit /b 1
)
"%PYTHON_EXE%" %PYTHON_ARGS% "%SCRIPT%" %*
pause