Skip to content
Permalink
Browse files
Merge pull request #102 from geoffreyblake/windows_fixes
Update build to allow cross-builds of Windows DLLs on Ubuntu 14.04, and enable TravisCI to verify Windows builds work
  • Loading branch information
garydgregory committed Jul 24, 2020
2 parents 11d6551 + 3a66d88 commit 58124c9345df18e221206b1ebf26db1246788f3e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 10 deletions.
@@ -19,11 +19,44 @@ language: java
matrix:
include:

- name: "x64 / Ubuntu 14.04 / Java 8 / OpenSSL 1.0.x"
# This job tests x64 and i386 builds. Tests x64 for proper execution.
- name: "x64,i386 / Ubuntu 14.04 / Java 8 / OpenSSL 1.0.x"
arch: amd64
os: linux
dist: trusty
jdk: openjdk8
addons:
apt:
packages:
- gcc-multilib
- g++-multilib
env:
- OPENSSL_HOME=/usr/
install: |
sudo ln -s /usr/include/x86_64-linux-gnu /usr/include/i386-linux-gnu
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Plinux32
# Job tests win32,win64 builds. But cannot test execution.
- name: "win32,win64 / Ubuntu 14.04 / Java 8 / OpenSSL 1.0.x"
arch: amd64
os: linux
dist: trusty
jdk: openjdk8
addons:
apt:
packages:
- gcc-mingw-w64
- g++-mingw-w64
- libssl-dev
env:
- OPENSSL_HOME=/usr/
install: |
sudo ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pwin64
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pwin32
script: echo DONE
after_success: echo DONE

- name: "x64 / Ubuntu 18.04 / Java 8 / OpenSSL 1.1.x"
arch: amd64
@@ -36,23 +69,21 @@ matrix:
os: linux
dist: xenial
jdk: openjdk8
env:
- JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-arm64
addons:
apt:
packages:
- openjdk-8-jdk-headless
- maven

- name: "aarch64 / Ubuntu 18.04 / Java 8 / OpenSSL 1.1.x"
arch: arm64
os: linux
dist: bionic
jdk: openjdk8
env:
- JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-arm64
addons:
apt:
packages:
- openjdk-8-jdk-headless
- maven

- name: "ppc64le / Ubuntu 16.04 / Java 8 / OpenSSL 1.0.x"
@@ -208,17 +208,17 @@ FreeBSD-x86_64_COMMONS_CRYPTO_FLAGS :=
Windows-x86_CC := $(CROSS_PREFIX)gcc
Windows-x86_CXX := $(CROSS_PREFIX)g++
Windows-x86_STRIP := $(CROSS_PREFIX)strip
Windows-x86_CFLAGS := -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_CXXFLAGS := -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_CFLAGS := -I/usr/share/mingw-w64/include -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_CXXFLAGS := -I/usr/share/mingw-w64/include -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_LINKFLAGS := -Wl,--kill-at -shared -static
Windows-x86_LIBNAME := commons-crypto.dll
Windows-x86_COMMONS_CRYPTO_FLAGS :=

Windows-x86_64_CC := $(CROSS_PREFIX)gcc
Windows-x86_64_CXX := $(CROSS_PREFIX)g++
Windows-x86_64_STRIP := $(CROSS_PREFIX)strip
Windows-x86_64_CFLAGS := -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_64_CXXFLAGS := -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_64_CFLAGS := -I/usr/share/mingw-w64/include -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_64_CXXFLAGS := -I/usr/share/mingw-w64/include -I"$(JAVA_HOME)/include" -I"$(OPENSSL_HOME)/include" -Ilib/inc_win -O2 -fno-inline
Windows-x86_64_LINKFLAGS := -Wl,--kill-at -shared -static
Windows-x86_64_LIBNAME := commons-crypto.dll
Windows-x86_64_COMMONS-CRYPTO_FLAGS :=
@@ -148,7 +148,7 @@ void *do_version_dlsym(JNIEnv *env, void *handle) {
#pragma warning(disable:4267) // Possible loss of data.
#pragma warning(disable:4996) // Use of deprecated function.

#include <Windows.h>
#include <windows.h>
#include <stdio.h>
#include <jni.h>

0 comments on commit 58124c9

Please sign in to comment.