]> gitweb.fperrin.net Git - DictionaryPC.git/blob - compile.sh
Fix pathnames
[DictionaryPC.git] / compile.sh
1 ICU4J=/usr/share/java/icu4j.jar
2 test -r "$ICU4J" || ICU4J=/usr/share/icu4j-55/lib/icu4j.jar
3 JUNIT=/usr/share/java/junit.jar
4 test -r "$JUNIT" || JUNIT=/usr/share/junit/lib/junit.jar
5 COMMONS=/usr/share/java/commons-lang3.jar
6 test -r "$COMMONS" || COMMONS=/usr/share/commons-lang-3.3/lib/commons-lang.jar
7 COMMONS_COMPRESS=/usr/share/java/commons-compress.jar
8 if [ ! -x ../Dictionary ] ; then
9     echo "You need to clone the Dictionary repository (including subprojects) into .."
10     exit 1
11 fi
12 if [ ! -r "$ICU4J" ] ; then
13     echo "ICU4J needs to be installed"
14     exit 1;
15 fi
16 if [ ! -r "$JUNIT" ] ; then
17     echo "Junit needs to be installed"
18     exit 1;
19 fi
20 if [ ! -r "$COMMONS" ] ; then
21     echo "commons-lang needs to be installed"
22     exit 1;
23 fi
24 if [ ! -r "$COMMONS_COMPRESS" ] ; then
25     echo "commons-compress needs to be installed"
26     exit 1;
27 fi
28 JAVAC=/usr/lib/jvm/java-8-openjdk-amd64/bin/javac
29 test -x "$JAVAC" || JAVAC=javac
30
31 mkdir -p bin
32 # -encoding is just a work around for user that still run systems
33 # with non-UTF8 locales
34 # Limit to Java 11 for compatibility with native-image
35 $JAVAC -Xlint:all -encoding UTF-8 -g -d bin/ ../Dictionary/Util/src/com/hughes/util/*.java ../Dictionary/Util/src/com/hughes/util/raf/*.java ../Dictionary/src/com/hughes/android/dictionary/DictionaryInfo.java ../Dictionary/src/com/hughes/android/dictionary/engine/*.java ../Dictionary/src/com/hughes/android/dictionary/C.java src/com/hughes/util/*.java src/com/hughes/android/dictionary/*.java src/com/hughes/android/dictionary/*/*.java src/com/hughes/android/dictionary/*/*/*.java -classpath "$ICU4J:$JUNIT:$COMMONS:$COMMONS_COMPRESS"