@echo off REM REM Trimble Geodesy Tool - Setup Script (Windows) REM Erstellt ein Virtual Environment und installiert alle Abhängigkeiten REM echo ======================================== echo Trimble Geodesy Tool - Setup echo ======================================== echo. REM Wechsle ins Script-Verzeichnis cd /d "%~dp0" REM Pruefe ob Python installiert ist python --version >nul 2>&1 if %ERRORLEVEL% neq 0 ( echo X Fehler: Python ist nicht installiert. echo Bitte installieren Sie Python von https://python.org echo Wichtig: Bei der Installation "Add Python to PATH" aktivieren! pause exit /b 1 ) echo [OK] Python gefunden REM Erstelle Virtual Environment echo. echo -^> Erstelle Virtual Environment... if exist venv ( echo Virtual Environment existiert bereits. set /p REPLY=" Neu erstellen? (j/n): " if /i "%REPLY%"=="j" ( rmdir /s /q venv python -m venv venv echo [OK] Virtual Environment neu erstellt ) ) else ( python -m venv venv echo [OK] Virtual Environment erstellt ) REM Aktiviere Virtual Environment echo. echo -^> Aktiviere Virtual Environment... call venv\Scripts\activate.bat if %ERRORLEVEL% neq 0 ( echo X Fehler beim Aktivieren des Virtual Environments pause exit /b 1 ) echo [OK] Virtual Environment aktiviert REM Upgrade pip echo. echo -^> Aktualisiere pip... pip install --upgrade pip --quiet echo [OK] pip aktualisiert REM Installiere Abhaengigkeiten echo. echo -^> Installiere Abhaengigkeiten aus requirements.txt... pip install -r requirements.txt if %ERRORLEVEL% neq 0 ( echo. echo X Fehler beim Installieren der Abhaengigkeiten pause exit /b 1 ) echo. echo ======================================== echo [OK] Setup erfolgreich abgeschlossen! echo ======================================== echo. echo Zum Starten des Programms: echo run.bat echo. echo Oder manuell: echo venv\Scripts\activate.bat echo python main.py echo. pause