1 | #!/bin/sh
|
---|
2 |
|
---|
3 | echo 'Greenstone Librarian Interface (GLI)'
|
---|
4 | echo 'Copyright (C) 2002 Greenstone Digital Libraries, University Of Waikato'
|
---|
5 | echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
|
---|
6 | echo 'This is free software, and you are welcome to redistribute it'
|
---|
7 | echo
|
---|
8 |
|
---|
9 | ## -------- Compile the Greenstone Librarian Interface --------
|
---|
10 |
|
---|
11 | ## ---- Check Javac exists ----
|
---|
12 | javacpath=
|
---|
13 |
|
---|
14 | # Some users may set the above line manually
|
---|
15 | if [ "$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
|
---|
25 | fi
|
---|
26 |
|
---|
27 | # Check that a Javac executable has been found
|
---|
28 | echo "Checking Javac: $javacpath"
|
---|
29 | if [ ! -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
|
---|
35 | fi
|
---|
36 |
|
---|
37 | # Check that the version of javac is new enough (1.4.0 or higher) to compile the GLI
|
---|
38 | javacOK=`$javacpath -target 1.4 2>&1`
|
---|
39 | if [ ! "$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
|
---|
49 | fi
|
---|
50 |
|
---|
51 |
|
---|
52 | ## ---- Compile the GLI ----
|
---|
53 | echo
|
---|
54 |
|
---|
55 | # If a file has been specified at the command-line, just compile that file
|
---|
56 | if [ ! "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
|
---|
63 | fi
|
---|
64 |
|
---|
65 | # Otherwise compile the lot...
|
---|
66 | echo "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 |
|
---|
86 | echo "Done!"
|
---|