root/gli/trunk/client-gli4gs3.bat @ 16343

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