replace/substitute variables in debug launcher

This commit is contained in:
Armin Schrenk 2023-02-06 12:15:03 +01:00
parent cf9663fc26
commit 1102f73680
No known key found for this signature in database
GPG Key ID: 8F2992163CBBA7FC
4 changed files with 18 additions and 5 deletions

View File

@ -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

3
dist/win/.gitignore vendored
View File

@ -4,4 +4,5 @@ installer
*.wixobj
*.pdb
*.msi
license.rtf
license.rtf
debug.properties

8
dist/win/build.ps1 vendored
View File

@ -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

View File

@ -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