root/gli/trunk/makegli.bat @ 17845

Revision 17845, 7.7 KB (checked in by kjdon, 11 years ago)

changed a comment

  • Property svn:keywords set to Author Date Id Revision
Line 
1@echo off
2set GLILANG=en
3
4
5::  -------- Compile the Greenstone Librarian Interface --------
6
7echo.
8if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI)
9if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
10if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
11if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
12
13if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)
14if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
15if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
16if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt
17if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
18
19if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI)
20if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
21if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt
22if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚ … le redistribuer
23
24if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI)
25if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
26if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
27if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£®
28
29echo.
30
31:: This script must be run from within the directory in which it lives
32if exist makegli.bat goto findJavac
33    if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
34    if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
35    if "%GLILANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ … partir du r‚pertoire dans lequel il se trouve.
36    if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
37    goto exit
38
39
40:findJavac
41:: ---- Check Javac exists ----
42set JAVACPATH=
43
44:: Some users may set the above line manually
45if not "%JAVACPATH%" == "" goto testJavac
46
47    :: If it is set, use the JAVA_HOME environment variable
48    if not "%JAVA_HOME%" == "" goto javahome
49
50    :: Check if Javac is on the search path
51    echo %PATH%| winutil\which.exe javac.exe | winutil\setvar.exe JAVACPATH > setjavac.bat
52    call setjavac.bat
53    del setjavac.bat
54    if not "%JAVACPATH%" == "" goto testJavac
55
56    :: Still haven't found anything, so try looking in the registry (gulp!)
57    type nul > jdk.reg
58    regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
59    type jdk.reg > jdk.txt
60    del jdk.reg
61
62    winutil\findjava.exe jdk.txt | winutil\setvar.exe JAVACPATH > setjavac.bat
63    del jdk.txt
64    call setjavac.bat
65    del setjavac.bat
66
67    :: If nothing was found in the registry, we're stuck
68    if "%JAVACPATH%" == "" goto noJavac
69
70    set JAVACPATH=%JAVACPATH%\bin
71    goto testJavac
72
73:javahome
74    set JAVACPATH=%JAVA_HOME%\bin
75
76:testJavac
77:: Check that a Javac executable has been found
78if "%GLILANG%" == "en" echo Checking Javac: %JAVACPATH%
79if "%GLILANG%" == "es" echo Revisando Javac: %JAVACPATH%
80if "%GLILANG%" == "fr" echo V‚rification de Javac: %JAVACPATH%
81if "%GLILANG%" == "ru" echo à®¢¥àª  Javac: %JAVACPATH%
82if exist "%JAVACPATH%\javac.exe" goto makeGLI
83
84:noJavac
85    echo.
86    if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Javac. You must install a
87    if "%GLILANG%" == "en" echo Java Development Kit (version 1.4 or greater) before compiling the
88    if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
89
90    if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Javac. Usted deber 
91    if "%GLILANG%" == "es" echo instalar un Kit de Desarrollo de Software Java (versi¢n 1.4 o superior)
92    if "%GLILANG%" == "es" echo antes de generar la documentaci¢n para la Interfaz de la Biblioteca
93    if "%GLILANG%" == "es" echo Digital Greenstone.
94
95    if "%GLILANG%" == "fr" echo Une version appropri‚e de Javac n'a pas pu ˆtre localis‚e. Vous devez
96    if "%GLILANG%" == "fr" echo installer un Kit de D‚veloppement Java (version 1.4 ou sup‚rieure)
97    if "%GLILANG%" == "fr" echo avant de produire la documentation de Greenstone Librarian Interface.
98
99    if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Javac.
100    if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë š­áâ ««šà®¢ âì Java Development Kit (¢¥àášï 1.4 š«š ¢ëè¥)
101    if "%GLILANG%" == "ru" echo ¯à¥Š€¥, 祬 £¥­¥àšà®¢ âì €®ªã¬¥­â æšî €«ï ¡š¡«š®â¥ç­®£®
102    if "%GLILANG%" == "ru" echo š­â¥àä¥©á  Greenstone.
103    goto exit
104
105
106:makeGLI
107:: ---- Compile the GLI ----
108
109if "%1" == "" goto makeAll
110    :: If a file has been specified as a command-line argument, just compile that file
111    echo.
112    if "%GLILANG%" == "en" echo Compiling %1 and dependent classes...
113    if "%GLILANG%" == "es" echo Compilando %1 y clases dependientes...
114    if "%GLILANG%" == "fr" echo Compilation de %1 et des classes d‚pendantes,,,
115    if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ %1 š § ¢šáš¬ë¥ ª« ááë...
116
117    "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar %1
118
119    if "%GLILANG%" == "en" echo Done!
120    if "%GLILANG%" == "es" echo ­Hecho!
121    if "%GLILANG%" == "fr" echo Termin‚!
122    if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
123    goto done
124
125:makeAll
126:: Otherwise compile the lot...
127
128:: Remove any existing class files first
129call clean.bat
130
131if "%GLILANG%" == "en" echo Compiling the Greenstone Librarian Interface...
132if "%GLILANG%" == "es" echo Compilando la Interfaz de la Biblioteca Digital Greenstone...
133if "%GLILANG%" == "fr" echo Compilation de Greenstone Librarian Interface,,,
134if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone...
135
136:: Compile the GLI
137:: Sun compiler (tested with 1.5 and 1.6) didn't compile DragTreeSelectionModel.java or MetadataAuditTableModel.java automatically, so we need to put them in explicitly
138"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java
139"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet.java
140:: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java
141
142:: Compile the GEMS
143"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/gems/GEMS.java
144
145:: Compile the standalone programs needed on the server for remote building
146"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Zip*.java
147"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Unzip.java
148
149if "%GLILANG%" == "en" echo Done!
150if "%GLILANG%" == "es" echo ­Hecho!
151if "%GLILANG%" == "fr" echo Termin‚!
152if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
153goto done
154
155:exit
156echo.
157pause
158
159:done
160:: ---- Clean up ----
161set JAVACPATH=
Note: See TracBrowser for help on using the browser.