Files
aza/APP/spotify-recorder - Kopie (4)/Spotify Recorder.bat

61 lines
1.3 KiB
Batchfile
Raw Normal View History

2026-03-30 07:59:11 +02:00
@echo off
title Surovy's Music Recorder
cd /d "%~dp0"
echo.
echo ====================================
echo Surovy's Music Recorder - Setup
echo ====================================
echo.
:: Python pruefen
where python >nul 2>&1
if %errorlevel% neq 0 (
echo [FEHLER] Python wurde nicht gefunden!
echo.
echo Bitte installiere Python von:
echo https://www.python.org/downloads/
echo.
echo WICHTIG: Haken bei "Add Python to PATH" setzen!
echo.
pause
exit /b 1
)
:: Virtuelle Umgebung erstellen (nur beim ersten Start)
if not exist "venv\Scripts\activate.bat" (
echo [1/2] Erstelle Python-Umgebung...
python -m venv venv
if %errorlevel% neq 0 (
echo.
echo [FEHLER] Umgebung konnte nicht erstellt werden.
echo.
pause
exit /b 1
)
echo Fertig.
echo.
)
:: Umgebung aktivieren
call venv\Scripts\activate.bat
:: Pakete pruefen und installieren
echo [2/2] Pruefe Pakete...
pip install -r requirements.txt --quiet --disable-pip-version-check
if %errorlevel% neq 0 (
echo.
echo [FEHLER] Paket-Installation fehlgeschlagen.
echo Hast du eine Internetverbindung?
echo.
pause
exit /b 1
)
echo Alles bereit!
echo.
echo App wird gestartet...
:: App ohne Konsole starten
start "" "%~dp0venv\Scripts\pythonw.exe" "%~dp0main.py"