diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 26d455b8f..a3502145a 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -29,7 +29,17 @@ jobs: with: distribution: 'zulu' java-version: ${{ env.JAVA_VERSION }} + java-package: 'jdk+fx' cache: 'maven' + - name: Ensure major jfx version in pom equals in jdk + shell: pwsh + run: | + $jfxPomVersion = (&mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) -split "\." + $jfxJdkVersion = ((Get-Content -path "${env:JAVA_HOME}/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." + if ($jfxPomVersion[0] -ne $jfxJdkVersion[0]) { + Write-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version in JDK($($jfxJdkVersion[0])) " + exit 1 + } - name: Set version run : mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }} - name: Run maven @@ -45,7 +55,7 @@ jobs: --verbose --output runtime --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr + --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr --strip-native-commands --no-header-files --no-man-pages diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index a194d4ad1..8b6a3c956 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -16,6 +16,8 @@ on: env: JAVA_VERSION: 19 + OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/19/openjfx-19_linux-x64_bin-jmods.zip' + OPENJFX_JMODS_AARCH64: 'https://download2.gluonhq.com/openjfx/19/openjfx-19_linux-aarch64_bin-jmods.zip' jobs: get-version: @@ -33,7 +35,7 @@ jobs: run: | sudo add-apt-repository ppa:coffeelibs/openjdk sudo apt-get update - sudo apt-get install debhelper devscripts dput coffeelibs-jdk-19 + sudo apt-get install debhelper devscripts dput coffeelibs-jdk-19 libgtk2.0-0 - name: Setup Java uses: actions/setup-java@v3 with: @@ -48,11 +50,39 @@ jobs: REVCOUNT: ${{ needs.get-version.outputs.revNum }} - name: Run maven run: mvn -B clean package -Pdependency-check,linux -DskipTests - - name: Create orig.tar.gz with common/ libs/ mods/ + - name: Download OpenJFX jmods + id: download-jmods + run: | + curl -L ${{ env.OPENJFX_JMODS_AMD64 }} -o openjfx-amd64.zip + mkdir -p jmods/amd64 + unzip -j openjfx-amd64.zip \*/javafx.base.jmod \*/javafx.controls.jmod \*/javafx.fxml.jmod \*/javafx.graphics.jmod -d jmods/amd64 + curl -L ${{ env.OPENJFX_JMODS_AARCH64 }} -o openjfx-aarch64.zip + mkdir -p jmods/aarch64 + unzip -j openjfx-aarch64.zip \*/javafx.base.jmod \*/javafx.controls.jmod \*/javafx.fxml.jmod \*/javafx.graphics.jmod -d jmods/aarch64 + - name: Ensure major jfx version in pom and in jmods is the same + shell: pwsh + run: | + mkdir jfxBaseJmodAmd64 + jmod extract --dir jfxBaseJmodAmd64 jmods/amd64/javafx.base.jmod + $jfxJmodVersionAmd64 = ((Get-Content -Path "jfxBaseJmodAmd64/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." + mkdir jfxBaseJmodAarch64 + jmod extract --dir jfxBaseJmodAarch64 jmods/aarch64/javafx.base.jmod + $jfxJmodVersionAarch64 = ((Get-Content -Path "jfxBaseJmodAarch64/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." + if ($jfxJmodVersionAmd64[0] -ne $jfxJmodVersionAarch64[0] ) { + Write-Error "JavaFX Jmods for aarch64 and amd64 are different major versions" + exit 1 + } + $jfxPomVersion = (&mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) -split "\." + if ($jfxPomVersion[0] -ne $jfxJmodVersionAmd64[0]) { + Write-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version of Jmods($($jfxJmodVersionAmd64[0])) " + exit 1 + } + - name: Create orig.tar.gz with common/ libs/ mods/ jmods/ run: | mkdir pkgdir cp -r target/libs pkgdir cp -r target/mods pkgdir + cp -r jmods pkgdir cp -r dist/linux/common/ pkgdir cp target/cryptomator-*.jar pkgdir/mods tar -cJf cryptomator_${{ steps.versions.outputs.ppaVerStr }}.orig.tar.xz -C pkgdir . diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 4f06953be..2b2a9c52b 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -41,8 +41,19 @@ jobs: with: distribution: 'zulu' java-version: ${{ env.JAVA_VERSION }} + java-package: 'jdk+fx' architecture: ${{ matrix.architecture }} cache: 'maven' + - name: Ensure major jfx version in pom equals in jdk + if: ${{ !contains(matrix.os, 'self-hosted') }} + shell: pwsh + run: | + $jfxPomVersion = (&mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) -split "\." + $jfxJdkVersion = ((Get-Content -path "${env:JAVA_HOME}/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." + if ($jfxPomVersion[0] -ne $jfxJdkVersion[0]) { + Write-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version in JDK($($jfxJdkVersion[0])) " + exit 1 + } - name: Set version run : mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }} - name: Run maven @@ -58,7 +69,7 @@ jobs: --verbose --output runtime --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr + --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr --strip-native-commands --no-header-files --no-man-pages diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 0725c0329..1ccf7a560 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -37,7 +37,17 @@ jobs: with: distribution: ${{ env.JAVA_DIST }} java-version: ${{ env.JAVA_VERSION }} + java-package: 'jdk+fx' cache: ${{ env.JAVA_CACHE }} + - name: Ensure major jfx version in pom equals in jdk + shell: pwsh + run: | + $jfxPomVersion = (&mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) -split "\." + $jfxJdkVersion = ((Get-Content -path "${env:JAVA_HOME}/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." + if ($jfxPomVersion[0] -ne $jfxJdkVersion[0]) { + Write-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version in JDK($($jfxJdkVersion[0])) " + exit 1 + } - name: Set version run : mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }} - name: Run maven @@ -53,7 +63,7 @@ jobs: --verbose --output runtime --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr + --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr --strip-native-commands --no-header-files --no-man-pages diff --git a/dist/linux/debian/control b/dist/linux/debian/control index 77aba901c..0f0757321 100644 --- a/dist/linux/debian/control +++ b/dist/linux/debian/control @@ -2,7 +2,7 @@ Source: cryptomator Maintainer: Cryptobot Section: utils Priority: optional -Build-Depends: debhelper (>=10), coffeelibs-jdk-19 +Build-Depends: debhelper (>=10), coffeelibs-jdk-19, libgtk2.0-0 Standards-Version: 4.5.0 Homepage: https://cryptomator.org Vcs-Git: https://github.com/cryptomator/cryptomator.git diff --git a/dist/linux/debian/rules b/dist/linux/debian/rules index 04c256f60..08bac5f56 100755 --- a/dist/linux/debian/rules +++ b/dist/linux/debian/rules @@ -5,6 +5,12 @@ #export DH_VERBOSE=1 JAVA_HOME = /usr/lib/jvm/java-19-coffeelibs +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ifeq ($(DEB_BUILD_ARCH),amd64) +JMODS_PATH = jmods/amd64:${JAVA_HOME}/jmods +else ifeq ($(DEB_BUILD_ARCH),arm64) +JMODS_PATH = jmods/aarch64:${JAVA_HOME}/jmods +endif %: dh $@ @@ -20,7 +26,8 @@ override_dh_auto_build: ln -s ../common/org.cryptomator.Cryptomator512.png resources/cryptomator.png $(JAVA_HOME)/bin/jlink \ --output runtime \ - --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr \ + --module-path "${JMODS_PATH}" \ + --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr \ --strip-native-commands \ --no-header-files \ --no-man-pages \ diff --git a/pom.xml b/pom.xml index dcafa2a5d..cd1fbb0fe 100644 --- a/pom.xml +++ b/pom.xml @@ -365,6 +365,7 @@ org.apache.maven.plugins maven-dependency-plugin + copy-mods prepare-package @@ -374,7 +375,7 @@ runtime ${project.build.directory}/mods - ${nonModularGroupIds} + org.openjfx,${nonModularGroupIds}