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

Revision 25683, 5.9 KB (checked in by davidb, 8 years ago)

Changed to using RSyntaxTextArea to get coloured highlighting and other goodies for the Greenstone3 format manager

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
RevLine 
[4916]1#!/bin/sh
[6752]2glilang=en
[4935]3
[6262]4echo
[12287]5if [ "$glilang" = "es" ]; then
[6959]6    echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
[17946]7    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
[6959]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"
[12287]11elif [ "$glilang" = "fr" ]; then
[6955]12    echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
[17946]13    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
[6955]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"
[12287]16elif [ "$glilang" = "ru" ]; then
[7041]17    echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
[17946]18    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
[7041]19    echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
20    echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
[6706]21else
[7041]22    echo "Greenstone Librarian Interface (GLI)"
[17946]23    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato"
[7041]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"
[6706]26fi
[6223]27echo
[5011]28
29##  -------- Compile the Greenstone Librarian Interface --------
30
31## ---- Check Javac exists ----
32javacpath=
33
34# Some users may set the above line manually
[12287]35if [ "x$javacpath" = "x" ]; then
[5011]36
[23359]37    # If the JAVAC environment variable is set then use it
38    if [ "x$JAVAC" != "x" ] ; then
39    javacpath=$JAVAC
[6467]40    # If it is set, use the JAVA_HOME environment variable
[23359]41    elif [ "x$JAVA_HOME" != "x" ]; then
[6467]42    javacpath="$JAVA_HOME/bin/javac"
[5011]43    # Check if Javac is on the search path
44    else
45    javacpath=`which javac 2> /dev/null`
46    fi
47fi
48
[23359]49if [ "xJAVACFLAGS" = "x" ] ; then
50    JAVACFLAGS="-source 1.4 -target 1.4"
51fi
52
[5011]53# Check that a Javac executable has been found
[12287]54if [ "$glilang" = "es" ]; then
[6746]55    echo "Revisando Javac: $javacpath"
[12287]56elif [ "$glilang" = "fr" ]; then
[6711]57    echo "Vérification de Javac: $javacpath"
[12287]58elif [ "$glilang" = "ru" ]; then
[6706]59    echo "ðÒÏ×ÅÒËÁ Javac: $javacpath"
60else
61    echo "Checking Javac: $javacpath"
62fi
[5011]63if [ ! -x "$javacpath" ]; then
64    echo
[12287]65    if [ "$glilang" = "es" ]; then
[7003]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."
[12287]70    elif [ "$glilang" = "fr" ]; then
[6711]71    echo "Une version appropriée de Javac n'a pas pu être localisée."
[7003]72    echo "Veuillez installer une nouvelle version de Java SDK (version 1.4 ou"
73    echo "plus récente) et redémarrez ce script."
[12287]74    elif [ "$glilang" = "ru" ]; then
[6706]75    echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javac."
[7003]76    echo "ðÏÖÁÌÕÊÓÔÁ, ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ Java SDK (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ"
77    echo "ÎÏ×ÕÀ) É ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ."
[6706]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
[4935]83    exit 1
[4916]84fi
85
[5011]86## ---- Compile the GLI ----
87
[4947]88# If a file has been specified at the command-line, just compile that file
[4935]89if [ ! "x$*" = "x" ] ; then
[10422]90    echo
[12287]91    if [ "$glilang" = "es" ]; then
[6746]92    echo "Compilando $* y clases dependientes..."
[12287]93    elif [ "$glilang" = "fr" ]; then
[6711]94    echo "Compilation de $* et des classes dépendantes,,,"
[12287]95    elif [ "$glilang" = "ru" ]; then
[6706]96    echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ $* É ÚÁ×ÉÓÉÍÙÅ ËÌÁÓÓÙ..."
97    else
[8978]98    echo "Compiling $* and dependent classes..."
[6706]99    fi
[5011]100
[25683]101    $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $*
[5011]102
[12287]103    if [ "$glilang" = "es" ]; then
[6746]104    echo "¡Hecho!"
[12287]105    elif [ "$glilang" = "fr" ]; then
[6711]106    echo "Terminé!"
[12287]107    elif [ "$glilang" = "ru" ]; then
[6706]108    echo "÷ÙÐÏÌÎÅÎÏ!"
109    else
110    echo "Done!"
111    fi
[4935]112    exit 0
113fi
114
115# Otherwise compile the lot...
[10422]116
117# Remove any existing class files first
118./clean.sh
119
[12287]120if [ "$glilang" = "es" ]; then
[6746]121    echo "Compilando la Interfaz de la Biblioteca Digital Greenstone..."
[12287]122elif [ "$glilang" = "fr" ]; then
[6711]123    echo "Compilation de Greenstone Librarian Interface,,,"
[12287]124elif [ "$glilang" = "ru" ]; then
[6706]125    echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone..."
126else
127    echo "Compiling the Greenstone Librarian Interface..."
128fi
[5011]129
[9336]130# Compile the GLI
[25683]131$javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.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/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet.java
133#$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet4gs3.java
[9336]134# Compile the GEMS
[25683]135$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/GEMS.java
[9315]136
[13386]137# Compile the standalone programs needed on the server for remote building
[23359]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
[13386]140
[12287]141if [ "$glilang" = "es" ]; then
[6746]142    echo "¡Hecho!"
[12287]143elif [ "$glilang" = "fr" ]; then
[6711]144    echo "Terminé!"
[12287]145elif [ "$glilang" = "ru" ]; then
[6706]146    echo "÷ÙÐÏÌÎÅÎÏ!"
147else
148    echo "Done!"
149fi
Note: See TracBrowser for help on using the browser.