root/greenstone3/trunk/gs3-setup.bat @ 18343

Revision 18127, 2.1 KB (checked in by cc108, 11 years ago)

adding new path to classpath

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1@echo off
2
3set java_min_version=1.4.0_00
4
5if exist gs3-setup.bat goto start
6  echo This script must be run from within the Greenstone 3 home directory
7  goto exit
8
9:start
10:: ---- Set some relevant environment variables ----
11
12:: this is the default
13:: greenstone3 (%GSDL3SRCHOME%)
14:: +-- web (%GSDLHOME%)
15:: +-- packages
16::      +-- tomcat (%TOMCAT_HOME%)
17::      +-- ant (%ANT_HOME%)
18
19:: set GSDLSRCHOME to the current directory
20cd | winutil\setvar.exe GSDL3SRCHOME > %TMP%\setgsdl3.bat
21call %TMP%\setgsdl3.bat
22del %TMP%\setgsdl3.bat
23
24:: set GSDLHOME to the 'web' subdirectory
25set GSDL3HOME=%GSDL3SRCHOME%\web
26
27:: change if using external tomcat or ant
28set TOMCAT_HOME=%GSDL3SRCHOME%\packages\tomcat
29set ANT_HOME=%GSDL3SRCHOME%\packages\ant
30
31:: other important environment variables
32set GSDLOS=windows
33
34:: ---- Set the CLASSPATH and PATH environment variables ----
35if "%GS_CP_SET%" == "yes" goto skipSetCp
36set CLASSPATH=%CLASSPATH%;.;%GSDL3HOME%\WEB-INF\classes;%GSDL3SRCHOME%\resources\java;%GSDL3SRCHOME%\server.jar;%GSDL3HOME%\WEB-INF\lib\cp.jar;%GSDL3SRCHOME%\lib\jni\cp.jar;%GSDL3SRCHOME%\build\cp.jar;%GSDL3SRCHOME%\lib\java\cp.jar;%GSDL3SRCHOME%\admin\cp.jar;
37set PATH=%PATH%;%GSDL3SRCHOME%\bin;%GSDL3SRCHOME%\bin\script;%GSDL3SRCHOME%\lib\jni;%ANT_HOME%\bin
38
39:: a little dynamic set cp stuff
40if exist %TMP%\setcp.bat del %TMP%\setcp.bat
41for %%j in ("%TOMCAT_HOME%"\common\endorsed\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %TMP%\setcp.bat
42if exist %TMP%\setcp.bat call %TMP%\setcp.bat
43if exist %TMP%\setcp.bat del %TMP%\setcp.bat
44
45set GS_CP_SET=yes
46:skipSetCp
47
48:: ---- Search for java ----
49bin\search4j.exe -p "%CD%\packages\jre" -m %java_min_version% | winutil\setvar.exe _JRE_HOME > %TMP%\set_jre_home.bat
50call %TMP%\set_jre_home.bat
51del %TMP%\set_jre_home.bat
52
53echo %_JRE_HOME%\bin\java.exe | winutil\setvar.exe RUNJAVA > %TMP%\setrunjava.bat
54call %TMP%\setrunjava.bat
55del %TMP%\setrunjava.bat
56
57if "%JRE_HOME%" == "" set JRE_HOME=%_JRE_HOME%
58
59echo GSDL3SRCHOME : %GSDL3SRCHOME%
60echo GSDL3HOME    : %GSDL3HOME%
61echo JAVA         : %RUNJAVA%
Note: See TracBrowser for help on using the browser.