Files
pdf_to_ics/start_gui.cmd

50 lines
1.3 KiB
Batchfile

@echo off
REM PDF zu ICS Konverter - GUI Startskript (Windows)
setlocal enabledelayedexpansion
REM Wechsel ins Skriptverzeichnis
cd /d "%~dp0"
REM Überprüfe, ob venv existiert
if not exist ".venv" (
echo 📦 Python-Umgebung wird eingerichtet...
python3 -m venv .venv --upgrade-deps
if errorlevel 1 (
python -m venv .venv --upgrade-deps
)
)
REM Überprüfe, ob Abhängigkeiten installiert sind
.venv\Scripts\python.exe -c "import pdfplumber" 2>nul
if errorlevel 1 (
echo 📚 Installiere Abhängigkeiten...
call .venv\Scripts\python.exe -m pip install -q pdfplumber icalendar pypdf2 pytz packaging
echo ✓ Abhängigkeiten installiert
)
REM Überprüfe, ob wxPython installiert ist
.venv\Scripts\python.exe -c "import wx" 2>nul
if errorlevel 1 (
echo 📚 Installiere wxPython...
call .venv\Scripts\python.exe -m pip install -q wxPython
if errorlevel 1 (
echo.
echo ❌ wxPython konnte nicht installiert werden.
echo Bitte installieren Sie Visual C++ Build Tools und versuchen Sie es erneut.
pause
exit /b 1
)
echo ✓ wxPython installiert
)
REM Starte die GUI
echo 🎨 Starte GUI...
call .venv\Scripts\pythonw.exe gui_wxpython.py
if errorlevel 1 (
echo.
echo ❌ Fehler beim Starten der GUI
pause
)