@echo off setlocal title Squad Voice Activation - Fehlersuche cd /d "%~dp0" echo. echo Startet das Programm mit sichtbarem Fenster fuer Meldungen. echo Nur noetig, wenn der normale Start nicht funktioniert. echo. set "PY=.venv\Scripts\python.exe" if exist "%PY%" ( "%PY%" -c "pass" >nul 2>&1 if errorlevel 1 ( echo [Setup] Vorhandene Umgebung passt nicht zu diesem Rechner. echo Sie wird verworfen und neu angelegt. rmdir /s /q "%~dp0.venv" ) ) if not exist "%PY%" ( echo [Setup] Erstelle Laufzeitumgebung ... py -3 -m venv .venv if errorlevel 1 ( echo. echo FEHLER: Python 3 wurde nicht gefunden. echo Download: https://www.python.org/downloads/ pause exit /b 1 ) set "NEEDINSTALL=1" ) "%PY%" -c "import numpy, sounddevice" >nul 2>&1 if errorlevel 1 set "NEEDINSTALL=1" if defined NEEDINSTALL ( echo [Setup] Installiere Pakete ... "%PY%" -m pip install --disable-pip-version-check -r requirements.txt if errorlevel 1 ( echo FEHLER: Pakete konnten nicht installiert werden. pause exit /b 1 ) ) echo [Start] Squad Voice Activation "%PY%" squad_voice_activation.py set "RC=%ERRORLEVEL%" if not "%RC%"=="0" ( echo. echo Das Programm wurde mit Fehlercode %RC% beendet. ) echo. pause endlocal