@echo off

if not defined ICEM_ACN goto ErrorScribApp
set TCL_LIBRARY=%ICEM_ACN%\lib\tcl8.3.3
set TK_LIBRARY=%ICEM_ACN%\lib\tk8.3.3

if not defined ICEM_SCRIB set ICEM_SCRIB=%ICEM_ACN%\lib\scrib
if "%ICEM_SCRIB%" == "" set ICEM_SCRIB=%ICEM_ACN%\lib\scrib

if "%1" == "-batch" goto StartBatchScribApp

start /wait %ICEM_ACN%\bin\wish.exe %ICEM_SCRIB%\app\main.tcl app_ic_regression -config_file_first -regression %*
goto ExitScribApp

:StartBatchScribApp
start /wait %ICEM_ACN%\bin\tclsh %ICEM_SCRIB%\app\main.tcl app_ic_regression -config_file_first -regression %*
pause
goto ExitScribApp

:ErrorScribApp
echo Cant' run a ScripApp without ICEM_ACN set!
pause
goto ExitScribApp

:ExitScribApp
