source: main/trunk/gli/client-gli.bat@ 24806

Last change on this file since 24806 was 19391, checked in by ak19, 15 years ago

Cosmetic corrections after the previous major commit.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1@echo off
2pushd "%CD%"
3CD /D "%~dp0"
4set GLILANG=en
5set GLIMODE=client
6
7if "%PROGNAME%" == "" set PROGNAME=Greenstone
8
9if not "%PROGFULLNAME%" == "" goto setvars
10if "%GLILANG%" == "es" set PROGFULLNAME="Biblioteca Digital Greenstone"
11if "%GLILANG%" == "fr" set PROGFULLNAME="Bibliothécaire Greenstone"
12if "%GLILANG%" == "ru" set PROGFULLNAME="ÉÎÔÅÒÆÅÊÓ Greenstone"
13:: if the PROGFULLNAME is still not set, then set the language to English
14if "%PROGFULLNAME%" == "" set PROGNAME=Greenstone Digital Library
15
16
17:setvars
18if "%PROGABBR%" == "" set PROGABBR=GLI
19if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface
20
21:: -------- Run the Greenstone Librarian Interface --------
22
23:: This script must be run from within the directory in which it lives
24if exist client-gli.bat goto start
25 if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
26 if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
27 if "%GLILANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ …
28 partir du r‚pertoire dans lequel il se trouve.
29 if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
30 goto exit
31
32:start
33if "%OS%" == "Windows_NT" goto findGSDL
34 :: Invoke a new command processor to ensure there's enough environment space
35 if "%1" == "Second" goto findGSDL
36 command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
37 goto done
38
39:findGSDL
40:: Try to detect a local GSDLHOME installation (gs2build). If none can be
41:: found, then client-gli won't have a download panel. We're calling
42:: findgsdl.bat purely for knowing if there's a GSDLHOME around and to set and
43:: use that for downloading. If there IS a local GSDLHOME, then we can download
44:: (and build) locally, but ONLY if we have perl. Else downloading and building
45:: will have to be done remotely anyway. If Perl is found, PERLPATH will be set.
46call findgsdl.bat
47if "%GSDLHOME%" == "" goto findJava
48 call findperl.bat
49
50:findJava
51:: Need to find Java. If found, JAVA_EXECUTABLE will be set
52call findjava.bat
53if "%JAVA_EXECUTABLE%" == "" goto exit
54
55:checkGLI
56:: ---- Check that the GLI has been compiled ----
57if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
58if exist "GLI.jar" goto runGLI
59 echo.
60 if "%GLILANG%" == "en" echo You need to compile the %PROGNAME_EN% (using makegli.bat)
61 if "%GLILANG%" == "en" echo before running this script.
62
63 if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la %PROGFULLNAME%
64 if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
65
66 if "%GLILANG%" == "fr" echo Vous devez compiler le %PROGNAME% Interface (en utilisant makegil.bat)
67 if "%GLILANG%" == "fr" echo avant d'ex‚cuter ce script.
68
69 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (šá¯®«ì§ãï makegli.bat)
70 if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â 
71 goto exit
72
73
74:runGLI
75:: ---- Finally, run the GLI ----
76echo.
77
78
79if "%GLILANG%" == "en" echo Running the %PROGNAME_EN%...
80if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la %PROGFULLNAME%...
81if "%GLILANG%" == "fr" echo Ex‚cution de %PROGNAME_EN%
82if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME%...
83
84:: -Xms32M To set minimum memory
85:: -Xmx32M To set maximum memory
86:: -verbose:gc To set garbage collection messages
87:: -Xincgc For incremental garbage collection
88:: -Xprof Function call profiling
89:: -Xloggc:<file> Write garbage collection log
90
91
92:: If there's a local GS2 installation (GSDLHOME set), we'd have looked for Perl. If we had
93:: found Perl, PERLPATH would have been set. If no perl, can't download or build locally on
94:: the client side. If we have Perl, pass in GSDLHOME for the -gsdl option and the PERLPATH.
95if "%PERLPATH%" == "" goto nogsdl
96 echo Perl and GSDLHOME (%GSDLHOME%) detected. Downloading is enabled.
97 echo.
98 "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "%GSDLHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
99 goto finish
100
101:nogsdl
102echo Since there's no GSDLHOME, client-GLI's download panel will be deactivated.
103"%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
104
105:finish
106if "%GLILANG%" == "en" echo Done!
107if "%GLILANG%" == "es" echo ­Hecho!
108if "%GLILANG%" == "fr" echo Termin‚!
109if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
110goto done
111
112:exit
113echo.
114pause
115
116:done
117:: ---- Clean up ----
118set PERLPATH=
119set JAVA_EXECUTABLE=
120set GLIMODE=
121set PROGNAME=
122set PROGNAME_EN=
123set PROGFULLNAME=
124set PROGABBR=
125popd
Note: See TracBrowser for help on using the repository browser.