[jpackage] Issue with upgrading from javapackager to jpackage on Windows

Daniel Peintner daniel.peintner at gmail.com
Thu Feb 27 07:00:19 UTC 2020


Alexey, all,

In my case the update, as described, seems to work just fine. However once
I try to actually start the application nothing happens. It silently fails.

Could this be a reason why you don't encounter any issue? Just an idea
though...

-- Daniel


Alexey Semenyuk <alexey.semenyuk at oracle.com> schrieb am Mi., 26. Feb. 2020,
22:56:

> Daniel,
>
> Interesting. We have jtreg tests for testing upgrade scenarios on
> Windows and they work without Upgrade element in WiX template.
>
> - Alexey
>
> On 2/26/2020 11:10 AM, Daniel Peintner wrote:
> > All,
> >
> > after some private discussions with James and @Kevinnns I believe the
> > necessary change to let upgrades succeed is rather minimal.
> >
> > The WIX template jpackage uses
> >
> > <Product Id="*" Name="$(var.AppName)" Language="1033"
> > Version="$(var.AppVersion)" Manufacturer="$(var.AppVendor)"
> > UpgradeCode="$(var.AppUpgradeCode)">
> >
> > needs to have
> >
> > <Upgrade Id="$(var.AppUpgradeCode)" />
> >
> > as well within the product element.
> >
> > I wonder whether anyone in the jpackage team is willing to work or look
> > into this proposed change. Or does this cause any other issue I am not
> > aware of?
> >
> > As said, I think this would be a big help for anyone coming from the
> *old*
> > javapackager tool.
> >
> > Thanks,
> >
> > -- Daniel
> >
> >
> >
> >
> >
> >
> > On Tue, Feb 25, 2020 at 4:30 PM Daniel Peintner <
> daniel.peintner at gmail.com>
> > wrote:
> >
> >> Hi James, all,
> >>
> >> Thank you for your feedback.
> >>
> >> I did try around and I think there is a jpackage upgrade ID option now.
> >>
> >> --win-upgrade-uuid <string> — UUID associated with upgrades for this
> >> package
> >>
> >> In my case though, I think I run into some other issues. The InnoSetup
> >> installer seems not to provide any UUID.
> >>
> >> I believe I also found a related issue [1] that mentions UUID and
> >> InnoSetup but unfortunately that didn't help me either.
> >>
> >> Thanks again for any help,
> >>
> >> -- Daniel
> >>
> >> [1] https://bugs.openjdk.java.net/browse/JDK-8214564
> >>
> >>
> >>
> >> On Mon, Feb 17, 2020 at 5:38 PM James Elliott <james at deepsymmetry.org>
> >> wrote:
> >>
> >>> 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