source: trunk/gli/makegli.sh@ 6223

Last change on this file since 6223 was 6223, checked in by mdewsnip, 20 years ago

Added a blank line after the GPL message.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1#!/bin/sh
2
3echo 'Greenstone Librarian Interface (GLI)'
4echo 'Copyright (C) 2002 Greenstone Digital Libraries, University Of Waikato'
5echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
6echo 'This is free software, and you are welcome to redistribute it'
7echo
8
9## -------- Compile the Greenstone Librarian Interface --------
10
11## ---- Check Javac exists ----
12javacpath=
13
14# Some users may set the above line manually
15if [ "$javacpath" == "" ]; then
16
17 # If it is set, use the JAVAHOME environment variable
18 if [ "$JAVAHOME" != "" ]; then
19 javacpath="$JAVAHOME/bin/javac"
20
21 # Check if Javac is on the search path
22 else
23 javacpath=`which javac 2> /dev/null`
24 fi
25fi
26
27# Check that a Javac executable has been found
28echo "Checking Javac: $javacpath"
29if [ ! -x "$javacpath" ]; then
30 echo
31 echo "Failed to locate an appropriate version of Javac. You must install a"
32 echo "Java Development Kit (version 1.4 or greater) before compiling the"
33 echo "Greenstone Librarian Interface."
34 exit 1
35fi
36
37# Check that the version of javac is new enough (1.4.0 or higher) to compile the GLI
38javacOK=`$javacpath -target 1.4 2>&1`
39if [ ! "$javacOK" = "" ]; then
40 # Special code for javac 1.4.2, since it complains about "no source files"
41 javacOK142=`$javacpath -target 1.4 2>&1 | grep "javac: no source files"`
42 if [ "$javacOK142" = "" ]; then
43 echo
44 echo "The version of the Java Development Kit you have installed is too old"
45 echo "to compile the Greenstone Librarian Interface. Please install a new"
46 echo "version of the Java SDK (version 1.4 or newer) and rerun this script."
47 exit 1
48 fi
49fi
50
51
52## ---- Compile the GLI ----
53echo
54
55# If a file has been specified at the command-line, just compile that file
56if [ ! "x$*" = "x" ] ; then
57 echo "Compiling $* and dependant classes..."
58
59 $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar $*
60
61 echo "Done!"
62 exit 0
63fi
64
65# Otherwise compile the lot...
66echo "Compiling the Greenstone Librarian Interface..."
67
68$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/*.java
69$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/cdm/*.java
70$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/checklist/*.java
71$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/collection/*.java
72$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/file/*.java
73$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/*.java
74$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/border/*.java
75$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/metaaudit/*.java
76$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/tree/*.java
77$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/help/*.java
78$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/mem/*.java
79$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/msm/*.java
80$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/msm/parsers/*.java
81$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/shell/*.java
82$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/undo/*.java
83$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/util/*.java
84$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/valuetree/*.java
85
86echo "Done!"
Note: See TracBrowser for help on using the repository browser.