From 370b6e57cca69c186cff4c2cdfd86edfdb3e2f8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?= Date: Sat, 30 Jan 2021 18:38:13 +0000 Subject: [PATCH] Fix pathnames --- compile.sh | 7 +++++-- convert_to_v6.sh | 2 +- run.sh | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compile.sh b/compile.sh index 0d577aa..da057ce 100755 --- a/compile.sh +++ b/compile.sh @@ -1,4 +1,4 @@ -ICU4J=/usr/share/java/icu4j-49.1.jar +ICU4J=/usr/share/java/icu4j.jar test -r "$ICU4J" || ICU4J=/usr/share/icu4j-55/lib/icu4j.jar JUNIT=/usr/share/java/junit.jar test -r "$JUNIT" || JUNIT=/usr/share/junit/lib/junit.jar @@ -25,8 +25,11 @@ if [ ! -r "$COMMONS_COMPRESS" ] ; then echo "commons-compress needs to be installed" exit 1; fi +JAVAC=/usr/lib/jvm/java-8-openjdk-amd64/bin/javac +test -x "$JAVAC" || JAVAC=javac + mkdir -p bin # -encoding is just a work around for user that still run systems # with non-UTF8 locales # Limit to Java 11 for compatibility with native-image -javac --source 11 --target 11 --limit-modules java.xml,java.logging -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" +$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" diff --git a/convert_to_v6.sh b/convert_to_v6.sh index 2443c1c..426a10c 100755 --- a/convert_to_v6.sh +++ b/convert_to_v6.sh @@ -1,6 +1,6 @@ RUNNER=./DictionaryPC if ! test -x "$RUNNER" ; then - JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java + JAVA=/usr/lib/jvm/java-8-openjdk-amd64/bin/java test -x "$JAVA" || JAVA=java RUNNER="$JAVA -classpath bin/ com.hughes.android.dictionary.engine.Runner" fi diff --git a/run.sh b/run.sh index 3a3c1d9..1351418 100755 --- a/run.sh +++ b/run.sh @@ -1,13 +1,13 @@ RUNNER=./DictionaryPC if ! test -x "$RUNNER" ; then # -agentlib:hprof=heap=sites,depth=20 - ICU4J=/usr/share/java/icu4j-49.1.jar + ICU4J=/usr/share/java/icu4j.jar test -r "$ICU4J" || ICU4J=/usr/share/icu4j-55/lib/icu4j.jar COMMONS_LANG3=/usr/share/java/commons-lang3.jar test -r "$COMMONS_LANG3" || COMMONS_LANG3=/usr/share/commons-lang-3.3/lib/commons-lang.jar COMMONS_TEXT=/usr/share/java/commons-text.jar COMMONS_COMPRESS=/usr/share/java/commons-compress.jar - JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java + JAVA=/usr/lib/jvm/java-8-openjdk-amd64/bin/java test -x "$JAVA" || JAVA=java RUNNER="$JAVA -Djava.util.logging.config.file=logging.properties -Xmx4096m -classpath bin/:$ICU4J:$COMMONS_LANG3:$COMMONS_TEXT:$COMMONS_COMPRESS com.hughes.android.dictionary.engine.Runner" fi -- 2.43.0