@echo off

cd st\db
echo Disabling CM-Radar since running with st.bat
copy /Y params.nocmradar.txt params.txt
cd ..

if exist debug (
 rd /S/Q debug
)

for /f "tokens=1,2 delims=," %%a in (db\params.txt) do (
 if %%a==debugMode (
  set debugMode=%%b
 )
)

echo Starting Space-Time GUI
if %debugMode%==true (
 java -mx512M -jar st-gui.jar -debug=%debugMode% -stmPath=lib\st-module.exe
) else (
 start "Space-Time" javaw -mx512M -jar st-gui.jar -debug=%debugMode% -stmPath=lib\st-module.exe
)
