source: main/trunk/gli/gems.bat@ 22343

Last change on this file since 22343 was 22343, checked in by sjm84, 14 years ago

Did the same modifications as gems.sh: update gems.bat to use findgsdl.bat and findjava.bat

  • Property svn:mime-type set to application/octet-stream
File size: 4.0 KB
Line 
1@echo off
2color 0A
3pushd "%CD%"
4CD /D "%~dp0"
5set GLILANG=en
6
7
8:: -------- Run the Greenstone Librarian Interface --------
9
10:: This script must be run from within the directory in which it lives
11if exist gems.bat goto start
12 if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
13 if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
14 if "%GLILANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ …
15 partir du r‚pertoire dans lequel il se trouve.
16 if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
17 goto exit
18
19:start
20if "%OS%" == "Windows_NT" goto progName
21 :: Invoke a new command processor to ensure there's enough environment space
22 if "%1" == "Second" goto progName
23 command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
24 goto done
25
26
27:progName
28if "%GLILANG%" == "es" set PROGNAME=Editar conjuntos de metadatos
29if "%GLILANG%" == "fr" set PROGNAME=Editer les jeux de méta-données
30if "%GLILANG%" == "ru" set PROGNAME=Ðåäàêòèðîâàòü íàáîðû ìåòàäàííûõ
31:: if the PROGNAME is still not set, then set the language to English
32if "%PROGNAME%" == "" set PROGNAME=Greenstone Editor for Metadata Sets
33
34if "%PROGABBR%" == "" set PROGABBR=GEMS
35if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Editor for Metadata Sets
36
37:: Now need to work out the _VERSION, GSDLHOME (and if GS3, then GSDL3SRCHOME and GSDL3HOME)
38:findGSDL
39call findgsdl.bat
40if "%GSDLHOME%" == "" goto exit
41
42:: Need to find Java. If found, JAVA_EXECUTABLE will be set
43call findjava.bat
44if "%JAVA_EXECUTABLE%" == "" goto exit
45
46
47:chkGEMS
48:: ---- Check that the GEMS has been compiled ----
49if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGEMS
50if exist "GLI.jar" goto runGEMS
51 echo.
52 if "%GLILANG%" == "en" echo You need to compile the %PROGNAME% (using makegli.bat)
53 if "%GLILANG%" == "en" echo before running this script.
54
55 if "%GLILANG%" == "es" echo Usted necesita compilar la %PROGNAME%
56 if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
57
58 if "%GLILANG%" == "fr" echo Vous devez compiler le %PROGNAME% (en utilisant makegli.bat)
59 if "%GLILANG%" == "fr" echo avant d'ex‚cuter ce script.
60
61 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì %PROGNAME% (šá¯®«ì§ãï makegli.bat)
62 if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â 
63 goto exit
64
65
66:runGEMS
67if not "%_VERSION%" == "" (
68 echo Greenstone Major Version:
69 echo %_VERSION%
70 echo.
71)
72
73if not "%GSDL3SRCHOME%" == "" (
74 echo GSDL3SRCHOME:
75 echo %GSDL3SRCHOME%
76 echo.
77)
78
79if not "%GSDL3HOME%" == "" (
80 echo GSDL3HOME:
81 echo %GSDL3HOME%
82 echo.
83)
84
85if not "%GSDLHOME%" == "" (
86 echo GSDLHOME:
87 echo %GSDLHOME%
88 echo.
89)
90
91:: ---- Finally, run the GEMS ----
92if "%GLILANG%" == "en" echo Running the %PROGNAME%...
93if "%GLILANG%" == "es" echo Ejecutando la %PROGNAME%...
94if "%GLILANG%" == "fr" echo Ex‚cution de %PROGNAME%
95if "%GLILANG%" == "ru" echo ’¥ªãéš© %PROGNAME%...
96
97:: -Xms32M To set minimum memory
98:: -Xmx32M To set maximum memory
99:: -verbose:gc To set garbage collection messages
100:: -Xincgc For incremental garbage collection
101:: -Xprof Function call profiling
102:: -Xloggc:<file> Write garbage collection log
103
104
105:: Run GS3 if version = 3
106if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar org.greenstone.gatherer.gems.GEMS -gsdl3 %GSDL3HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
107if "%_VERSION%" == "3" goto finRun
108
109 :: Else run GS2 since version is 2:
110 "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar org.greenstone.gatherer.gems.GEMS -gsdl %GSDLHOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
111
112:finRun
113 if "%GLILANG%" == "en" echo Done!
114 if "%GLILANG%" == "es" echo ­Hecho!
115 if "%GLILANG%" == "fr" echo Termin‚!
116 if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
117 goto done
118
119
120:exit
121echo.
122pause
123color 07
124popd
125:done
126:: ---- Clean up ----
127set JAVAPATH=
128set JAVA_EXECUTABLE=
129color 07
130popd
Note: See TracBrowser for help on using the repository browser.