source: gli/trunk/makegli.sh@ 17002

Last change on this file since 17002 was 17002, checked in by ak19, 16 years ago

Merged GathererApplet.java and GathererApplet4gs3.java, so no longer need to compile the last.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
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)"
[12453]7 echo "Copyright (C) 2006, 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)"
[12453]13 echo "Copyright (C) 2006, 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)"
[12453]18 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
[7041]19 echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
20 echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
[6706]21else
[7041]22 echo "Greenstone Librarian Interface (GLI)"
[12453]23 echo "Copyright (C) 2006, 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
[6467]37 # If it is set, use the JAVA_HOME environment variable
[12287]38 if [ "x$JAVA_HOME" != "x" ]; then
[6467]39 javacpath="$JAVA_HOME/bin/javac"
[5011]40
41 # Check if Javac is on the search path
42 else
43 javacpath=`which javac 2> /dev/null`
44 fi
45fi
46
47# Check that a Javac executable has been found
[12287]48if [ "$glilang" = "es" ]; then
[6746]49 echo "Revisando Javac: $javacpath"
[12287]50elif [ "$glilang" = "fr" ]; then
[6711]51 echo "Vérification de Javac: $javacpath"
[12287]52elif [ "$glilang" = "ru" ]; then
[6706]53 echo "ðÒÏ×ÅÒËÁ Javac: $javacpath"
54else
55 echo "Checking Javac: $javacpath"
56fi
[5011]57if [ ! -x "$javacpath" ]; then
58 echo
[12287]59 if [ "$glilang" = "es" ]; then
[7003]60 echo "No se pudo localizar una versión apropiada de Javac."
61 echo "Por favor instale una nueva versión del Kit de Desarrollo de"
62 echo "Software Java (versión 1.4 o posterior) y ejecute nuevamente"
63 echo "este guión."
[12287]64 elif [ "$glilang" = "fr" ]; then
[6711]65 echo "Une version appropriée de Javac n'a pas pu être localisée."
[7003]66 echo "Veuillez installer une nouvelle version de Java SDK (version 1.4 ou"
67 echo "plus récente) et redémarrez ce script."
[12287]68 elif [ "$glilang" = "ru" ]; then
[6706]69 echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javac."
[7003]70 echo "ðÏÖÁÌÕÊÓÔÁ, ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ Java SDK (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ"
71 echo "ÎÏ×ÕÀ) É ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ."
[6706]72 else
73 echo "Failed to locate an appropriate version of Javac. You must install a"
74 echo "Java Development Kit (version 1.4 or greater) before compiling the"
75 echo "Greenstone Librarian Interface."
76 fi
[4935]77 exit 1
[4916]78fi
79
[5011]80## ---- Compile the GLI ----
81
[4947]82# If a file has been specified at the command-line, just compile that file
[4935]83if [ ! "x$*" = "x" ] ; then
[10422]84 echo
[12287]85 if [ "$glilang" = "es" ]; then
[6746]86 echo "Compilando $* y clases dependientes..."
[12287]87 elif [ "$glilang" = "fr" ]; then
[6711]88 echo "Compilation de $* et des classes dépendantes,,,"
[12287]89 elif [ "$glilang" = "ru" ]; then
[6706]90 echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ $* É ÚÁ×ÉÓÉÍÙÅ ËÌÁÓÓÙ..."
91 else
[8978]92 echo "Compiling $* and dependent classes..."
[6706]93 fi
[5011]94
[11801]95 $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar $*
[5011]96
[12287]97 if [ "$glilang" = "es" ]; then
[6746]98 echo "¡Hecho!"
[12287]99 elif [ "$glilang" = "fr" ]; then
[6711]100 echo "Terminé!"
[12287]101 elif [ "$glilang" = "ru" ]; then
[6706]102 echo "÷ÙÐÏÌÎÅÎÏ!"
103 else
104 echo "Done!"
105 fi
[4935]106 exit 0
107fi
108
109# Otherwise compile the lot...
[10422]110
111# Remove any existing class files first
112./clean.sh
113
[12287]114if [ "$glilang" = "es" ]; then
[6746]115 echo "Compilando la Interfaz de la Biblioteca Digital Greenstone..."
[12287]116elif [ "$glilang" = "fr" ]; then
[6711]117 echo "Compilation de Greenstone Librarian Interface,,,"
[12287]118elif [ "$glilang" = "ru" ]; then
[6706]119 echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone..."
120else
121 echo "Compiling the Greenstone Librarian Interface..."
122fi
[5011]123
[9336]124# Compile the GLI
[11801]125$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java
126$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet.java
[17002]127#$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java
[9336]128# Compile the GEMS
[11801]129$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/gems/GEMS.java
[9315]130
[13386]131# Compile the standalone programs needed on the server for remote building
132$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Zip*.java
133$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Unzip.java
134
[12287]135if [ "$glilang" = "es" ]; then
[6746]136 echo "¡Hecho!"
[12287]137elif [ "$glilang" = "fr" ]; then
[6711]138 echo "Terminé!"
[12287]139elif [ "$glilang" = "ru" ]; then
[6706]140 echo "÷ÙÐÏÌÎÅÎÏ!"
141else
142 echo "Done!"
143fi
Note: See TracBrowser for help on using the repository browser.