@echo off setlocal EnableExtensions set "SCRIPT_DIR=%~dp0" set "SERVER_DIR=%SCRIPT_DIR%server" cd /d "%SERVER_DIR%" if errorlevel 1 ( echo Failed to change to server directory: echo "%SERVER_DIR%" pause exit /b 1 ) where python >nul 2>&1 if errorlevel 1 ( echo python was not found on PATH. echo Install Python 3 and add it to PATH. pause exit /b 1 ) python -c "import PySide6" >nul 2>&1 if errorlevel 1 ( echo Installing server GUI dependencies... python -m pip install -r requirements.txt if errorlevel 1 ( echo Failed to install requirements. pause exit /b 1 ) ) echo Starting Commonwealth Online Dev Server GUI... python dev_server_app.py set "EXIT_CODE=%ERRORLEVEL%" if not "%EXIT_CODE%"=="0" ( echo Dev server GUI exited with error code %EXIT_CODE%. pause exit /b %EXIT_CODE% ) endlocal exit /b 0