diff --git a/jenkins/docker/win64/dockerfile b/jenkins/docker/win64/dockerfile index d47547a..d5262a1 100644 --- a/jenkins/docker/win64/dockerfile +++ b/jenkins/docker/win64/dockerfile @@ -58,18 +58,18 @@ ENV TRAVIS_BUILD_DIR=/home/$UNAME/work ENV TRAVIS_OUTPUT_DIR=/home/$UNAME/output RUN sudo rm -r /home/$UNAME/openssl_cross || true -RUN sudo git clone --depth 1 https://github.com/openssl/openssl.git /home/$UNAME/openssl_cross +RUN sudo git clone --depth 1 --branch OpenSSL_1_1_1-stable --single-branch https://github.com/openssl/openssl.git /home/$UNAME/openssl_cross RUN sudo chown -R $UNAME:$UNAME /home/$UNAME/openssl_cross RUN sudo rm -r /home/$UNAME/zlib_cross || true -RUN sudo git clone --depth 1 https://github.com/madler/zlib.git /home/$UNAME/zlib_cross +RUN sudo git clone --depth 1 --branch v1.2.11 --single-branch https://github.com/madler/zlib.git /home/$UNAME/zlib_cross RUN sudo chown -R $UNAME:$UNAME /home/$UNAME/zlib_cross RUN sudo rm -r /home/$UNAME/java11_cross || true RUN sudo mkdir /home/$UNAME/java11_cross RUN sudo chown -R $UNAME:$UNAME /home/$UNAME/java11_cross RUN cd /home/$UNAME/java11_cross && \ - wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10.zip -O /home/$UNAME/java11_cross/jdk.zip && \ + wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10.zip -O /home/$UNAME/java11_cross/jdk.zip 2>/dev/null && \ unzip /home/$UNAME/java11_cross/jdk.zip -d /home/$UNAME/java11_cross/ && \ mv /home/$UNAME/java11_cross/jdk-11.0.8+10/ /home/$UNAME/java11_cross/jdk diff --git a/jenkins/scripts/cross_compile.sh b/jenkins/scripts/cross_compile.sh index dc96093..11c4c57 100755 --- a/jenkins/scripts/cross_compile.sh +++ b/jenkins/scripts/cross_compile.sh @@ -9,6 +9,7 @@ export JAVA_JVM_LIBRARY=/home/jenkins/java11_cross/jdk/lib/jvm.lib export JAVA_INCLUDE_PATH=/home/jenkins/java11_cross/jdk/include export JAVA_INCLUDE_PATH2=/home/jenkins/java11_cross/jdk/include/win32 export JAVA_AWT_INCLUDE_PATH=/home/jenkins/java11_cross/jdk/include +export LIBRARY_PATH=$LIBRARY_PATH:/home/jenkins/zlib_cross/:/home/jenkins/openssl_cross_dir/ TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/toolchain-win64.cmake # ====== Prepare TdLib @@ -24,14 +25,9 @@ nice -n 5 chrt -b 0 \ -DJAVA_JVM_LIBRARY=${JAVA_JVM_LIBRARY} \ -DJAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH} \ -DJAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2} \ + -DOPENSSL_USE_STATIC_LIBS=True \ -DOPENSSL_ROOT_DIR=/home/jenkins/openssl_cross_dir \ - -DOPENSSL_LIBRARIES_DIR=/home/jenkins/openssl_cross_dir/lib \ - -DOPENSSL_INCLUDE_DIR=/home/jenkins/openssl_cross_dir/include \ - -DOPENSSL_CRYPTO_LIBRARY=/home/jenkins/openssl_cross_dir/libcrypto-3-x64.dll \ - -DOPENSSL_SSL_LIBRARY=/home/jenkins/openssl_cross_dir/libssl-3-x64.dll \ - -DZLIB_ROOT=/home/jenkins/zlib_cross \ - -DZLIB_LIBRARY=/home/jenkins/zlib_cross/zlib1.dll \ - -DZLIB_LIBRARIES_DIR=/home/jenkins/zlib_cross \ + -DZLIB_LIBRARY=/home/jenkins/zlib_cross/lib/libz.a \ -DZLIB_INCLUDE_DIR=/home/jenkins/zlib_cross/include \ \ -DCMAKE_BUILD_TYPE=$BUILDPROFILE \ @@ -51,6 +47,11 @@ nice -n 5 chrt -b 0 cmake --build $TD_BUILD_DIR --target install --parallel ${TR cd $TD_SRC_DIR nice -n 5 chrt -b 0 php SplitSource.php --undo +# -DOPENSSL_FOUND=True \ +# -DOPENSSL_INCLUDE_DIR=/home/jenkins/openssl_cross_dir/include \ +# -DOPENSSL_CRYPTO_LIBRARY=/home/jenkins/openssl_cross_dir/lib/libcrypto.dll.a \ +# -DOPENSSL_SSL_LIBRARY=/home/jenkins/openssl_cross_dir/lib/libssl.dll.a \ +# -DZLIB_FOUND=True \ # ====== Build TdNatives cd $TDNATIVES_CPP_BUILD_DIR nice -n 5 chrt -b 0 \ @@ -63,17 +64,13 @@ nice -n 5 chrt -b 0 \ -DJAVA_JVM_LIBRARY=${JAVA_JVM_LIBRARY} \ -DJAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH} \ -DJAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2} \ + -DOPENSSL_USE_STATIC_LIBS=True \ -DOPENSSL_ROOT_DIR=/home/jenkins/openssl_cross_dir \ - -DOPENSSL_LIBRARIES_DIR=/home/jenkins/openssl_cross_dir/lib \ - -DOPENSSL_INCLUDE_DIR=/home/jenkins/openssl_cross_dir/include \ - -DOPENSSL_CRYPTO_LIBRARY=/home/jenkins/openssl_cross_dir/libcrypto-3-x64.dll \ - -DOPENSSL_SSL_LIBRARY=/home/jenkins/openssl_cross_dir/libssl-3-x64.dll \ - -DZLIB_ROOT=/home/jenkins/zlib_cross \ - -DZLIB_LIBRARY=/home/jenkins/zlib_cross/zlib1.dll \ - -DZLIB_LIBRARIES_DIR=/home/jenkins/zlib_cross \ + -DZLIB_LIBRARY=/home/jenkins/zlib_cross/lib/libz.a \ -DZLIB_INCLUDE_DIR=/home/jenkins/zlib_cross/include \ \ -DCMAKE_BUILD_TYPE=$BUILDPROFILE \ + -DCMAKE_INSTALL_PREFIX:PATH=${TD_BIN_DIR} \ -DTD_GENERATED_BINARIES_DIR=${TD_CROSS_BIN_DIR}/td/generate \ -DTD_SRC_DIR=${TD_SRC_DIR} \ -DTDNATIVES_BIN_DIR=${TDNATIVES_BIN_DIR} \