1 | @echo off
|
---|
2 | set GLILANG=en
|
---|
3 |
|
---|
4 |
|
---|
5 | :: -------- Compile the Greenstone Librarian Interface --------
|
---|
6 |
|
---|
7 | echo.
|
---|
8 | if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI)
|
---|
9 | if "%GLILANG%" == "en" echo Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato
|
---|
10 | if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
|
---|
11 | if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
|
---|
12 |
|
---|
13 | if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)
|
---|
14 | if "%GLILANG%" == "es" echo Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato
|
---|
15 | if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
|
---|
16 | if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los trminos de la licencia en LICENSE.txt
|
---|
17 | if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
|
---|
18 |
|
---|
19 | if "%GLILANG%" == "fr" echo Interface du Bibliothcaire Greenstone (Greenstone Librarian Interface - GLI)
|
---|
20 | if "%GLILANG%" == "fr" echo Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato
|
---|
21 | if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des dtails, voir LICENSE.txt
|
---|
22 | if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous tes invit
|
---|
23 | le redistribuer
|
---|
24 |
|
---|
25 | if "%GLILANG%" == "ru" echo š¡«š®â¥çë© šâ¥à䥩á Greenstone (Greenstone Librarian Interface - GLI)
|
---|
26 | if "%GLILANG%" == "ru" echo Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato
|
---|
27 | if "%GLILANG%" == "ru" echo ¥ € ¥â ; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
|
---|
28 | if "%GLILANG%" == "ru" echo â® - ᢮¡®€® à á¯à®áâà 塞®¥ ¯à®£à ¬¬®¥ ®¡¥á¯¥ç¥š¥ š ë ¬®Š¥â¥ à á¯à®áâà ïâì ¥£®
|
---|
29 |
|
---|
30 | echo.
|
---|
31 |
|
---|
32 | :: This script must be run from within the directory in which it lives
|
---|
33 | if exist makegli.bat goto findJavac
|
---|
34 | if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
|
---|
35 | if "%GLILANG%" == "es" echo Este gui¢n deber ejecutarse desde el directorio en el que reside.
|
---|
36 | if "%GLILANG%" == "fr" echo Ce script doit tre excut
|
---|
37 | partir du rpertoire dans lequel il se trouve.
|
---|
38 | if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ® à ᯮ«®Š¥
|
---|
39 | goto exit
|
---|
40 |
|
---|
41 |
|
---|
42 | :findJavac
|
---|
43 | :: ---- Check Javac exists ----
|
---|
44 | set JAVACPATH=
|
---|
45 |
|
---|
46 | :: Some users may set the above line manually
|
---|
47 | if not "%JAVACPATH%" == "" goto testJavac
|
---|
48 |
|
---|
49 | :: If it is set, use the JAVA_HOME environment variable
|
---|
50 | if not "%JAVA_HOME%" == "" goto javahome
|
---|
51 |
|
---|
52 | :: Check if Javac is on the search path
|
---|
53 | echo %PATH%| winutil\which.exe javac.exe | winutil\setvar.exe JAVACPATH > setjavac.bat
|
---|
54 | call setjavac.bat
|
---|
55 | del setjavac.bat
|
---|
56 | if not "%JAVACPATH%" == "" goto testJavac
|
---|
57 |
|
---|
58 | :: Still haven't found anything, so try looking in the registry (gulp!)
|
---|
59 | type nul > jdk.reg
|
---|
60 | regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
|
---|
61 | type jdk.reg > jdk.txt
|
---|
62 | del jdk.reg
|
---|
63 |
|
---|
64 | winutil\findjava.exe jdk.txt | winutil\setvar.exe JAVACPATH > setjavac.bat
|
---|
65 | del jdk.txt
|
---|
66 | call setjavac.bat
|
---|
67 | del setjavac.bat
|
---|
68 |
|
---|
69 | :: If nothing was found in the registry, we're stuck
|
---|
70 | if "%JAVACPATH%" == "" goto noJavac
|
---|
71 |
|
---|
72 | set JAVACPATH=%JAVACPATH%\bin
|
---|
73 | goto testJavac
|
---|
74 |
|
---|
75 | :javahome
|
---|
76 | set JAVACPATH=%JAVA_HOME%\bin
|
---|
77 |
|
---|
78 | :testJavac
|
---|
79 | :: Check that a Javac executable has been found
|
---|
80 | if "%GLILANG%" == "en" echo Checking Javac: %JAVACPATH%
|
---|
81 | if "%GLILANG%" == "es" echo Revisando Javac: %JAVACPATH%
|
---|
82 | if "%GLILANG%" == "fr" echo Vrification de Javac: %JAVACPATH%
|
---|
83 | if "%GLILANG%" == "ru" echo ஢¥àª Javac: %JAVACPATH%
|
---|
84 | if exist "%JAVACPATH%\javac.exe" goto checkVer
|
---|
85 |
|
---|
86 | :noJavac
|
---|
87 | echo.
|
---|
88 | if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Javac. You must install a
|
---|
89 | if "%GLILANG%" == "en" echo Java Development Kit (version 1.4 or greater) before compiling the
|
---|
90 | if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
|
---|
91 |
|
---|
92 | if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Javac. Usted deber
|
---|
93 | if "%GLILANG%" == "es" echo instalar un Kit de Desarrollo de Software Java (versi¢n 1.4 o superior)
|
---|
94 | if "%GLILANG%" == "es" echo antes de generar la documentaci¢n para la Interfaz de la Biblioteca
|
---|
95 | if "%GLILANG%" == "es" echo Digital Greenstone.
|
---|
96 |
|
---|
97 | if "%GLILANG%" == "fr" echo Une version approprie de Javac n'a pas pu tre localise. Vous devez
|
---|
98 | if "%GLILANG%" == "fr" echo installer un Kit de Dveloppement Java (version 1.4 ou suprieure)
|
---|
99 | if "%GLILANG%" == "fr" echo avant de produire la documentation de Greenstone Librarian Interface.
|
---|
100 |
|
---|
101 | if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥á⮠宊€¥š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Javac.
|
---|
102 | if "%GLILANG%" == "ru" echo ë €®«Šë šáâ ««šà®¢ âì Java Development Kit (¢¥àášï 1.4 š«š ¢ëè¥)
|
---|
103 | if "%GLILANG%" == "ru" echo ¯à¥Š€¥, 祬 £¥¥àšà®¢ âì €®ªã¬¥â æšî €«ï ¡š¡«š®â¥ç®£®
|
---|
104 | if "%GLILANG%" == "ru" echo šâ¥à䥩á Greenstone.
|
---|
105 | goto exit
|
---|
106 |
|
---|
107 | :checkVer
|
---|
108 | :: Check that the version of Javac is new enough (1.4.0 or higher) to compile the GLI
|
---|
109 | "%JAVACPATH%\javac.exe" -Xstdout javacchk.tmp -target 1.4
|
---|
110 | if not errorlevel 1 goto makeGLI
|
---|
111 | :: Nasty special code for javac 1.4.2, since it complains about "no source files"
|
---|
112 | find "javac: no source files" javacchk.tmp >nul
|
---|
113 | if not errorlevel 1 goto makeGLI
|
---|
114 | del javacchk.tmp
|
---|
115 | echo.
|
---|
116 | if "%GLILANG%" == "en" echo The version of the Java Development Kit you have installed is too old
|
---|
117 | if "%GLILANG%" == "en" echo to compile the Greenstone Librarian Interface. Please install a new
|
---|
118 | if "%GLILANG%" == "en" echo version of the Java SDK (version 1.4 or newer) and rerun this script.
|
---|
119 |
|
---|
120 | if "%GLILANG%" == "es" echo La versi¢n del Kit de Desarrollo de Software de Java (SDK por sus siglas
|
---|
121 | if "%GLILANG%" == "es" echo en ingls) que usted tiene instalada es demasiado vieja para poder compilar
|
---|
122 | if "%GLILANG%" == "es" echo la Interfaz de la Biblioteca Digital Greenstone. Por favor instale una nueva
|
---|
123 | if "%GLILANG%" == "es" echo versi¢n del Kit de Desarrollo de Software Java (versi¢n 1.4 o posterior)
|
---|
124 | if "%GLILANG%" == "es" echo y ejecute nuevamente este gui¢n.
|
---|
125 |
|
---|
126 | if "%GLILANG%" == "fr" echo La version de Java Development Kit que vous avez installe est trop vieille
|
---|
127 | if "%GLILANG%" == "fr" echo pour compiler Greenstone Librarian Interface. Veuillez installer une nouvelle
|
---|
128 | if "%GLILANG%" == "fr" echo version de Java SDK (version 1.4 ou plus rcente) et redmarrez ce script.
|
---|
129 |
|
---|
130 | if "%GLILANG%" == "ru" echo ¥àášï Java Runtime Environment, ª®â®àãî ë ãáâ ®¢š«š, ®ç¥ì áâ à , ç⮡ë ã¯à ¢«ïâì
|
---|
131 | if "%GLILANG%" == "ru" echo ¡š¡«š®â¥çë¬ šâ¥à䥩ᮬ Greenstone. ®Š «ã©áâ , ãáâ ®¢šâ¥ ®¢ãî
|
---|
132 | if "%GLILANG%" == "ru" echo ¢¥àášî JRE (¢¥àášî 1.4 š«š ¡®«¥¥ ®¢ãî) š ¯¥à¥ãáâ ®¢šâ¥ íâ®â áªàš¯â
|
---|
133 | goto exit
|
---|
134 |
|
---|
135 |
|
---|
136 | :makeGLI
|
---|
137 | :: ---- Compile the GLI ----
|
---|
138 | del javacchk.tmp
|
---|
139 | echo.
|
---|
140 |
|
---|
141 | if "%1" == "" goto makeAll
|
---|
142 | :: If a file has been specified as a command-line argument, just compile that file
|
---|
143 | if "%GLILANG%" == "en" echo Compiling %1 and dependant classes...
|
---|
144 | if "%GLILANG%" == "es" echo Compilando %1 y clases dependientes...
|
---|
145 | if "%GLILANG%" == "fr" echo Compilation de %1 et des classes dpendantes,,,
|
---|
146 | if "%GLILANG%" == "ru" echo ®¬¯š«šà®¢ š¥ %1 š § ¢šáš¬ë¥ ª« ááë...
|
---|
147 |
|
---|
148 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar %1
|
---|
149 |
|
---|
150 | if "%GLILANG%" == "en" echo Done!
|
---|
151 | if "%GLILANG%" == "es" echo Hecho!
|
---|
152 | if "%GLILANG%" == "fr" echo Termin!
|
---|
153 | if "%GLILANG%" == "ru" echo 믮«¥®!
|
---|
154 | goto done
|
---|
155 |
|
---|
156 | :makeAll
|
---|
157 | :: Otherwise compile the lot...
|
---|
158 | if "%GLILANG%" == "en" echo Compiling the Greenstone Librarian Interface...
|
---|
159 | if "%GLILANG%" == "es" echo Compilando la Interfaz de la Biblioteca Digital Greenstone...
|
---|
160 | if "%GLILANG%" == "fr" echo Compilation de Greenstone Librarian Interface,,,
|
---|
161 | if "%GLILANG%" == "ru" echo ®¬¯š«šà®¢ š¥ ¡š¡«š®â¥ç®£® šâ¥à䥩á Greenstone...
|
---|
162 |
|
---|
163 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/*.java
|
---|
164 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/cdm/*.java
|
---|
165 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/checklist/*.java
|
---|
166 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/collection/*.java
|
---|
167 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/feedback/*.java
|
---|
168 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/file/*.java
|
---|
169 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/gui/*.java
|
---|
170 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/gui/border/*.java
|
---|
171 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/gui/metaaudit/*.java
|
---|
172 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/gui/tree/*.java
|
---|
173 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/help/*.java
|
---|
174 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/mem/*.java
|
---|
175 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/msm/*.java
|
---|
176 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/msm/parsers/*.java
|
---|
177 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/shell/*.java
|
---|
178 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/undo/*.java
|
---|
179 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/util/*.java
|
---|
180 | "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar;lib/mail.jar;lib/activation.jar src/org/greenstone/gatherer/valuetree/*.java
|
---|
181 |
|
---|
182 | if "%GLILANG%" == "en" echo Done!
|
---|
183 | if "%GLILANG%" == "es" echo Hecho!
|
---|
184 | if "%GLILANG%" == "fr" echo Termin!
|
---|
185 | if "%GLILANG%" == "ru" echo 믮«¥®!
|
---|
186 | goto done
|
---|
187 |
|
---|
188 | :exit
|
---|
189 | echo.
|
---|
190 | pause
|
---|
191 |
|
---|
192 | :done
|
---|
193 | :: ---- Clean up ----
|
---|
194 | set JAVACPATH=
|
---|