diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 4dcd745f5..235b75808 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -126,13 +126,6 @@ jobs: --no-man-pages --strip-debug --compress zip-0 - - name: Prepare debug launcher config - shell: bash - run: envsubst '${SEMVER_STR} ${REVISION_NUM} ${APP_NAME} ${LOOPBACK_ALIAS}' < dist/win/resources/debug-launcher.properties > dist/win/resources/CryptomatorDebug.properties - env: - SEMVER_STR: ${{ needs.get-version.outputs.semVerStr }} - REVISION_NUM: ${{ needs.get-version.outputs.revNum }} - APP_NAME: 'Cryptomator' - name: Run jpackage run: > ${JAVA_HOME}/bin/jpackage @@ -170,7 +163,7 @@ jobs: --java-options "-Djavafx.verbose=${{ inputs.isDebug }}" --resource-dir dist/win/resources --icon dist/win/resources/Cryptomator.ico - --add-launcher "CryptomatorDebug=CryptomatorDebug.properties" + --add-launcher "CryptomatorDebug=dist/win/debug-launcher.properties" - name: Patch Application Directory run: | cp dist/win/contrib/* appdir/Cryptomator diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index 359f5ea7f..c8b6e8b60 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -139,13 +139,6 @@ 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" -$debugProps = $debugProps -replace '\${APP_NAME}', "$AppName" -$debugProps = $debugProps -replace '\${LOOPBACK_ALIAS}', "$LoopbackAlias" -Set-Content -Path $buildDir\resources\${AppName}Debug.properties -Value $debugProps # create app dir @@ -182,7 +175,12 @@ Set-Content -Path $buildDir\resources\${AppName}Debug.properties -Value $debugPr --java-options "-Dcryptomator.buildNumber=`"msi-$revisionNo`"" ` --resource-dir resources ` --icon resources/$AppName.ico ` - --add-launcher "${AppName}Debug=$buildDir\resources\${AppName}Debug.properties" + --add-launcher "${AppName}Debug=$buildDir\debug-launcher.properties" ` + +if ($LASTEXITCODE -ne 0) { + Write-Error "jpackage Appimage failed with exit code $LASTEXITCODE" + return 1; +} #Create RTF license for msi &mvn -B -f $buildDir/../../pom.xml license:add-third-party "-Djavafx.platform=win" ` diff --git a/dist/win/debug-launcher.properties b/dist/win/debug-launcher.properties new file mode 100644 index 000000000..ce6d9e125 --- /dev/null +++ b/dist/win/debug-launcher.properties @@ -0,0 +1 @@ +win-console=true \ No newline at end of file diff --git a/dist/win/resources/debug-launcher.properties b/dist/win/resources/debug-launcher.properties deleted file mode 100644 index da2319047..000000000 --- a/dist/win/resources/debug-launcher.properties +++ /dev/null @@ -1,18 +0,0 @@ -win-console=true -java-options=--enable-preview \ - --enable-native-access=org.cryptomator.jfuse.win \ - -Xss5m \ - -Xmx256m \ - -Dcryptomator.appVersion="${SEM_VER_STR}" \ - -Dfile.encoding="utf-8" \ - -Dcryptomator.logDir="~/AppData/Roaming/${APP_NAME}" \ - -Dcryptomator.pluginDir="~/AppData/Roaming/${APP_NAME}/Plugins" \ - -Dcryptomator.settingsPath="~/AppData/Roaming/${APP_NAME}/settings.json" \ - -Dcryptomator.ipcSocketPath="~/AppData/Roaming/${APP_NAME}/ipc.socket" \ - -Dcryptomator.p12Path="~/AppData/Roaming/${APP_NAME}/key.p12" \ - -Dcryptomator.mountPointsDir="~/${APP_NAME}" \ - -Dcryptomator.loopbackAlias="${LOOPBACK_ALIAS}" \ - -Dcryptomator.integrationsWin.autoStartShellLinkName="${APP_NAME}" \ - -Dcryptomator.integrationsWin.keychainPaths="~/AppData/Roaming/${APP_NAME}/keychain.json" \ - -Dcryptomator.showTrayIcon=true \ - -Dcryptomator.buildNumber="msi-${REVISION_NUM}" \ No newline at end of file