From 159773e47745569c0c41044604649b719a79ab24 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 18 Aug 2020 22:22:54 +0200 Subject: [PATCH] update --- src/main/jni/jtdlib/CMakeLists.txt | 2 ++ travis/deploy_master.sh | 11 +++++++++-- travis/linux.sh | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/jni/jtdlib/CMakeLists.txt b/src/main/jni/jtdlib/CMakeLists.txt index dd6f1b7..0d924ba 100644 --- a/src/main/jni/jtdlib/CMakeLists.txt +++ b/src/main/jni/jtdlib/CMakeLists.txt @@ -12,6 +12,8 @@ endif() find_package(Td REQUIRED) if (NOT JNI_FOUND) + set(JAVA_AWT_LIBRARY NotNeeded) + set(JAVA_AWT_INCLUDE_PATH NotNeeded) find_package(JNI REQUIRED) endif() message(STATUS "Found JNI: ${JNI_INCLUDE_DIRS} ${JNI_LIBRARIES}") diff --git a/travis/deploy_master.sh b/travis/deploy_master.sh index 79973f7..a31e2e9 100644 --- a/travis/deploy_master.sh +++ b/travis/deploy_master.sh @@ -1,8 +1,15 @@ #!/bin/bash -e # Setup variables -export PATH="$PATH:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools" -export JAVA_HOME="/c/Program Files/OpenJDK/openjdk-11.0.8_10" +if [ "$TRAVIS_OS_NAME_STANDARD" = "windows" ]; then + export PATH="$PATH:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools" + export JAVA_HOME="/c/Program Files/OpenJDK/openjdk-11.0.8_10" + export JAVA_INCLUDE_PATH="/c/Program Files/OpenJDK/openjdk-11.0.8_10/include" +else + export PATH="$PATH:/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)/bin" + export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" + export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)/include" +fi export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then diff --git a/travis/linux.sh b/travis/linux.sh index e0191cd..4d84bc4 100644 --- a/travis/linux.sh +++ b/travis/linux.sh @@ -3,10 +3,12 @@ mkdir $TRAVIS_BUILD_DIR/out cd src/main/jni -#export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" -#export PATH="$PATH:/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)/bin" sudo apt install openjdk-11-jdk-headless +export PATH="$PATH:/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)/bin" +export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" +export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)/include" + export TD_SRC_DIR=${PWD}/td export TD_BIN_DIR=${PWD}/jtdlib/td export JAVA_SRC_DIR=$(dirname `pwd`)/java