@echo off
REM SayfeGuard Windows Installer (curl required)
setlocal
set INSTALL_DIR=%LOCALAPPDATA%\SayfeGuard\client
set URL=https://sayfeguard.online

if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"
cd /d "%INSTALL_DIR%"

echo == SayfeGuard Installer ==
echo Lade Client-Paket...
curl -fsSL "%URL%/client/sayfeguard-client.zip" -o "%INSTALL_DIR%\sayfeguard-client.zip"
powershell -NoProfile -Command "Expand-Archive -Path '%INSTALL_DIR%\sayfeguard-client.zip' -DestinationPath '%INSTALL_DIR%' -Force"
del /f "%INSTALL_DIR%\sayfeguard-client.zip"

echo Installiere Python-Abhaengigkeiten...
python -m pip install --user -r "%INSTALL_DIR%\requirements.txt"

echo SayfeGuard installed to %INSTALL_DIR%
echo Starte: python "%INSTALL_DIR%\main.py" tray
echo Dashboard: http://127.0.0.1:19400/
