source: gli/trunk/client-gli4gs3.bat@ 16343

Last change on this file since 16343 was 16343, checked in by ak19, 13 years ago

Intermediate file to keep client-gli working. Now this file works for both GS3 and GS2 remote servers

  • Property svn:executable set to *
File size: 7.2 KB
Line 
1@echo off
2set 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
8if exist client-gli4gs3.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 ex‚cut‚ …
12 partir du r‚pertoire dans lequel il se trouve.
13 if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
14 goto exit
15
16:start
17if "%OS%" == "Windows_NT" goto findGSDL
18 :: Invoke a new command processor to ensure there's enough environment space
19 if "%1" == "Second" goto findGSDL
20 command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
21 goto done
22
23:findGSDL
24echo.
25if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI)
26if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
27if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
28if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
29
30if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)
31if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
32if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
33if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt
34if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
35
36if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI)
37if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
38if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt
39if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚ …
40 le redistribuer
41
42if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI)
43if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
44if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
45if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£®
46
47
48:findJava
49:: ---- Check Java exists ----
50set JAVAPATH=
51
52:: Some users may set the above line manually
53if not "%JAVAPATH%" == "" goto testJava
54
55 :: If it is set, use the JAVA_HOME environment variable
56 if not "%JAVA_HOME%" == "" goto javahome
57
58 :: Check if Java is on the search path
59 echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
60 call setjava.bat
61 del setjava.bat
62 if not "%JAVAPATH%" == "" goto testJava
63
64 :: Still haven't found anything, so try looking in the registry (gulp!)
65 type nul > jdk.reg
66 regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
67 type jdk.reg > jdk.txt
68 del jdk.reg
69 type nul > jre.reg
70 regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
71 type jre.reg > jre.txt
72 del jre.reg
73
74 winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat
75 del jdk.txt
76 del jre.txt
77 call setjava.bat
78 del setjava.bat
79
80 :: If nothing was found in the registry, we're stuck
81 if "%JAVAPATH%" == "" goto noJava
82
83 set JAVAPATH=%JAVAPATH%\bin
84 goto testJava
85
86:javahome
87 set JAVAPATH=%JAVA_HOME%\bin
88
89:testJava
90:: Check that a Java executable has been found
91if "%GLILANG%" == "en" echo Checking Java: %JAVAPATH%
92if "%GLILANG%" == "es" echo Revisando Java: %JAVAPATH%
93if "%GLILANG%" == "fr" echo V‚rification de Java: %JAVAPATH%
94if "%GLILANG%" == "ru" echo à®¢¥àª  Java: %JAVAPATH%
95if exist "%JAVAPATH%\java.exe" goto checkGLI
96
97:noJava
98 echo.
99 if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
100 if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
101 if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
102
103 if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber 
104 if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior)
105 if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
106
107 if "%GLILANG%" == "fr" echo Une version ad‚quate de Java n'a pas pu ˆtre localis‚e. Vous devez
108 if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup‚rieur)
109 if "%GLILANG%" == "fr" echo avant de d‚marrer Greenstone Librarian Interface.
110
111 if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Java.
112 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬
113 if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone.
114 goto exit
115
116
117:checkGLI
118:: ---- Check that the GLI has been compiled ----
119if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
120if exist "GLI.jar" goto runGLI
121 echo.
122 if "%GLILANG%" == "en" echo You need to compile the Greenstone Librarian Interface (using makegli.bat)
123 if "%GLILANG%" == "en" echo before running this script.
124
125 if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone
126 if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
127
128 if "%GLILANG%" == "fr" echo Vous devez compiler le Greenstone Interface (en utilisant makegil.bat)
129 if "%GLILANG%" == "fr" echo avant d'ex‚cuter ce script.
130
131 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (šá¯®«ì§ãï makegli.bat)
132 if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â 
133 goto exit
134
135
136:runGLI
137:: ---- Finally, run the GLI ----
138echo.
139
140
141if "%GLILANG%" == "en" echo Running the Greenstone Librarian Interface...
142if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la Biblioteca Digital Greenstone...
143if "%GLILANG%" == "fr" echo Ex‚cution de Greenstone Librarian Interface
144if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone...
145
146:: -Xms32M To set minimum memory
147:: -Xmx32M To set maximum memory
148:: -verbose:gc To set garbage collection messages
149:: -Xincgc For incremental garbage collection
150:: -Xprof Function call profiling
151:: -Xloggc:<file> Write garbage collection log
152
153"%JAVAPATH%\java" -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
154
155if "%GLILANG%" == "en" echo Done!
156if "%GLILANG%" == "es" echo ­Hecho!
157if "%GLILANG%" == "fr" echo Termin‚!
158if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
159goto done
160
161:exit
162echo.
163pause
164
165:done
166:: ---- Clean up ----
167set JAVAPATH=
Note: See TracBrowser for help on using the repository browser.