36 lines
934 B
Batchfile
36 lines
934 B
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo [%date% %time%] Starte Backend-Debug-Server...
|
|
|
|
REM Pfad zum Debug-Server ermitteln
|
|
set "SCRIPT_DIR=%~dp0"
|
|
set "DEBUG_SERVER_DIR=%SCRIPT_DIR%debug-server"
|
|
|
|
REM Prüfe, ob das Debug-Server-Verzeichnis existiert
|
|
if not exist "%DEBUG_SERVER_DIR%" (
|
|
echo [%date% %time%] FEHLER: Debug-Server-Verzeichnis nicht gefunden: %DEBUG_SERVER_DIR%
|
|
exit /b 1
|
|
)
|
|
|
|
REM Prüfe, ob Python installiert ist
|
|
where python >nul 2>&1
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo [%date% %time%] FEHLER: Python nicht gefunden. Bitte installieren Sie Python.
|
|
exit /b 1
|
|
)
|
|
|
|
REM Wechsle ins Debug-Server-Verzeichnis
|
|
cd "%DEBUG_SERVER_DIR%"
|
|
|
|
REM Installiere Abhängigkeiten, falls nötig
|
|
if exist "requirements.txt" (
|
|
echo [%date% %time%] Installiere Abhängigkeiten...
|
|
pip install -r requirements.txt
|
|
)
|
|
|
|
REM Starte den Debug-Server
|
|
echo [%date% %time%] Starte Backend-Debug-Server...
|
|
python app.py
|
|
|
|
endlocal |