[5824] | 1 | @echo off
|
---|
[6749] | 2 | set GLILANG=en
|
---|
[5824] | 3 |
|
---|
[6749] | 4 |
|
---|
[5824] | 5 | :: -------- Run the Greenstone Librarian Interface --------
|
---|
| 6 |
|
---|
| 7 | :: This script must be run from within the directory in which it lives
|
---|
| 8 | if exist gli.bat goto start
|
---|
[6749] | 9 | if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
|
---|
[6753] | 10 | if "%GLILANG%" == "es" echo Este gui¢n deber ejecutarse desde el directorio en el que reside.
|
---|
[6749] | 11 | if "%GLILANG%" == "fr" echo Ce script doit tre excut
|
---|
[6754] | 12 | partir du rpertoire dans lequel il se trouve.
|
---|
[5824] | 13 | if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ® à ᯮ«®Š¥
|
---|
| 14 | goto exit
|
---|
| 15 |
|
---|
[15608] | 16 | :start
|
---|
[5824] | 17 | if "%OS%" == "Windows_NT" goto progName
|
---|
[15608] | 18 | :: Invoke a new command processor to ensure there's enough environment space
|
---|
[5824] | 19 | if "%1" == "Second" goto progName
|
---|
| 20 | command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
| 21 | goto done
|
---|
[15608] | 22 |
|
---|
| 23 |
|
---|
| 24 | :progName
|
---|
| 25 | if not "%PROGNAME%" == "" goto findGSDL
|
---|
| 26 | :: otherwise PROGNAME was not set, so default to the Greenstone Librarian Interface (GLI) program
|
---|
| 27 | if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Greenstone
|
---|
| 28 | if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Greenstone
|
---|
| 29 | if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Greenstone
|
---|
| 30 | :: if the PROGNAME is still not set, then set the language to English
|
---|
| 31 | if "%PROGNAME%" == "" set PROGNAME=Greenstone Librarian Interface
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | if "%PROGABBR%" == "" set PROGABBR=GLI
|
---|
| 35 | if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface
|
---|
[6669] | 36 |
|
---|
[6667] | 37 | :findGSDL
|
---|
[15608] | 38 | echo.
|
---|
[12453] | 39 | if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
|
---|
[15608] | 40 | if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
[6749] | 41 | if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
|
---|
| 42 | if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
|
---|
[15608] | 43 |
|
---|
[12453] | 44 | if "%GLILANG%" == "es" echo Interfaz de la %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
[15608] | 45 | if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
[6959] | 46 | if "%GLILANG%" == "es" echo La Interfaz de la %PROGNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
|
---|
| 47 | if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los trminos de la licencia en LICENSE.txt
|
---|
[6753] | 48 | if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
|
---|
[15608] | 49 |
|
---|
[12453] | 50 | if "%GLILANG%" == "fr" echo Interface du %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
[15608] | 51 | if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
[6955] | 52 | if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des dtails, voir LICENSE.txt
|
---|
[6754] | 53 | if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous tes invit
|
---|
[15608] | 54 | le redistribuer
|
---|
[12453] | 55 |
|
---|
[7041] | 56 | if "%GLILANG%" == "ru" echo š¡«š®â¥çë© šâ¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
|
---|
| 57 | if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
| 58 | if "%GLILANG%" == "ru" echo ¥ € ¥â ; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
|
---|
[6667] | 59 | if "%GLILANG%" == "ru" echo â® - ᢮¡®€® à á¯à®áâà 塞®¥ ¯à®£à ¬¬®¥ ®¡¥á¯¥ç¥š¥ š ë ¬®Š¥â¥ à á¯à®áâà ïâì ¥£®
|
---|
[15608] | 60 |
|
---|
[5824] | 61 | echo.
|
---|
[15608] | 62 | :: ---- Determine path to Greenstone home for GS2 and GS3 ----
|
---|
[5824] | 63 | set GSDLPATH=
|
---|
[15608] | 64 | :: Some users may set the above line manually, or it may be set as an argument
|
---|
| 65 |
|
---|
| 66 | set _VERSION=
|
---|
| 67 | if not "%GSDLPATH%" == "" goto getVer
|
---|
| 68 | :: Otherwise gsdlpath is not yet set
|
---|
| 69 | :: Check the env vars first
|
---|
| 70 | if not "%GSDL3SRCHOME%" == "" goto ver3
|
---|
| 71 | if not "%GSDLHOME%" == "" goto ver2
|
---|
| 72 | :: If not set, the default location for the GLI is a subdirectory of Greenstone
|
---|
[5824] | 73 | set GSDLPATH=..
|
---|
[15608] | 74 | goto getVer
|
---|
| 75 |
|
---|
| 76 | :getVer
|
---|
[15628] | 77 | call gsdlver.bat %GSDLPATH% %_VERSION% SetEnv > nul
|
---|
| 78 | if "%_VERSION%" == "1" goto exit
|
---|
| 79 | ::if we are running GS2, free up any pre-set GS3 environment variables since we won't need them
|
---|
[15608] | 80 | if "%_VERSION%" == "2" set GSDL3SRCHOME=
|
---|
[5824] | 81 | if "%_VERSION%" == "2" set GSDL3HOME=
|
---|
| 82 | goto testGSDL
|
---|
[15608] | 83 |
|
---|
| 84 |
|
---|
| 85 | :ver3
|
---|
| 86 | set _VERSION=3
|
---|
| 87 | set GSDLPATH=%GSDL3SRCHOME%
|
---|
| 88 | :: if GS2 is now also set, then both GS3 and GS2 are set:
|
---|
| 89 | :: warn the user that we have defaulted to GS3
|
---|
| 90 | if not "%GSDLHOME%" == "" echo Both Greenstone 2 and Greenstone 3 environments are set.
|
---|
| 91 | if not "%GSDLHOME%" == "" echo It is assumed you want to run Greenstone 3.
|
---|
| 92 | if not "%GSDLHOME%" == "" echo If you want to run Greenstone 2, please unset the
|
---|
| 93 | if not "%GSDLHOME%" == "" echo environment variable GSDL3SRCHOME before running GLI.
|
---|
| 94 | if not "%GSDLHOME%" == "" echo.
|
---|
| 95 | goto testGSDL
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 | :ver2
|
---|
[15628] | 99 | set _VERSION=2
|
---|
| 100 | set GSDLPATH=%GSDLHOME%
|
---|
| 101 | ::free up the GS3 environment variables since we are running GS2 and don't need them
|
---|
[15608] | 102 | set GSDL3SRCHOME=
|
---|
| 103 | set GSDL3HOME=
|
---|
| 104 | goto testGSDL
|
---|
[5824] | 105 |
|
---|
[15608] | 106 |
|
---|
| 107 | :testGSDL
|
---|
| 108 | set CHECK=1
|
---|
| 109 | call chkinst.bat "%GSDLPATH%" %_VERSION% %GLILANG% %CHECK% SetEnv > nul
|
---|
| 110 | if "%CHECK%" == "1" goto exit
|
---|
[6749] | 111 | :: otherwise installation worked well
|
---|
[6753] | 112 | goto prepGSDL
|
---|
[15608] | 113 |
|
---|
| 114 |
|
---|
| 115 | :prepGSDL
|
---|
[6754] | 116 | :: Greenstone 3 case
|
---|
[15608] | 117 | if "%_VERSION%" == "3" goto prepGS3
|
---|
| 118 |
|
---|
[5824] | 119 | if not "%_VERSION%" == "2" echo "Greenstone version unknown"
|
---|
[15608] | 120 | if not "%_VERSION%" == "2" goto :exit
|
---|
| 121 |
|
---|
[5824] | 122 | :: Otherwise, we are dealing with Greenstone 2
|
---|
| 123 | :: Setup Greenstone 2, unless it has already been done
|
---|
[15608] | 124 | if not "%GSDLHOME%" == "" goto doneGSDL
|
---|
[5824] | 125 | call "%GSDLPATH%\setup.bat" SetEnv > nul
|
---|
[15608] | 126 | goto doneGSDL
|
---|
| 127 |
|
---|
| 128 |
|
---|
| 129 | :prepGS3
|
---|
| 130 | set GSDL2PATH=
|
---|
| 131 | : Some users may set the above line manually
|
---|
| 132 |
|
---|
| 133 | if "%GSDL3SRCHOME%" == "" goto setup3
|
---|
| 134 | if "%GSDL3HOME%" == "" goto setup3
|
---|
| 135 | ::otherwise
|
---|
| 136 | goto gs2build
|
---|
| 137 |
|
---|
| 138 |
|
---|
| 139 | :setup3
|
---|
| 140 | :: Setup Greenstone 3, unless it has already been done
|
---|
| 141 | cd | winutil\setvar.exe GLIDIR > %TMP%\setgli.bat
|
---|
| 142 | call %TMP%\setgli.bat
|
---|
| 143 | del %TMP%\setgli.bat
|
---|
| 144 | cd "%GSDLPATH%"
|
---|
| 145 | call gs3-setup.bat SetEnv > nul
|
---|
| 146 | cd %GLIDIR%
|
---|
| 147 | goto gs2build
|
---|
| 148 |
|
---|
| 149 |
|
---|
| 150 | :gs2build
|
---|
| 151 | :: If Greenstone version 3 is running, we want to set gsdl2path
|
---|
| 152 | :: Determine GSDLHOME for GS3
|
---|
| 153 | if not "%GSDL2PATH%" == "" goto setupGS2
|
---|
| 154 | :: GSDL2PATH is not yet set.
|
---|
| 155 | :: And if GSDLHOME is not set either, then assume
|
---|
| 156 | :: that the gs2build subdir of GS3 exists
|
---|
| 157 | if "%GSDLHOME%" == "" set GSDL2PATH=%GSDL3SRCHOME%\gs2build
|
---|
| 158 | if "%GSDLHOME%" == "" goto setupGS2
|
---|
| 159 | :: Otherwise GSDLHOME is set, so set GSDL2PATH to GSDLHOME
|
---|
| 160 | echo GSDLHOME environment variable is set to %GSDLHOME%.
|
---|
| 161 | echo Will use this to find build scripts.
|
---|
| 162 | set GSDL2PATH=%GSDLHOME%
|
---|
| 163 |
|
---|
| 164 | :setupGS2
|
---|
| 165 | set CHECK=1
|
---|
| 166 | call chkinst.bat "%GSDL2PATH%" 2 %GLILANG% %CHECK% SetEnv > nul
|
---|
| 167 | if "%CHECK%" == "1" goto exit
|
---|
| 168 | :: otherwise installation worked well
|
---|
| 169 | :: Setup Greenstone, unless it has already been done
|
---|
| 170 | if "%GSDLHOME%" == "" call "%GSDL2PATH%\setup.bat" SetEnv > nul
|
---|
| 171 | :: Either way, we can now dispose of GSDL2PATH
|
---|
| 172 | set GSDL2PATH=
|
---|
| 173 | goto doneGSDL
|
---|
[5824] | 174 |
|
---|
| 175 |
|
---|
| 176 | :doneGSDL
|
---|
| 177 | :: GSDLPATH is no longer needed, since GSDLHOME should now be set
|
---|
| 178 | set GSDLPATH=
|
---|
| 179 |
|
---|
| 180 |
|
---|
| 181 | :findPerl
|
---|
| 182 | :: ---- Check Perl exists ----
|
---|
[15199] | 183 | set PERLPATH=
|
---|
| 184 |
|
---|
| 185 | :: Some users may set the above line manually - If you do this, you need to
|
---|
[5824] | 186 | :: make sure that perl is in your path otherwise lucene collections may not
|
---|
| 187 | :: work
|
---|
| 188 | if not "%PERLPATH%" == "" goto testPerl
|
---|
[15354] | 189 |
|
---|
| 190 | :: Check if Perl is on the search path
|
---|
| 191 | echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
|
---|
[5824] | 192 | call %TMP%\setperl.bat
|
---|
| 193 | del %TMP%\setperl.bat
|
---|
| 194 | if not "%PERLPATH%" == "" goto testPerl
|
---|
| 195 |
|
---|
| 196 | :: If not, try GSDLHOME\bin\windows\perl\bin
|
---|
| 197 | if exist "%GSDLHOME%\bin\windows\perl\bin\perl.exe" goto gsdlPerl
|
---|
[15354] | 198 |
|
---|
| 199 | :: Still haven't found anything, so try looking in the registry (gulp!)
|
---|
| 200 | type nul > %TMP%\perl.reg
|
---|
| 201 | regedit /E %TMP%\perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
|
---|
[5824] | 202 | type %TMP%\perl.reg > %TMP%\perl.txt
|
---|
[15354] | 203 | del %TMP%\perl.reg
|
---|
| 204 |
|
---|
| 205 | winutil\findperl.exe %TMP%\perl.txt | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
|
---|
| 206 | del %TMP%\perl.txt
|
---|
[5824] | 207 | call %TMP%\setperl.bat
|
---|
| 208 | del %TMP%\setperl.bat
|
---|
| 209 |
|
---|
| 210 | :: If nothing was found in the registry, we're stuck
|
---|
[15199] | 211 | if "%PERLPATH%" == "" goto noPerl
|
---|
| 212 |
|
---|
| 213 | :: if have found perl in registry, but not in path, then we need to
|
---|
| 214 | :: add it to path for lucene stuff.
|
---|
[5824] | 215 | if "%OS%" == "Windows_NT" set PATH=%PATH%;%PERLPATH%
|
---|
| 216 | if "%OS%" == "" set PATH="%PATH%";"%PERLPATH%"
|
---|
| 217 | goto testPerl
|
---|
| 218 |
|
---|
[15199] | 219 | :gsdlPerl
|
---|
[5824] | 220 | set PERLPATH=%GSDLHOME%\bin\windows\perl\bin
|
---|
[15608] | 221 |
|
---|
[5824] | 222 | :testPerl
|
---|
[6749] | 223 | echo.
|
---|
[6753] | 224 | :: Check that a Perl executable has been found
|
---|
[6749] | 225 | if "%GLILANG%" == "en" echo Checking Perl: %PERLPATH%
|
---|
[6754] | 226 | if "%GLILANG%" == "es" echo Revisando Perl: %PERLPATH%
|
---|
[5824] | 227 | if "%GLILANG%" == "fr" echo Vrification de Perl: %PERLPATH%
|
---|
| 228 | if "%GLILANG%" == "ru" echo ஢¥àª Perl: %PERLPATH%
|
---|
| 229 | if exist "%PERLPATH%\perl.exe" goto findJava
|
---|
| 230 |
|
---|
[6749] | 231 | :noPerl
|
---|
| 232 | echo.
|
---|
| 233 | if "%GLILANG%" == "en" echo The Greenstone Librarian Interface requires perl in order to operate,
|
---|
| 234 | if "%GLILANG%" == "en" echo but perl could not be detected on your system. Please ensure that perl
|
---|
[6753] | 235 | if "%GLILANG%" == "en" echo is installed and is on your search path, then rerun this script.
|
---|
| 236 |
|
---|
| 237 | if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone requiere Perl para poder
|
---|
| 238 | if "%GLILANG%" == "es" echo operar, pero ste no aparece en su sistema. Por favor aseg£rese de
|
---|
| 239 | if "%GLILANG%" == "es" echo que Perl est instalado y se encuentra en su ruta de b£squeda.
|
---|
[6749] | 240 | if "%GLILANG%" == "es" echo A continuaci¢n ejecute nuevamente este gui¢n.
|
---|
| 241 |
|
---|
| 242 | if "%GLILANG%" == "fr" echo Greenstone Librarian Interface ncessite perl pour son fonctionnement,
|
---|
| 243 | if "%GLILANG%" == "fr" echo mais perl n'a pas pu tre dtect dans votre systme. Veuillez vous
|
---|
[6754] | 244 | if "%GLILANG%" == "fr" echo assurer que perl est install et est spcifi dans votre chemin de
|
---|
| 245 | if "%GLILANG%" == "fr" echo recherche, puis redmarrez ce script.
|
---|
| 246 |
|
---|
| 247 | if "%GLILANG%" == "ru" echo š¡«š®â¥çë© šâ¥à䥩á Greenstone âॡã¥â Perl, çâ®¡ë š¬¥âì ¢®§¬®Š®áâì
|
---|
| 248 | if "%GLILANG%" == "ru" echo à ¡®â âì, ® Perl ¥ ¡ë« ¢ ¢ 襩 ášá⥬¥. ®Š «ã©áâ , ¯®€â¢¥à€šâ¥,
|
---|
[5824] | 249 | if "%GLILANG%" == "ru" echo çâ® Perl ãáâ ®¢«¥ š 宀šâáï ¢ 襬 ¯ãâš ¯®šáª , § ⥬
|
---|
| 250 | if "%GLILANG%" == "ru" echo ¯®¢â®à®¢¢¥€šâ¥ íâ®â áªàš¯â.
|
---|
| 251 | goto exit
|
---|
| 252 |
|
---|
| 253 |
|
---|
| 254 | :findJava
|
---|
| 255 | :: ---- Check Java exists ----
|
---|
| 256 | set JAVAPATH=
|
---|
| 257 |
|
---|
| 258 | :: Some users may set the above line manually
|
---|
[6467] | 259 | if not "%JAVAPATH%" == "" goto testJava
|
---|
| 260 |
|
---|
[5824] | 261 | :: If it is set, use the JAVA_HOME environment variable
|
---|
| 262 | if not "%JAVA_HOME%" == "" goto javahome
|
---|
[15354] | 263 |
|
---|
| 264 | :: Check if Java is on the search path
|
---|
| 265 | echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
|
---|
[5824] | 266 | call %TMP%\setjava.bat
|
---|
| 267 | del %TMP%\setjava.bat
|
---|
| 268 | if not "%JAVAPATH%" == "" goto testJava
|
---|
[15354] | 269 |
|
---|
| 270 | :: Still haven't found anything, so try looking in the registry (gulp!)
|
---|
| 271 | type nul > %TMP%\jdk.reg
|
---|
| 272 | regedit /E %TMP%\jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
|
---|
| 273 | type %TMP%\jdk.reg > %TMP%\jdk.txt
|
---|
| 274 | del %TMP%\jdk.reg
|
---|
| 275 | type nul > %TMP%\jre.reg
|
---|
| 276 | regedit /E %TMP%\jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
|
---|
[5824] | 277 | type %TMP%\jre.reg > %TMP%\jre.txt
|
---|
[15354] | 278 | del %TMP%\jre.reg
|
---|
| 279 |
|
---|
| 280 | winutil\findjava.exe %TMP%\jdk.txt %TMP%\jre.txt | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
|
---|
| 281 | del %TMP%\jdk.txt
|
---|
| 282 | del %TMP%\jre.txt
|
---|
[5824] | 283 | call %TMP%\setjava.bat
|
---|
| 284 | del %TMP%\setjava.bat
|
---|
| 285 |
|
---|
| 286 | :: If nothing was found in the registry, we're stuck
|
---|
| 287 | if "%JAVAPATH%" == "" goto noJava
|
---|
| 288 |
|
---|
| 289 | set JAVAPATH=%JAVAPATH%\bin
|
---|
| 290 | goto testJava
|
---|
[6467] | 291 |
|
---|
[5824] | 292 | :javahome
|
---|
| 293 | set JAVAPATH=%JAVA_HOME%\bin
|
---|
| 294 |
|
---|
[6749] | 295 | :testJava
|
---|
[6753] | 296 | :: Check that a Java executable has been found
|
---|
[6749] | 297 | if "%GLILANG%" == "en" echo Checking Java: %JAVAPATH%
|
---|
[6754] | 298 | if "%GLILANG%" == "es" echo Revisando Java: %JAVAPATH%
|
---|
[15608] | 299 | if "%GLILANG%" == "fr" echo Vrification de Java: %JAVAPATH%
|
---|
[5824] | 300 | if "%GLILANG%" == "ru" echo ஢¥àª Java: %JAVAPATH%
|
---|
| 301 | if exist "%JAVAPATH%\java.exe" goto checkJV
|
---|
| 302 |
|
---|
[6749] | 303 | :noJava
|
---|
| 304 | echo.
|
---|
| 305 | if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
|
---|
| 306 | if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
|
---|
[6753] | 307 | if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
|
---|
| 308 |
|
---|
| 309 | if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber
|
---|
| 310 | if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior)
|
---|
[6749] | 311 | if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
|
---|
| 312 |
|
---|
| 313 | if "%GLILANG%" == "fr" echo Une version adquate de Java n'a pas pu tre localise. Vous devez
|
---|
[6754] | 314 | if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou suprieur)
|
---|
| 315 | if "%GLILANG%" == "fr" echo avant de dmarrer Greenstone Librarian Interface.
|
---|
| 316 |
|
---|
| 317 | if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥á⮠宊€¥š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Java.
|
---|
[5824] | 318 | if "%GLILANG%" == "ru" echo ë €®«Šë ãáâ ®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬
|
---|
| 319 | if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç®£® šâ¥à䥩á Greenstone.
|
---|
| 320 | goto exit
|
---|
[15608] | 321 |
|
---|
| 322 |
|
---|
| 323 | :: Check the version of Java is new enough (1.4.0 or higher) to run the GLI
|
---|
| 324 | :checkJV
|
---|
| 325 | "%JAVAPATH%\java" -classpath . CheckJavaVersion
|
---|
| 326 | if ERRORLEVEL 2 goto checkGLI
|
---|
| 327 | :: Otherwise, errorlevel was an error value
|
---|
| 328 | if "%GLILANG%" == "es" La versión del Ambiente de Ejecución Java (JRE por sus siglas en
|
---|
| 329 | if "%GLILANG%" == "es" inglés) que usted tiene instalada es demasiado vieja para ejecutar
|
---|
| 330 | if "%GLILANG%" == "es" la Interfaz de la %PROGNAME%. Por favor instale
|
---|
| 331 | if "%GLILANG%" == "es" una nueva versión del Ambiente de Ejecución Java (versión 1.4 o
|
---|
| 332 | if "%GLILANG%" == "es" posterior) y ejecute nuevamente este guión.
|
---|
| 333 |
|
---|
| 334 | if "%GLILANG%" == "fr" La version de Java Runtime Environment que vous avez installée est
|
---|
| 335 | if "%GLILANG%" == "fr" trop vielle pour faire fonctionner %PROGNAME%.
|
---|
| 336 | if "%GLILANG%" == "fr" Veuillez installer une nouvelle version du JRE (version 1.4 ou plus
|
---|
| 337 | if "%GLILANG%" == "fr" récente) et redémarrez le script.
|
---|
| 338 |
|
---|
| 339 | if "%GLILANG%" == "ru" ÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,
|
---|
| 340 | if "%GLILANG%" == "ru" ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ %PROGNAME%. ðÏÖÁÌÕÊÓÔÁ,
|
---|
| 341 | if "%GLILANG%" == "ru" ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É
|
---|
| 342 | if "%GLILANG%" == "ru" ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ
|
---|
| 343 |
|
---|
| 344 | if "%GLILANG%" == "en" The version of the Java Runtime Environment you have installed is too
|
---|
| 345 | if "%GLILANG%" == "en" old to run the %PROGNAME%. Please install a new
|
---|
| 346 | if "%GLILANG%" == "en" version of the JRE (version 1.4 or newer) and rerun this script.
|
---|
| 347 | goto exit
|
---|
[5824] | 348 |
|
---|
| 349 |
|
---|
| 350 | :checkGLI
|
---|
| 351 | :: ---- Check that the GLI has been compiled ----
|
---|
| 352 | if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
|
---|
[6749] | 353 | if exist "GLI.jar" goto runGLI
|
---|
| 354 | echo.
|
---|
| 355 | if "%GLILANG%" == "en" echo You need to compile the Greenstone Librarian Interface (using makegli.bat)
|
---|
[6753] | 356 | if "%GLILANG%" == "en" echo before running this script.
|
---|
| 357 |
|
---|
| 358 | if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone
|
---|
[10787] | 359 | if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n.
|
---|
[6749] | 360 |
|
---|
[6754] | 361 | if "%GLILANG%" == "fr" echo Vous devez compiler le Greenstone Interface (en utilisant makegli.bat)
|
---|
| 362 | if "%GLILANG%" == "fr" echo avant d'excuter ce script.
|
---|
| 363 |
|
---|
[5824] | 364 | if "%GLILANG%" == "ru" echo ë €®«Šë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥çë© šâ¥à䥩á Greenstone (šá¯®«ì§ãï makegli.bat)
|
---|
| 365 | if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â
|
---|
| 366 | goto exit
|
---|
| 367 |
|
---|
| 368 |
|
---|
| 369 | :runGLI
|
---|
[15628] | 370 | :: ---- Finally, run the GLI ----
|
---|
| 371 | echo.
|
---|
| 372 | if not "%_VERSION%" == "" echo Running on Greenstone version %_VERSION%
|
---|
| 373 | if not "%GSDL3SRCHOME%" == "" echo GSDL3SRCHOME is %GSDL3SRCHOME%
|
---|
| 374 | if not "%GSDL3HOME%" == "" echo GSDL3HOME is %GSDL3HOME%
|
---|
[7680] | 375 | if not "%GSDLHOME%" == "" echo GSDLHOME is %GSDLHOME%
|
---|
[15629] | 376 | echo.
|
---|
| 377 |
|
---|
| 378 | if "%GLILANG%" == "en" echo Running the %PROGNAME%...
|
---|
| 379 | if "%GLILANG%" == "es" echo Ejecutando la %PROGNAME%...
|
---|
[5824] | 380 | if "%GLILANG%" == "fr" echo Excution de %PROGNAME%
|
---|
| 381 | if "%GLILANG%" == "ru" echo ¥ªãéš© ¡š¡«š%PROGNAME%...
|
---|
| 382 |
|
---|
| 383 | :: -Xms32M To set minimum memory
|
---|
| 384 | :: -Xmx32M To set maximum memory
|
---|
| 385 | :: -verbose:gc To set garbage collection messages
|
---|
| 386 | :: -Xincgc For incremental garbage collection
|
---|
| 387 | :: -Xprof Function call profiling
|
---|
[12695] | 388 | :: -Xloggc:<file> Write garbage collection log
|
---|
[15608] | 389 |
|
---|
| 390 |
|
---|
| 391 | :: Run GS3 if version = 3
|
---|
| 392 | if "%_VERSION%" == "3" "%JAVAPATH%\java" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
| 393 | if "%_VERSION%" == "3" goto finRun
|
---|
| 394 |
|
---|
| 395 | :: Run GS2 since version is 2:
|
---|
| 396 | :: if FLI is running, we don't want the local Greenstone library server running
|
---|
| 397 | if "%PROGABBR%" == "FLI" goto webLib
|
---|
| 398 | :: Else we're running GLI, so we want the local Greenstone library server (if server.exe exists, otherwise it will be webLib)
|
---|
[12689] | 399 | if exist "%GSDLHOME%\server.exe" goto localLib
|
---|
[13027] | 400 |
|
---|
[12689] | 401 | :webLib
|
---|
[15608] | 402 | "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
[12689] | 403 | if ERRORLEVEL 2 goto webLib
|
---|
[5824] | 404 | goto finRun
|
---|
[13027] | 405 |
|
---|
[12689] | 406 | :localLib
|
---|
[15608] | 407 | "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
[12689] | 408 | if ERRORLEVEL 2 goto localLib
|
---|
[15608] | 409 | goto finRun
|
---|
| 410 |
|
---|
[6749] | 411 |
|
---|
[6753] | 412 | :finRun
|
---|
[6749] | 413 | if "%GLILANG%" == "en" echo Done!
|
---|
[6754] | 414 | if "%GLILANG%" == "es" echo Hecho!
|
---|
[5927] | 415 | if "%GLILANG%" == "fr" echo Termin!
|
---|
[5824] | 416 | if "%GLILANG%" == "ru" echo 믮«¥®!
|
---|
[15608] | 417 | goto done
|
---|
[5824] | 418 |
|
---|
| 419 |
|
---|
| 420 | :exit
|
---|
| 421 | echo.
|
---|
[5927] | 422 | pause
|
---|
[5824] | 423 |
|
---|
| 424 | :done
|
---|
[15608] | 425 | :: ---- Clean up ----
|
---|
| 426 | set PERLPATH=
|
---|
| 427 | set JAVAPATH= |
---|