source: gli/trunk/client-gli.bat@ 19355

Last change on this file since 19355 was 19353, checked in by ak19, 15 years ago

Updated client-gli.bat and findjava.bat. Now client-gli uses the same logic to find Java as gli.bat. Previously client-gli would resort to looking in the registry since there was no search4j in GLI. Now there is, and only svn versions of gli-only checkouts won't have a search4j (compiled up). findjava.bat now looks for search4j to get Java, otherwise it looks for JAVA_HOME to be set--to any Java--and uses that after printing a warning message to the user. Finally, if there is neither a search4j nor any JAVA_HOME set, then it exits.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1@echo off
2pushd "%CD%"
3CD /D "%~dp0"
4set GLILANG=en
5
6if "%PROGNAME" == "" set PROGNAME=Greenstone
7
8if not "%PROGFULLNAME" == "" goto setvars
9if "%GLILANG%" == "es" set PROGFULLNAME="Biblioteca Digital Greenstone"
10if "%GLILANG%" == "fr" set PROGFULLNAME="Bibliothécaire Greenstone"
11if "%GLILANG%" == "ru" set PROGFULLNAME="ÉÎÔÅÒÆÅÊÓ Greenstone"
12:: if the PROGFULLNAME is still not set, then set the language to English
13if "%PROGFULLNAME%" == "" set PROGNAME=Greenstone Digital Library
14
15
16:setvars
17if "%PROGABBR%" == "" set PROGABBR=GLI
18if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface
19
20:: -------- Run the Greenstone Librarian Interface --------
21
22:: This script must be run from within the directory in which it lives
23if exist client-gli.bat goto start
24 if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
25 if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
26 if "%GLILANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ …
27 partir du r‚pertoire dans lequel il se trouve.
28 if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
29 goto exit
30
31:start
32if "%OS%" == "Windows_NT" goto findGSDL
33 :: Invoke a new command processor to ensure there's enough environment space
34 if "%1" == "Second" goto findGSDL
35 command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
36 goto done
37
38:findGSDL
39echo.
40if "%GLILANG%" == "en" echo %PROGNAME_EN% (%PROGABBR%)
41if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
42if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
43if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
44
45if "%GLILANG%" == "es" echo Interfaz de la %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%)
46if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
47if "%GLILANG%" == "es" echo La Interfaz de la %PROGFULLNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
48if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt
49if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
50
51if "%GLILANG%" == "fr" echo Interface du %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%)
52if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
53if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt
54if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚ …
55 le redistribuer
56
57if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
58if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
59if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
60if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£®
61
62
63:: If there's a gs2build directory is nested inside client-gli, then we
64:: can download and build locally, but ONLY if we have perl. Else building
65:: will have to be done remotely. If Perl is found, PERLPATH will be set.
66if not exist gs2build\nul goto findJava
67 call findperl.bat
68
69:findJava
70:: Need to find Java. If found, JAVA_EXECUTABLE will be set
71call findjava.bat
72if "%JAVA_EXECUTABLE%" == "" goto exit
73
74:checkGLI
75:: ---- Check that the GLI has been compiled ----
76if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
77if exist "GLI.jar" goto runGLI
78 echo.
79 if "%GLILANG%" == "en" echo You need to compile the %PROGNAME_EN% (using makegli.bat)
80 if "%GLILANG%" == "en" echo before running this script.
81
82 if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la %PROGFULLNAME%
83 if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
84
85 if "%GLILANG%" == "fr" echo Vous devez compiler le %PROGNAME% Interface (en utilisant makegil.bat)
86 if "%GLILANG%" == "fr" echo avant d'ex‚cuter ce script.
87
88 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (šá¯®«ì§ãï makegli.bat)
89 if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â 
90 goto exit
91
92
93:runGLI
94:: ---- Finally, run the GLI ----
95echo.
96
97
98if "%GLILANG%" == "en" echo Running the %PROGNAME_EN%...
99if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la %PROGFULLNAME%...
100if "%GLILANG%" == "fr" echo Ex‚cution de %PROGNAME_EN%
101if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME%...
102
103:: -Xms32M To set minimum memory
104:: -Xmx32M To set maximum memory
105:: -verbose:gc To set garbage collection messages
106:: -Xincgc For incremental garbage collection
107:: -Xprof Function call profiling
108:: -Xloggc:<file> Write garbage collection log
109
110
111:: If there was a gs2build directory inside the client-gli folder, we'd have looked for Perl.
112:: If we had found Perl, PERLPATH would have been set. If no perl, can't download or build locally
113:: on the client side. If we have Perl, pass the gs2build dir with the -gsdl flag and the PERLPATH.
114if "%PERLPATH%" == "" goto :nogsdl
115 "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl %~dp0gs2build -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
116 goto finish
117
118:nogsdl
119"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone %1 %2 %3 %4 %5 %6 %7 %8 %9
120
121:finish
122if "%GLILANG%" == "en" echo Done!
123if "%GLILANG%" == "es" echo ­Hecho!
124if "%GLILANG%" == "fr" echo Termin‚!
125if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
126goto done
127
128:exit
129echo.
130pause
131
132:done
133:: ---- Clean up ----
134set PERLPATH=
135set JAVAPATH=
136set JAVA_EXECUTABLE=
137popd
Note: See TracBrowser for help on using the repository browser.