root/main/trunk/gli/makegli.sh @ 32285

Revision 31649, 6.1 KB (checked in by ak19, 3 years ago)

Updated GLI's batch and bash scripts to refer to the new JNA jar files and added a description of these jar files, there purpose, their version and where to get them into the lib/README.txt file.

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