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