@echo off
cd /d "%~dp0"
set "NEXAOFFICE_SOURCE_FORCE_EXIT=1"
echo [NexaOffice] Checking Python dependencies...
python -m pip install -r requirements.txt
if errorlevel 1 (
  echo [NexaOffice] Dependency install failed. The app may still run, but tray support may be unavailable.
)
echo [NexaOffice] Running desktop preflight checks...
python tools\desktop_preflight.py
if errorlevel 1 (
  echo [NexaOffice] Desktop preflight failed. Check data\desktop_preflight_latest.json.
)

echo [NexaOffice] Starting app...
python main.py
pause
