1 | @echo off
|
---|
2 | set GLILANG=en
|
---|
3 |
|
---|
4 |
|
---|
5 | :: -------- Run the Greenstone Librarian Interface --------
|
---|
6 |
|
---|
7 | :: This script must be run from within the directory in which it lives
|
---|
8 | if exist gli.bat goto start
|
---|
9 | if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
|
---|
10 | if "%GLILANG%" == "es" echo Este gui¢n deber ejecutarse desde el directorio en el que reside.
|
---|
11 | if "%GLILANG%" == "fr" echo Ce script doit tre excut
|
---|
12 | partir du rpertoire dans lequel il se trouve.
|
---|
13 | if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ® à ᯮ«®Š¥
|
---|
14 | goto exit
|
---|
15 |
|
---|
16 | :start
|
---|
17 | if "%OS%" == "Windows_NT" goto progName
|
---|
18 | :: Invoke a new command processor to ensure there's enough environment space
|
---|
19 | if "%1" == "Second" goto progName
|
---|
20 | command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
21 | goto done
|
---|
22 |
|
---|
23 |
|
---|
24 | :progName
|
---|
25 | if not "%PROGNAME%" == "" goto findGSDL
|
---|
26 | :: otherwise PROGNAME was not set, so default to the Greenstone Librarian Interface (GLI) program
|
---|
27 | if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Greenstone
|
---|
28 | if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Greenstone
|
---|
29 | if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Greenstone
|
---|
30 | :: if the PROGNAME is still not set, then set the language to English
|
---|
31 | if "%PROGNAME%" == "" set PROGNAME=Greenstone Librarian Interface
|
---|
32 |
|
---|
33 |
|
---|
34 | if "%PROGABBR%" == "" set PROGABBR=GLI
|
---|
35 | if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface
|
---|
36 |
|
---|
37 | :findGSDL
|
---|
38 | echo.
|
---|
39 | if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
|
---|
40 | if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
41 | if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
|
---|
42 | if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
|
---|
43 |
|
---|
44 | if "%GLILANG%" == "es" echo Interfaz de la %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
45 | if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
46 | if "%GLILANG%" == "es" echo La Interfaz de la %PROGNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
|
---|
47 | if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los trminos de la licencia en LICENSE.txt
|
---|
48 | if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
|
---|
49 |
|
---|
50 | if "%GLILANG%" == "fr" echo Interface du %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
51 | if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
52 | if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des dtails, voir LICENSE.txt
|
---|
53 | if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous tes invit
|
---|
54 | le redistribuer
|
---|
55 |
|
---|
56 | if "%GLILANG%" == "ru" echo š¡«š®â¥çë© šâ¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
57 | if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
58 | if "%GLILANG%" == "ru" echo ¥ € ¥â ; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
|
---|
59 | if "%GLILANG%" == "ru" echo â® - ᢮¡®€® à á¯à®áâà 塞®¥ ¯à®£à ¬¬®¥ ®¡¥á¯¥ç¥š¥ š ë ¬®Š¥â¥ à á¯à®áâà ïâì ¥£®
|
---|
60 |
|
---|
61 | echo.
|
---|
62 | :: ---- Determine path to Greenstone home for GS2 and GS3 ----
|
---|
63 | set GSDLPATH=
|
---|
64 | :: Some users may set the above line manually, or it may be set as an argument
|
---|
65 |
|
---|
66 | set _VERSION=
|
---|
67 | if not "%GSDLPATH%" == "" goto getVer
|
---|
68 | :: Otherwise gsdlpath is not yet set
|
---|
69 | :: Check the env vars first
|
---|
70 | if not "%GSDL3SRCHOME%" == "" goto ver3
|
---|
71 | if not "%GSDLHOME%" == "" goto ver2
|
---|
72 | :: If not set, the default location for the GLI is a subdirectory of Greenstone
|
---|
73 | set GSDLPATH=..
|
---|
74 | goto getVer
|
---|
75 |
|
---|
76 | :getVer
|
---|
77 | call gsdlver.bat %GSDLPATH% %_VERSION% > nul
|
---|
78 | if "%_VERSION%" == "1" goto exit
|
---|
79 | ::if we are running GS2, free up any pre-set GS3 environment variables since we won't need them
|
---|
80 | if "%_VERSION%" == "2" set GSDL3SRCHOME=
|
---|
81 | if "%_VERSION%" == "2" set GSDL3HOME=
|
---|
82 | goto testGSDL
|
---|
83 |
|
---|
84 |
|
---|
85 | :ver3
|
---|
86 | set _VERSION=3
|
---|
87 | set GSDLPATH=%GSDL3SRCHOME%
|
---|
88 | :: if GS2 is now also set, then both GS3 and GS2 are set:
|
---|
89 | :: warn the user that we have defaulted to GS3
|
---|
90 | if not "%GSDLHOME%" == "" echo Both Greenstone 2 and Greenstone 3 environments are set.
|
---|
91 | if not "%GSDLHOME%" == "" echo It is assumed you want to run Greenstone 3.
|
---|
92 | if not "%GSDLHOME%" == "" echo If you want to run Greenstone 2, please unset the
|
---|
93 | if not "%GSDLHOME%" == "" echo environment variable GSDL3SRCHOME before running GLI.
|
---|
94 | if not "%GSDLHOME%" == "" echo.
|
---|
95 | goto testGSDL
|
---|
96 |
|
---|
97 |
|
---|
98 | :ver2
|
---|
99 | set _VERSION=2
|
---|
100 | set GSDLPATH=%GSDLHOME%
|
---|
101 | ::free up the GS3 environment variables since we are running GS2 and don't need them
|
---|
102 | set GSDL3SRCHOME=
|
---|
103 | set GSDL3HOME=
|
---|
104 | goto testGSDL
|
---|
105 |
|
---|
106 |
|
---|
107 | :testGSDL
|
---|
108 | set CHECK=1
|
---|
109 | call chkinst.bat "%GSDLPATH%" %_VERSION% %GLILANG% %CHECK% > nul
|
---|
110 | if "%CHECK%" == "1" goto exit
|
---|
111 | :: otherwise installation worked well
|
---|
112 | goto prepGSDL
|
---|
113 |
|
---|
114 |
|
---|
115 | :prepGSDL
|
---|
116 | :: Greenstone 3 case
|
---|
117 | if "%_VERSION%" == "3" goto prepGS3
|
---|
118 |
|
---|
119 | if not "%_VERSION%" == "2" echo "Greenstone version unknown"
|
---|
120 | if not "%_VERSION%" == "2" goto :exit
|
---|
121 |
|
---|
122 | :: Otherwise, we are dealing with Greenstone 2
|
---|
123 | :: Setup Greenstone 2, unless it has already been done
|
---|
124 | if not "%GSDLHOME%" == "" goto doneGSDL
|
---|
125 | call "%GSDLPATH%\setup.bat" SetEnv > nul
|
---|
126 | goto doneGSDL
|
---|
127 |
|
---|
128 |
|
---|
129 | :prepGS3
|
---|
130 | set GSDL2PATH=
|
---|
131 | : Some users may set the above line manually
|
---|
132 |
|
---|
133 | if "%GSDL3SRCHOME%" == "" goto setup3
|
---|
134 | if "%GSDL3HOME%" == "" goto setup3
|
---|
135 | ::otherwise
|
---|
136 | goto gs2build
|
---|
137 |
|
---|
138 |
|
---|
139 | :setup3
|
---|
140 | :: Setup Greenstone 3, unless it has already been done
|
---|
141 | cd | winutil\setvar.exe GLIDIR > %TMP%\setgli.bat
|
---|
142 | call %TMP%\setgli.bat
|
---|
143 | del %TMP%\setgli.bat
|
---|
144 | cd "%GSDLPATH%"
|
---|
145 | call gs3-setup.bat SetEnv > nul
|
---|
146 | cd %GLIDIR%
|
---|
147 | goto gs2build
|
---|
148 |
|
---|
149 |
|
---|
150 | :gs2build
|
---|
151 | :: If Greenstone version 3 is running, we want to set gsdl2path
|
---|
152 | :: Determine GSDLHOME for GS3
|
---|
153 | if not "%GSDL2PATH%" == "" goto setupGS2
|
---|
154 | :: GSDL2PATH is not yet set.
|
---|
155 | :: And if GSDLHOME is not set either, then assume
|
---|
156 | :: that the gs2build subdir of GS3 exists
|
---|
157 | if "%GSDLHOME%" == "" set GSDL2PATH=%GSDL3SRCHOME%\gs2build
|
---|
158 | if "%GSDLHOME%" == "" goto setupGS2
|
---|
159 | :: Otherwise GSDLHOME is set, so set GSDL2PATH to GSDLHOME
|
---|
160 | echo GSDLHOME environment variable is set to %GSDLHOME%.
|
---|
161 | echo Will use this to find build scripts.
|
---|
162 | set GSDL2PATH=%GSDLHOME%
|
---|
163 |
|
---|
164 | :setupGS2
|
---|
165 | set CHECK=1
|
---|
166 | call chkinst.bat "%GSDL2PATH%" 2 %GLILANG% %CHECK% > nul
|
---|
167 | if "%CHECK%" == "1" goto exit
|
---|
168 | :: otherwise installation worked well
|
---|
169 | :: Setup Greenstone, unless it has already been done
|
---|
170 | if "%GSDLHOME%" == "" call "%GSDL2PATH%\setup.bat" SetEnv > nul
|
---|
171 | :: Either way, we can now dispose of GSDL2PATH
|
---|
172 | set GSDL2PATH=
|
---|
173 | goto doneGSDL
|
---|
174 |
|
---|
175 |
|
---|
176 | :doneGSDL
|
---|
177 | :: GSDLPATH is no longer needed, since GSDLHOME should now be set
|
---|
178 | set GSDLPATH=
|
---|
179 |
|
---|
180 |
|
---|
181 | :findPerl
|
---|
182 | :: ---- Check Perl exists ----
|
---|
183 | set PERLPATH=
|
---|
184 |
|
---|
185 | :: Some users may set the above line manually - If you do this, you need to
|
---|
186 | :: make sure that perl is in your path otherwise lucene collections may not
|
---|
187 | :: work
|
---|
188 | if not "%PERLPATH%" == "" goto testPerl
|
---|
189 |
|
---|
190 | :: Check if Perl is on the search path
|
---|
191 | echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
|
---|
192 | call %TMP%\setperl.bat
|
---|
193 | del %TMP%\setperl.bat
|
---|
194 | if not "%PERLPATH%" == "" goto testPerl
|
---|
195 |
|
---|
196 | :: If not, try GSDLHOME\bin\windows\perl\bin
|
---|
197 | if exist "%GSDLHOME%\bin\windows\perl\bin\perl.exe" goto gsdlPerl
|
---|
198 |
|
---|
199 | :: Still haven't found anything, so try looking in the registry (gulp!)
|
---|
200 | type nul > %TMP%\perl.reg
|
---|
201 | regedit /E %TMP%\perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
|
---|
202 | type %TMP%\perl.reg > %TMP%\perl.txt
|
---|
203 | del %TMP%\perl.reg
|
---|
204 |
|
---|
205 | winutil\findperl.exe %TMP%\perl.txt | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
|
---|
206 | del %TMP%\perl.txt
|
---|
207 | call %TMP%\setperl.bat
|
---|
208 | del %TMP%\setperl.bat
|
---|
209 |
|
---|
210 | :: If nothing was found in the registry, we're stuck
|
---|
211 | if "%PERLPATH%" == "" goto noPerl
|
---|
212 |
|
---|
213 | :: if have found perl in registry, but not in path, then we need to
|
---|
214 | :: add it to path for lucene stuff.
|
---|
215 | if "%OS%" == "Windows_NT" set PATH=%PATH%;%PERLPATH%
|
---|
216 | if "%OS%" == "" set PATH="%PATH%";"%PERLPATH%"
|
---|
217 | goto testPerl
|
---|
218 |
|
---|
219 | :gsdlPerl
|
---|
220 | set PERLPATH=%GSDLHOME%\bin\windows\perl\bin
|
---|
221 |
|
---|
222 | :testPerl
|
---|
223 | :: Check that a Perl executable has been found
|
---|
224 | if not exist "%PERLPATH%\perl.exe" goto noPerl
|
---|
225 | echo PERL:
|
---|
226 | echo %PERLPATH%
|
---|
227 | echo.
|
---|
228 |
|
---|
229 | goto findJava
|
---|
230 |
|
---|
231 | :noPerl
|
---|
232 | echo.
|
---|
233 | if "%GLILANG%" == "en" echo The Greenstone Librarian Interface requires Perl in order to operate,
|
---|
234 | if "%GLILANG%" == "en" echo but Perl could not be detected on your system. Please ensure that Perl
|
---|
235 | if "%GLILANG%" == "en" echo is installed and is on your search path, then try again.
|
---|
236 |
|
---|
237 | if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone requiere Perl para poder
|
---|
238 | if "%GLILANG%" == "es" echo operar, pero ste no aparece en su sistema. Por favor aseg£rese de
|
---|
239 | if "%GLILANG%" == "es" echo que Perl est instalado y se encuentra en su ruta de b£squeda.
|
---|
240 | if "%GLILANG%" == "es" echo A continuaci¢n ejecute nuevamente este gui¢n.
|
---|
241 |
|
---|
242 | if "%GLILANG%" == "fr" echo Greenstone Librarian Interface ncessite perl pour son fonctionnement,
|
---|
243 | if "%GLILANG%" == "fr" echo mais perl n'a pas pu tre dtect dans votre systme. Veuillez vous
|
---|
244 | if "%GLILANG%" == "fr" echo assurer que perl est install et est spcifi dans votre chemin de
|
---|
245 | if "%GLILANG%" == "fr" echo recherche, puis redmarrez ce script.
|
---|
246 |
|
---|
247 | if "%GLILANG%" == "ru" echo š¡«š®â¥çë© šâ¥à䥩á Greenstone âॡã¥â Perl, çâ®¡ë š¬¥âì ¢®§¬®Š®áâì
|
---|
248 | if "%GLILANG%" == "ru" echo à ¡®â âì, ® Perl ¥ ¡ë« ¢ ¢ 襩 ášá⥬¥. ®Š «ã©áâ , ¯®€â¢¥à€šâ¥,
|
---|
249 | if "%GLILANG%" == "ru" echo çâ® Perl ãáâ ®¢«¥ š 宀šâáï ¢ 襬 ¯ãâš ¯®šáª , § ⥬
|
---|
250 | if "%GLILANG%" == "ru" echo ¯®¢â®à®¢¢¥€šâ¥ íâ®â áªàš¯â.
|
---|
251 | goto exit
|
---|
252 |
|
---|
253 |
|
---|
254 | :findJava
|
---|
255 | if "%_VERSION%" == "2" (
|
---|
256 | set SEARCH4J_EXECUTABLE=%GSDLHOME%\bin\windows\search4j.exe
|
---|
257 | set HINT=%GSDLHOME%\packages\jre
|
---|
258 | )
|
---|
259 | if "%_VERSION%" == "3" (
|
---|
260 | set SEARCH4J_EXECUTABLE=%GSDL3SRCHOME%\bin\search4j.exe
|
---|
261 | set HINT=%GSDL3SRCHOME%\packages\jre
|
---|
262 | )
|
---|
263 |
|
---|
264 | "%SEARCH4J_EXECUTABLE%" -e -m "1.4.0_00" -p "%HINT%" | winutil\setvar.exe JAVA_EXECUTABLE > %TMP%\set_java_executable.bat
|
---|
265 | call "%TMP%\set_java_executable.bat"
|
---|
266 | del "%TMP%\set_java_executable.bat"
|
---|
267 |
|
---|
268 | if "%JAVA_EXECUTABLE%" == "" goto noJava
|
---|
269 | echo Java:
|
---|
270 | echo %JAVA_EXECUTABLE%
|
---|
271 | echo.
|
---|
272 |
|
---|
273 | goto checkGLI
|
---|
274 |
|
---|
275 | :noJava
|
---|
276 | echo.
|
---|
277 | if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
|
---|
278 | if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
|
---|
279 | if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
|
---|
280 |
|
---|
281 | if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber
|
---|
282 | if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior)
|
---|
283 | if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
|
---|
284 |
|
---|
285 | if "%GLILANG%" == "fr" echo Une version ad?quate de Java n'a pas pu ?tre localis?e. Vous devez
|
---|
286 | if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup?rieur)
|
---|
287 | if "%GLILANG%" == "fr" echo avant de d?marrer Greenstone Librarian Interface.
|
---|
288 |
|
---|
289 | if "%GLILANG%" == "ru" echo ¥ ã «®áì ®¯à¥¥«âì ¬¥á⮠宥¥ ᮮ⢥âáâ¢ãî饩 ¢¥àá Java.
|
---|
290 | if "%GLILANG%" == "ru" echo ?ë ®«ë ãáâ ®¢âì Java Runtime Environment (¢¥àáî 1.4 « ¢ëè¥) ¯¥à¥ ¢¢®®¬
|
---|
291 | if "%GLILANG%" == "ru" echo ¡¡«®â¥ç®£® â¥à䥩á Greenstone.
|
---|
292 | goto exit
|
---|
293 |
|
---|
294 | :checkGLI
|
---|
295 | :: ---- Check that the GLI has been compiled ----
|
---|
296 | if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
|
---|
297 | if exist "GLI.jar" goto runGLI
|
---|
298 | echo.
|
---|
299 | if "%GLILANG%" == "en" echo You need to compile the Greenstone Librarian Interface (using makegli.bat)
|
---|
300 | if "%GLILANG%" == "en" echo before running this script.
|
---|
301 |
|
---|
302 | if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone
|
---|
303 | if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
|
---|
304 |
|
---|
305 | if "%GLILANG%" == "fr" echo Vous devez compiler le Greenstone Interface (en utilisant makegli.bat)
|
---|
306 | if "%GLILANG%" == "fr" echo avant d'excuter ce script.
|
---|
307 |
|
---|
308 | if "%GLILANG%" == "ru" echo ë €®«Šë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥çë© šâ¥à䥩á Greenstone (šá¯®«ì§ãï makegli.bat)
|
---|
309 | if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â
|
---|
310 | goto exit
|
---|
311 |
|
---|
312 |
|
---|
313 | :runGLI
|
---|
314 |
|
---|
315 | if not "%_VERSION%" == "" (
|
---|
316 | echo Greenstone Major Version:
|
---|
317 | echo %_VERSION%
|
---|
318 | echo.
|
---|
319 | )
|
---|
320 |
|
---|
321 | if not "%GSDL3SRCHOME%" == "" (
|
---|
322 | echo GSDL3SRCHOME:
|
---|
323 | echo %GSDL3SRCHOME%
|
---|
324 | echo.
|
---|
325 | )
|
---|
326 |
|
---|
327 | if not "%GSDL3HOME%" == "" (
|
---|
328 | echo GSDL3HOME:
|
---|
329 | echo %GSDL3HOME%
|
---|
330 | echo.
|
---|
331 | )
|
---|
332 |
|
---|
333 | if not "%GSDLHOME%" == "" (
|
---|
334 | echo GSDLHOME:
|
---|
335 | echo %GSDLHOME%
|
---|
336 | echo.
|
---|
337 | )
|
---|
338 |
|
---|
339 | :: ---- Explain how to bypass Imagemagick and Ghostscript bundled with Greenstone if needed ----
|
---|
340 | echo.
|
---|
341 | if exist "%GSDLHOME%\bin\windows\ghostscript\bin\*.*" echo GhostScript bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%\bin\windows and rename the folder called ghostscript to something else.
|
---|
342 | echo.
|
---|
343 | echo.
|
---|
344 | if exist "%GSDLHOME%\bin\windows\imagemagick\*.*" echo ImageMagick bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%\bin\windows and rename the folder called imagemagick to something else.
|
---|
345 | echo.
|
---|
346 | echo.
|
---|
347 |
|
---|
348 |
|
---|
349 | :: ---- Finally, run the GLI ----
|
---|
350 | if "%GLILANG%" == "en" echo Running the %PROGNAME%...
|
---|
351 | if "%GLILANG%" == "es" echo Ejecutando la %PROGNAME%...
|
---|
352 | if "%GLILANG%" == "fr" echo Excution de %PROGNAME%
|
---|
353 | if "%GLILANG%" == "ru" echo ¥ªãéš© ¡š¡«š %PROGNAME%...
|
---|
354 |
|
---|
355 | :: -Xms32M To set minimum memory
|
---|
356 | :: -Xmx32M To set maximum memory
|
---|
357 | :: -verbose:gc To set garbage collection messages
|
---|
358 | :: -Xincgc For incremental garbage collection
|
---|
359 | :: -Xprof Function call profiling
|
---|
360 | :: -Xloggc:<file> Write garbage collection log
|
---|
361 |
|
---|
362 |
|
---|
363 | :: Run GS3 if version = 3
|
---|
364 | if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
365 | if "%_VERSION%" == "3" goto finRun
|
---|
366 |
|
---|
367 | :: Run GS2 since version is 2:
|
---|
368 | :: if FLI is running, we don't want the local Greenstone library server running
|
---|
369 | if "%PROGABBR%" == "FLI" goto webLib
|
---|
370 | :: Else we're running GLI, so we want the local Greenstone library server (if server.exe exists, otherwise it will be webLib)
|
---|
371 | if exist "%GSDLHOME%\server.exe" goto localLib
|
---|
372 |
|
---|
373 | :webLib
|
---|
374 | "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
375 | if ERRORLEVEL 2 if not "%localLibFailed%" == "true" (
|
---|
376 | echo webLib failed, going to localLib
|
---|
377 | set webLibFailed=true
|
---|
378 | goto localLib
|
---|
379 | )
|
---|
380 | goto finRun
|
---|
381 |
|
---|
382 | :localLib
|
---|
383 | "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
384 | if ERRORLEVEL 2 if not "%webLibFailed%" == "true" (
|
---|
385 | echo localLib failed, going to webLib
|
---|
386 | set localLibFailed=true
|
---|
387 | goto webLib
|
---|
388 | )
|
---|
389 | goto finRun
|
---|
390 |
|
---|
391 |
|
---|
392 | :finRun
|
---|
393 | if "%GLILANG%" == "en" echo Done!
|
---|
394 | if "%GLILANG%" == "es" echo Hecho!
|
---|
395 | if "%GLILANG%" == "fr" echo Termin!
|
---|
396 | if "%GLILANG%" == "ru" echo 믮«¥®!
|
---|
397 | goto done
|
---|
398 |
|
---|
399 |
|
---|
400 | :exit
|
---|
401 | echo.
|
---|
402 | pause
|
---|
403 |
|
---|
404 | :done
|
---|
405 | :: ---- Clean up ----
|
---|
406 | set PERLPATH=
|
---|
407 | set JAVA_EXECUTABLE=
|
---|