source: greenstone3/trunk/admin/gs3-admin.bat@ 18203

Last change on this file since 18203 was 18203, checked in by cc108, 12 years ago

Allow the user to use a JDk instead of a JRE.

File size: 2.5 KB
Line 
1@echo off
2
3
4:: If you wish to use a JDK instead of the provided JRE then please use the line below
5:: e.g. set _JDK_HOME=C:\Program Files\Java\jdk1.6.0_10
6set _JDK_HOME=
7
8
9
10set GAILANG=en
11
12
13
14set PROGNAME=Greenstone Administrator Interface
15set PROGABBR=GAI
16
17echo.
18if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
19if "%GLILANG%" == "en" echo Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato
20if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
21if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
22
23:: -------- Run the Greenstone Administrator Interface --------
24
25:: This script must be run from within the directory in which it lives
26if exist gs3-admin.bat goto setvars
27 if "%GAILANG%" == "en" echo This script must be run from the directory in which it resides.
28 if "%GAILANG%" == "es" echo Este guiᅵn deberᅵ ejecutarse desde el directorio en el que reside.
29 if "%GLILANG%" == "es" echo Este guiᅵn deberᅵ ejecutarse desde el directorio en el que reside.
30 if "%GLILANG%" == "fr" echo Ce script doit ᅵtre exᅵcutᅵ ᅵ partir du rᅵpertoire dans lequel il se trouve.
31 if "%GLILANG%" == "ru" echo ᅵᅵᅵᅵ ï¿œï¿œàš¯ï¿œ ᅵᅵᅵᅵᅵᅵ ᅵᅵᅵᅵ ᅵᅵᅵᅵ ᅵᅵ ï¿œï¿œà¥ªï¿œï¿œàšš, ï¿œ ᅵᅵᅵᅵன ᅵᅵ ᅵᅵᯮᅵᅵᅵᅵᅵ
32 goto exit
33
34
35:: ---- Determine GSDL3HOME ----
36:setvars
37set GSDL3PATH=
38
39:: Some users may set the above line manually, or it may be set as an argument
40if not "%GSDL3PATH%" == "" goto setgsdl3
41 :: Check the environment variable first
42 if not "%GSDL3SRCHOME%" == "" set GSDL3PATH=%GSDL3SRCHOME%
43 if not "%GSDL3SRCHOME%" == "" goto setgsdl3
44 echo **** I am HERE
45 if "%GSDL3SRCHOME%" == "" set GSDL3PATH="%CD%"
46
47cd ..
48call gs3-setup.bat
49cd admin
50
51:setgsdl3
52:: Setup Greenstone3, unless it has already been done
53if "%GSDL3HOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul
54set GSDL3PATH=
55
56IF NOT "%_JDK_HOME%" == "" SET JAVA_HOME=%_JDK_HOME%
57IF NOT "%_JDK_HOME%" == "" SET CLASSPATH=%_JDK_HOME%\lib\tools.jar;%CLASSPATH%
58IF NOT "%_JDK_HOME%" == "" SET RUNJAVA=%_JDK_HOME%\bin\java.exe
59
60echo gsdl3srchome: %GSDL3SRCHOME%
61echo gsdl3srchome: %GSDL3HOME%
62echo javahome: %JAVA_HOME%
63echo classpath: %CLASSPATH%
64echo.
65
66:startup
67java -cp "%CLASSPATH%" org.greenstone.admin.GAI "%GSDL3SRCHOME%" "%GSDL3HOME%"
68
69:exit
70echo.
71pause
72
73:done
74:: ---- Clean up ----
75
76
77
78
79
80
Note: See TracBrowser for help on using the repository browser.