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