@echo off REM ================================================================ REM IWZ - Python Virtual Environment einrichten REM ================================================================ call "%~dp0setenv.bat" if not exist "%IWZ%\.venv" ( echo Initialisiere Python virtual environment... py -m venv "%IWZ%\.venv" --upgrade-deps echo Erfolgreich. call "%IWZ%\.venv\Scripts\activate.bat" echo Installiere erforderliche Python Packages... pip install -r "%IWZ%\requirements.txt" -q echo Erfolgreich. deactivate ) else ( echo Erforderliche Python Packages bereits installiert! ) echo. echo ================================================================ echo Pruefe Nutzungsanalyse-Voraussetzungen (WSL + GoAccess) echo ================================================================ REM 1) Ist WSL verfuegbar? where wsl >nul 2>&1 if errorlevel 1 ( echo [FEHLT] WSL ist nicht installiert. echo So einrichten ^(einmalig, PowerShell als Administrator^): echo wsl --install echo Danach Windows neu starten und die Ubuntu-Ersteinrichtung echo ^(Benutzername/Passwort^) durchlaufen. Anschliessend GoAccess echo wie unten installieren. goto :wsl_done ) echo [OK] WSL gefunden. REM 2) Ist GoAccess in der WSL installiert? wsl -e bash -lc "command -v goaccess >/dev/null 2>&1" if errorlevel 1 ( echo [FEHLT] GoAccess ist in der WSL nicht installiert. echo So installieren: echo wsl -e sudo apt update echo wsl -e sudo apt install -y goaccess echo ^(fragt einmalig nach dem WSL-sudo-Passwort^) ) else ( for /f "delims=" %%V in ('wsl -e bash -lc "goaccess --version ^| head -1"') do set "GA_VER=%%V" echo [OK] GoAccess in der WSL: %GA_VER% ) :wsl_done echo ================================================================