source: main/trunk/greenstone3/admin/gs3-admin.bat@ 22016

Last change on this file since 22016 was 22016, checked in by ak19, 11 years ago

Modified this script so that it can now be run from anywhere

File size: 1.7 KB
Line 
1
2@echo off
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
8pushd "%CD%"
9CD /D "%~dp0"
10set GAILANG=en
11
12set PROGNAME=Greenstone Administrator Interface
13set PROGABBR=GAI
14
15echo.
16if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
17if "%GLILANG%" == "en" echo Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato
18if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
19if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
20
21:: ---- Determine GSDL3HOME ----
22:setvars
23set GSDL3PATH=
24
25:: Some users may set the above line manually, or it may be set as an argument
26if not "%GSDL3PATH%" == "" goto setgsdl3
27 :: Check the environment variable first
28 if not "%GSDL3SRCHOME%" == "" set GSDL3PATH=%GSDL3SRCHOME%
29 if not "%GSDL3SRCHOME%" == "" goto setgsdl3
30
31 if "%GSDL3SRCHOME%" == "" set GSDL3PATH="%CD%"
32
33cd ..
34call gs3-setup.bat
35cd admin
36
37:setgsdl3
38:: Setup Greenstone3, unless it has already been done
39if "%GSDL3HOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul
40set GSDL3PATH=
41
42IF NOT "%_JDK_HOME%" == "" SET JAVA_HOME=%_JDK_HOME%
43IF NOT "%_JDK_HOME%" == "" SET CLASSPATH=%_JDK_HOME%\lib\tools.jar;%CLASSPATH%
44IF NOT "%_JDK_HOME%" == "" SET RUNJAVA=%_JDK_HOME%\bin\java.exe
45
46echo gsdl3srchome: %GSDL3SRCHOME%
47echo gsdl3srchome: %GSDL3HOME%
48echo javahome: %JAVA_HOME%
49echo classpath: %CLASSPATH%
50echo.
51
52:startup
53java -cp "%CLASSPATH%" org.greenstone.admin.GAI "%GSDL3SRCHOME%" "%GSDL3HOME%"
54
55:exit
56echo.
57popd
58:done
59:: ---- Clean up ----
Note: See TracBrowser for help on using the repository browser.