From 18dce94658d562b22e9f93a35c94c75e9902c9f4 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 13 Nov 2025 14:30:04 +0100 Subject: [PATCH] if jdk is build with jep-493-flag, use jimage to extract wixhelper --- .github/workflows/win-exe.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index d02ce2200..951a78b8a 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -102,10 +102,13 @@ jobs: id: jep-493-check run: | JMOD_PATHS="openjfx-jmods" + JVM_JMODS_PRESENT="false" if ! $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then JMOD_PATHS="${JAVA_HOME}/jmods;${JMOD_PATHS}" + JVM_JMODS_PRESENT="true" fi echo "jmod_paths=${JMOD_PATHS}" >> "$GITHUB_OUTPUT" + echo "jvm-with-jmods=${JVM_JMODS_PRESENT}" >> "$GITHUB_OUTPUT" - name: Run jlink # Remark: no compression is applied for improved build compression later (here msi) run: > @@ -185,9 +188,13 @@ jobs: - name: Extract wixhelper.dll for Codesigning #see https://github.com/cryptomator/cryptomator/issues/3130 shell: pwsh run: | - New-Item -Path appdir/jpackage-jmod -ItemType Directory - & $env:JAVA_HOME\bin\jmod.exe extract --dir jpackage-jmod "${env:JAVA_HOME}\jmods\jdk.jpackage.jmod" - Get-ChildItem -Recurse -Path "jpackage-jmod" -File wixhelper.dll | Select-Object -Last 1 | Copy-Item -Destination "appdir" + $extractDir = New-Item -Path ".\dir-with-wixhelper" -ItemType Directory + if( '${{ steps.jep-493-check.outputs.jvm-with-jmods }}' -eq 'true' ) { + & $env:JAVA_HOME\bin\jmod.exe extract --dir=$extractDir "${env:JAVA_HOME}\jmods\jdk.jpackage.jmod" + } else { + & $env:JAVA_HOME\bin\jimage.exe extract --dir=$extractDir "${env:JAVA_HOME}\lib\modules" + } + Get-ChildItem -Recurse -Path $extractDir -File wixhelper.dll | Select-Object -Last 1 | Copy-Item -Destination "appdir" - name: Sign DLLs with Azure Trusted Signing if: inputs.sign || github.event_name == 'release' uses: ./.github/actions/win-sign-action