portfolio-performance / portfolio

Track and evaluate the performance of your investment portfolio across stocks, cryptocurrencies, and other assets.
http://www.portfolio-performance.info
Eclipse Public License 1.0
2.95k stars 606 forks source link

Upgrade doesn't change release number in registry #3658

Open m-terlinde opened 11 months ago

m-terlinde commented 11 months ago

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

chirlu commented 11 months ago

Related to #3016

m-terlinde commented 11 months ago

Thanks, haven't found the issue!

Nirus2000 commented 11 months ago

Related to #3663

buchen commented 11 months ago

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:

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.