root/gli/trunk/client-gli.bat @ 19381

Revision 19381, 6.0 KB (checked in by ak19, 11 years ago)

Minor spelling correction before major changes get committed

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