[4916] | 1 | #!/bin/sh
|
---|
[6752] | 2 | glilang=en
|
---|
[4935] | 3 |
|
---|
[32913] | 4 |
|
---|
| 5 | # Don't bother compiling GLI if there's no source code (e.g. if this is a binary only)
|
---|
| 6 | if [ ! -d "src" ]; then
|
---|
| 7 | echo "WARNING: There is no gli source code (src directory) to compile. Terminating makegli."
|
---|
| 8 | exit 0
|
---|
| 9 | fi
|
---|
| 10 |
|
---|
[6262] | 11 | echo
|
---|
[12287] | 12 | if [ "$glilang" = "es" ]; then
|
---|
[6959] | 13 | echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
|
---|
[17946] | 14 | echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
|
---|
[6959] | 15 | echo "La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA."
|
---|
| 16 | echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
|
---|
| 17 | echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
|
---|
[12287] | 18 | elif [ "$glilang" = "fr" ]; then
|
---|
[6955] | 19 | echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
|
---|
[17946] | 20 | echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
|
---|
[6955] | 21 | echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
|
---|
| 22 | echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
|
---|
[12287] | 23 | elif [ "$glilang" = "ru" ]; then
|
---|
[7041] | 24 | echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
|
---|
[17946] | 25 | echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
|
---|
[7041] | 26 | echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
|
---|
| 27 | echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
|
---|
[6706] | 28 | else
|
---|
[7041] | 29 | echo "Greenstone Librarian Interface (GLI)"
|
---|
[17946] | 30 | echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
|
---|
[7041] | 31 | echo "GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
|
---|
| 32 | echo "This is free software, and you are welcome to redistribute it"
|
---|
[6706] | 33 | fi
|
---|
[6223] | 34 | echo
|
---|
[5011] | 35 |
|
---|
| 36 | ## -------- Compile the Greenstone Librarian Interface --------
|
---|
| 37 |
|
---|
| 38 | ## ---- Check Javac exists ----
|
---|
| 39 | javacpath=
|
---|
| 40 |
|
---|
| 41 | # Some users may set the above line manually
|
---|
[12287] | 42 | if [ "x$javacpath" = "x" ]; then
|
---|
[5011] | 43 |
|
---|
[23359] | 44 | # If the JAVAC environment variable is set then use it
|
---|
| 45 | if [ "x$JAVAC" != "x" ] ; then
|
---|
| 46 | javacpath=$JAVAC
|
---|
[6467] | 47 | # If it is set, use the JAVA_HOME environment variable
|
---|
[23359] | 48 | elif [ "x$JAVA_HOME" != "x" ]; then
|
---|
[6467] | 49 | javacpath="$JAVA_HOME/bin/javac"
|
---|
[5011] | 50 | # Check if Javac is on the search path
|
---|
| 51 | else
|
---|
| 52 | javacpath=`which javac 2> /dev/null`
|
---|
| 53 | fi
|
---|
| 54 | fi
|
---|
| 55 |
|
---|
[23359] | 56 | if [ "xJAVACFLAGS" = "x" ] ; then
|
---|
| 57 | JAVACFLAGS="-source 1.4 -target 1.4"
|
---|
| 58 | fi
|
---|
| 59 |
|
---|
[5011] | 60 | # Check that a Javac executable has been found
|
---|
[12287] | 61 | if [ "$glilang" = "es" ]; then
|
---|
[6746] | 62 | echo "Revisando Javac: $javacpath"
|
---|
[12287] | 63 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 64 | echo "Vérification de Javac: $javacpath"
|
---|
[12287] | 65 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 66 | echo "ðÒÏ×ÅÒËÁ Javac: $javacpath"
|
---|
| 67 | else
|
---|
| 68 | echo "Checking Javac: $javacpath"
|
---|
| 69 | fi
|
---|
[5011] | 70 | if [ ! -x "$javacpath" ]; then
|
---|
| 71 | echo
|
---|
[12287] | 72 | if [ "$glilang" = "es" ]; then
|
---|
[7003] | 73 | echo "No se pudo localizar una versión apropiada de Javac."
|
---|
| 74 | echo "Por favor instale una nueva versión del Kit de Desarrollo de"
|
---|
| 75 | echo "Software Java (versión 1.4 o posterior) y ejecute nuevamente"
|
---|
| 76 | echo "este guión."
|
---|
[12287] | 77 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 78 | echo "Une version appropriée de Javac n'a pas pu être localisée."
|
---|
[7003] | 79 | echo "Veuillez installer une nouvelle version de Java SDK (version 1.4 ou"
|
---|
| 80 | echo "plus récente) et redémarrez ce script."
|
---|
[12287] | 81 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 82 | echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javac."
|
---|
[7003] | 83 | echo "ðÏÖÁÌÕÊÓÔÁ, ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ Java SDK (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ"
|
---|
| 84 | echo "ÎÏ×ÕÀ) É ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ."
|
---|
[6706] | 85 | else
|
---|
| 86 | echo "Failed to locate an appropriate version of Javac. You must install a"
|
---|
| 87 | echo "Java Development Kit (version 1.4 or greater) before compiling the"
|
---|
| 88 | echo "Greenstone Librarian Interface."
|
---|
| 89 | fi
|
---|
[4935] | 90 | exit 1
|
---|
[4916] | 91 | fi
|
---|
| 92 |
|
---|
[5011] | 93 | ## ---- Compile the GLI ----
|
---|
| 94 |
|
---|
[4947] | 95 | # If a file has been specified at the command-line, just compile that file
|
---|
[4935] | 96 | if [ ! "x$*" = "x" ] ; then
|
---|
[10422] | 97 | echo
|
---|
[12287] | 98 | if [ "$glilang" = "es" ]; then
|
---|
[6746] | 99 | echo "Compilando $* y clases dependientes..."
|
---|
[12287] | 100 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 101 | echo "Compilation de $* et des classes dépendantes,,,"
|
---|
[12287] | 102 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 103 | echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ $* É ÚÁ×ÉÓÉÍÙÅ ËÌÁÓÓÙ..."
|
---|
| 104 | else
|
---|
[8978] | 105 | echo "Compiling $* and dependent classes..."
|
---|
[6706] | 106 | fi
|
---|
[5011] | 107 |
|
---|
[31649] | 108 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $*
|
---|
[5011] | 109 |
|
---|
[12287] | 110 | if [ "$glilang" = "es" ]; then
|
---|
[6746] | 111 | echo "¡Hecho!"
|
---|
[12287] | 112 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 113 | echo "Terminé!"
|
---|
[12287] | 114 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 115 | echo "÷ÙÐÏÌÎÅÎÏ!"
|
---|
| 116 | else
|
---|
| 117 | echo "Done!"
|
---|
| 118 | fi
|
---|
[4935] | 119 | exit 0
|
---|
| 120 | fi
|
---|
| 121 |
|
---|
| 122 | # Otherwise compile the lot...
|
---|
[10422] | 123 |
|
---|
| 124 | # Remove any existing class files first
|
---|
| 125 | ./clean.sh
|
---|
| 126 |
|
---|
[12287] | 127 | if [ "$glilang" = "es" ]; then
|
---|
[6746] | 128 | echo "Compilando la Interfaz de la Biblioteca Digital Greenstone..."
|
---|
[12287] | 129 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 130 | echo "Compilation de Greenstone Librarian Interface,,,"
|
---|
[12287] | 131 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 132 | echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone..."
|
---|
| 133 | else
|
---|
| 134 | echo "Compiling the Greenstone Librarian Interface..."
|
---|
| 135 | fi
|
---|
[5011] | 136 |
|
---|
[9336] | 137 | # Compile the GLI
|
---|
[31649] | 138 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererProg.java
|
---|
[32911] | 139 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/WebGatherer.java
|
---|
[31649] | 140 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet.java
|
---|
| 141 | #$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet4gs3.java
|
---|
[9336] | 142 | # Compile the GEMS
|
---|
[31649] | 143 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/GEMS.java
|
---|
[9315] | 144 |
|
---|
[13386] | 145 | # Compile the standalone programs needed on the server for remote building
|
---|
[23359] | 146 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Zip*.java
|
---|
| 147 | $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Unzip.java
|
---|
[13386] | 148 |
|
---|
[12287] | 149 | if [ "$glilang" = "es" ]; then
|
---|
[6746] | 150 | echo "¡Hecho!"
|
---|
[12287] | 151 | elif [ "$glilang" = "fr" ]; then
|
---|
[6711] | 152 | echo "Terminé!"
|
---|
[12287] | 153 | elif [ "$glilang" = "ru" ]; then
|
---|
[6706] | 154 | echo "÷ÙÐÏÌÎÅÎÏ!"
|
---|
| 155 | else
|
---|
| 156 | echo "Done!"
|
---|
| 157 | fi
|
---|