@echo off if exist setup.bat goto dirOK echo You must source the script from within the Greenstone home directory goto end :dirOK :: Set the GSDL3HOME variable to the current directory :: This is an unbelievably disgusting process under Windows - improvements anyone? echo e 100 "set GSDL3HOME=" > sethome.tmp echo rcx >> sethome.tmp echo e >> sethome.tmp echo n sethome.bat >> sethome.tmp echo w >> sethome.tmp echo q >> sethome.tmp debug < sethome.tmp > nul del sethome.tmp cd >> sethome.bat call sethome.bat del sethome.bat echo GSDL3HOME: %GSDL3HOME% :: Set other important environment variables set GSDLOS=windows set PATH=%PATH%;%GSDL3HOME%\bin;%GSDL3HOME%\bin\script;%GSDL3HOME%\lib set CATALINA_HOME=%GSDL3HOME%\comms\tomcat\jakarta set CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=%GSDL3HOME% -DGSDLOS=%GSDLOS% -DGSDLHOME= -DPATH=%PATH%" :: Set the CLASSPATH environment variable :: This should work but doesn't: for %%j in (*.jar) do set CLASSPATH=%CLASSPATH%;%GSDL3HOME%\lib\java\%%j set CLASSPATH=%GSDL3HOME%\resources\java;%GSDL3HOME%\src\java;%CATALINA_HOME%\common\lib\servlet.jar cd %GSDL3HOME%\lib\java if exist setcp.bat del setcp.bat for %%j in (*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%GSDL3HOME%\lib\java\%%j>> setcp.bat call setcp.bat del setcp.bat echo CLASSPATH: %CLASSPATH% cd %GSDL3HOME% :end