portfolio icon indicating copy to clipboard operation
portfolio copied to clipboard

Upgrade doesn't change release number in registry

Open m-terlinde opened this issue 1 year ago • 4 comments

Describe the bug When using the auto-update mechanism of Portfolio Performance, the version number known to Windows is not changed accordingly.

To Reproduce Steps to reproduce the behavior:

  1. Install old version of PP
  2. Check number using winget (winget upgrade) or the "remove programms" Windows dialog
  3. Let PP auto update
  4. Check winget or Windows dialog again

Expected behavior The auto update should push the new version number. I suppose it's the registry.

Screenshots grafik

grafik

grafik

Desktop (please complete the following information): Edition Windows 11 Education Version 22H2 Installiert am ‎12.‎03.‎2023 Betriebssystembuild 22621.2715 Leistung Windows Feature Experience Pack 1000.22677.1000.0

m-terlinde avatar Nov 19 '23 18:11 m-terlinde

Related to #3016

chirlu avatar Nov 19 '23 18:11 chirlu

Thanks, haven't found the issue!

m-terlinde avatar Nov 19 '23 20:11 m-terlinde

~~Related to #3663~~

Nirus2000 avatar Nov 24 '23 07:11 Nirus2000

As the linked #3016 explains, the installation (via a Windows installer) and the self-update (via the Eclipse Java self-update tools) are separate mechanisms. The self-update mechanism does not update the Windows registry.

I want to continue to use the Eclipse self-update mechanism because it allows to make the update size fairly small and provides some control how to update certain configurations.

One possibility could that the Java code also update the registry information:

  • Only on Windows, of course. And only after a successful update.
  • The code would have to reliably identify that the installation was done with the installer (one could also just unzip)
  • The code would have to reliably identify which of the registry entries are about the current installation (there could be multiple)
  • Work on the different Windows versions.

I found this link how to manipulate the registry - I do not think it is a good idea to use the answer using reflection (apart from the license), but calling the reg utility sounds okay. https://stackoverflow.com/questions/62289/read-write-to-windows-registry-using-java

I am happy to entertain a pull request the seeks to address this. Personally, I am not sure if it is worth the effort (particularly in testing).

@m-terlinde You can set the the property name.abuchen.portfolio.in-app-update=disable if you want to disable the self-update mechanism and only use winget. This is what we are using for the Linux Flatpak installation because it comes with its own update mechanism.

buchen avatar Dec 12 '23 08:12 buchen