diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index d791842c8..403533419 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -69,6 +69,12 @@ jobs: --no-man-pages --strip-debug --compress=1 + - name: Prepare debug launcher config + shell: bash + run: envsubst '${SEMVER_STR} ${REVISION_NUM}' < dist/win/resources/debug-launcher.properties > debug-launcher.properties + env: + SEMVER_STR: ${{ needs.get-version.outputs.semVerStr }} + REVISION_NUM: ${{ needs.get-version.outputs.revNum }} - name: Run jpackage run: > ${JAVA_HOME}/bin/jpackage @@ -102,6 +108,7 @@ jobs: --java-options "-Dcryptomator.integrationsWin.keychainPaths=\"~/AppData/Roaming/Cryptomator/keychain.json\"" --resource-dir dist/win/resources --icon dist/win/resources/Cryptomator.ico + --add-launcher debug=debug-launcher.properties - name: Patch Application Directory run: | cp dist/win/contrib/* appdir/Cryptomator @@ -166,7 +173,6 @@ jobs: --resource-dir dist/win/resources --license-file dist/win/resources/license.rtf --file-associations dist/win/resources/FAvaultFile.properties - --add-launcher jfxDebug=dist/wind/resources/jfxDebug.properties env: JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs - name: Codesign MSI diff --git a/dist/win/.gitignore b/dist/win/.gitignore index 9cce929df..1e7b42a12 100644 --- a/dist/win/.gitignore +++ b/dist/win/.gitignore @@ -4,4 +4,5 @@ installer *.wixobj *.pdb *.msi -license.rtf \ No newline at end of file +license.rtf +debug.properties \ No newline at end of file diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index 1956a05cf..bb4518329 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -63,6 +63,12 @@ if ($clean -and (Test-Path -Path $appPath)) { Remove-Item -Path $appPath -Force -Recurse } +# prepare additional launcher +$debugProps = Get-Content -Path $buildDir\resources\debug-launcher.properties +$debugProps = $debugProps -replace '\${SEM_VER_STR}', "$semVerNo" +$debugProps = $debugProps -replace '\${REVISION_NUM}', "$revisionNo" +Set-Content -Path $buildDir\resources\debug.properties -Value $debugProps + # create app dir & "$Env:JAVA_HOME\bin\jpackage" ` --verbose ` @@ -93,7 +99,7 @@ if ($clean -and (Test-Path -Path $appPath)) { --java-options "-Dcryptomator.integrationsWin.keychainPaths=`"~/AppData/Roaming/$AppName/keychain.json`"" ` --java-options "-Dcryptomator.showTrayIcon=true" ` --java-options "-Dcryptomator.buildNumber=`"msi-$revisionNo`"" ` - --add-launcher jfxDebug=$buildDir\resources\jfxDebug.properties ` + --add-launcher debug=$buildDir\resources\debug.properties ` --resource-dir resources ` --icon resources/$AppName.ico diff --git a/dist/win/resources/jfxDebug.properties b/dist/win/resources/debug-launcher.properties similarity index 85% rename from dist/win/resources/jfxDebug.properties rename to dist/win/resources/debug-launcher.properties index c576525aa..d48c8e7d0 100644 --- a/dist/win/resources/jfxDebug.properties +++ b/dist/win/resources/debug-launcher.properties @@ -3,7 +3,7 @@ java-options=--enable-preview \ --enable-native-access=org.cryptomator.jfuse.win \ -Xss5m \ -Xmx256m \ - -Dcryptomator.appVersion="$semVerNo" \ + -Dcryptomator.appVersion="${SEM_VER_STR}" \ -Dfile.encoding="utf-8" \ -Dcryptomator.logDir="~/AppData/Roaming/$AppName" \ -Dcryptomator.pluginDir="~/AppData/Roaming/$AppName/Plugins" \ @@ -15,5 +15,5 @@ java-options=--enable-preview \ -Dcryptomator.integrationsWin.autoStartShellLinkName="$AppName" \ -Dcryptomator.integrationsWin.keychainPaths="~/AppData/Roaming/$AppName/keychain.json" \ -Dcryptomator.showTrayIcon=true \ - -Dcryptomator.buildNumber="msi-$revisionNo" \ + -Dcryptomator.buildNumber="msi-${REVISION_NUM}" \ -Djavafx.verbose=true \ No newline at end of file