:: I-X Austin Tate 7-Jan-2004
@echo off
:: Test that the I-X setup is correct, or provide warnings if not

title I-X Setup Test
echo I-X Setup Test

echo Testing Java Environment...
set java_command=java
if exist ..\..\scripts\win\java-command.bat call ..\..\scripts\win\java-command.bat
%java_command% -version
pause

echo Testing CoABS Grid Environment...
if not exist ..\..\comms\grid\scripts\win\grid-setvars.bat goto GRIDBAD1
call ..\..\comms\grid\scripts\win\grid-setvars.bat
echo     grid_base=%grid_base%
set grid-setvars-script=%grid_base%\scripts\win\startup\setvars.bat
if not exist %grid-setvars-script% goto GRIDBAD2
echo     seems okay.
goto GO_ON_1
:GRIDBAD1
echo     No Grid Communications Strategy Installed in I-X (comms\grid)
goto GO_ON_1
:GRIDBAD2
echo     %grid_base%\scripts\win\startup\setvars.bat does not exist.
:GO_ON_1
pause

echo Testing KAoS Environment...
if not exist ..\..\comms\kaos\scripts\win\kaos-setvars.bat goto KAOSBAD1
call ..\..\comms\kaos\scripts\win\kaos-setvars.bat
echo     kaos_base=%kaos_base%
set kaos-setvars-script=%kaos_base%\scripts\win\set-kaos-vars.bat
if not exist %kaos-setvars-script% goto KAOSBAD2
echo     seems okay.
goto GO_ON_2
:KAOSBAD1
echo     No KAoS Communications Strategy Installed in I-X (comms\kaos)
goto GO_ON_2
:KAOSBAD2
echo     %kaos_base%\scripts\win\set-kaos-vars.bat does not exist.
:GO_ON_2
pause

echo Testing Jena Environment...
:: if not exist D:\Java\Jena\lib\jena.jar goto JENABAD1
if not exist ..\..\imports\jena2\jena.jar goto JENABAD1
echo     seems okay.
goto GO_ON_3
:JENABAD1
:: echo     Jena not where anticipated (D:\Java\Jena\lib)
echo     Jena not where anticipated (imports\jena2)
goto GO_ON_3
:GRIDBAD2
echo     %grid_base%\scripts\win\startup\setvars.bat does not exist.
:GO_ON_3
pause

goto END

:IX_BAD
echo I-X Directories are not setup as expected.
pause

:END
