[jpackage] Issue with upgrading from javapackager to jpackage on Windows
James Elliott
james at deepsymmetry.org
Mon Feb 17 16:37:07 UTC 2020
Sorry, tried sending this with the incorrect email personality first.
On Mon, 17 Feb 2020 15:32:14 +0100 Daniel Peintner <daniel.peintner at gmail.com <mailto:daniel.peintner at gmail.com>> wrote:
> The only *working* solution we found was to *manually* uninstall the old
> application before starting msi installer.
> Any future update with msi installers work fine. But the first update fails!
I had been previously manually creating WiX installers (with the help of a script built by one of my Windows-based users), and he discovered the same problem when I migrated to jpackage. It turns out that the jpackage-built WiX installers are missing an upgrade ID. I mentioned that on this list a few weeks ago, but there was not any interest in investigating the issue.
So now I use jpackage to just create the application image, and then separately use WiX directly to create an installer that can properly upgrade older installations. You can find the GitHub Actions workflow that drives the process here:
https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/workflows/uberjar.yml#L84-L144 <https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/workflows/uberjar.yml#L84-L144>
The PowerShell script that runs jpackage and WiX is here:
https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/scripts/build_msi.ps1 <https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/scripts/build_msi.ps1>
And the WIX template it uses is here:
https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/resources/MSI%20Template.wxs <https://github.com/Deep-Symmetry/beat-link-trigger/blob/master/.github/resources/MSI%20Template.wxs>
Hopefully this can help you, and perhaps jpackage can be updated to do this on its own as well.
Cheers,
-James
More information about the core-libs-dev
mailing list