mtkennerly / ludusavi

Backup tool for PC game saves
MIT License
2.54k stars 57 forks source link

Built-in Updater #361

Closed darklinkpower closed 2 months ago

darklinkpower commented 3 months ago

What's your idea?

I think it would be really useful for Ludusavi to have a built-in updater for the application itself. This would be helpful to eliminate the need to manually update the software each new version, and would also help people that don't keep track of new releases, which could cause people to remain in old versions unknowingly.

mainrs commented 3 months ago

Bringing in some more perspective. I am a Linux user. Concerning me, updates are a distribution problem, not an application problem. Whether I install the package through the OS' package manager or using flatpak, I'd expect updates to be installed via the same channel. Self-updating applications on Linux are rare.

I was wondering which OS you use. Since on Windows, apps are expected to update themselves most of the time. Nowadays there is the official Windows package manager winget. Which could also be leveraged for automatic update distribution.

On macOS most apps are installed from the app store. And the ones that are installed manually do self-update.

darklinkpower commented 3 months ago

I see, I was not familiar with how it worked in those OSes. I'm on Windows as you deducted and generally software provide update functionality either in the form of a self-updater or at least functionality to check if a new version is available on startup and direct the user to the download page if that's the case.

mtkennerly commented 3 months ago

Yeah, I wouldn't want to implement auto-updating for the reasons @mainrs mentioned. Even on Windows, Ludusavi doesn't know if you used Winget, Scoop, or Cargo to install it - and if you did, then updates should go through those tools.

I wouldn't mind adding something on startup that just says there's a new version available, though.

mtkennerly commented 2 months ago

Other screen:

Screenshot 2024-07-19 001258

On startup:

Screenshot 2024-07-18 232422

darklinkpower commented 2 months ago

Thank you, this will be really helpful!

Also I just thought of something else when I saw the image, in case it's not contemplated currently. Is there some sort of mechanism to detect if a new version is available externally? Use case, if someone only uses Ludusavi Playnite, without opening the Ludusavi app, there's the chance that they might not be aware there's a new version out. Perhaps there could be a command line to detect if a new version is available? Perhaps it could even give back the release notes url that you are redirected in the Ludusavi app so the caller can also redirect to it, which in the case of Ludusavi Playnite it could be done as a notification message.

Another idea is that it could also detect if a new version is available when updating the manifest and automatically redirect to it but I'm not a fan of the idea of coupling both together.

mtkennerly commented 2 months ago

@darklinkpower That's a good idea :) I'll look into incorporating this in the Playnite plugin after the next release:

$ ludusavi api '{"requests": [{"checkAppUpdate": {}}]}'
{
  "responses": [
    {
      "checkAppUpdate": {
        "update": {
          "version": "9.9.9",
          "url": "https://github.com/mtkennerly/ludusavi/releases/tag/v9.9.9"
        }
      }
    }
  ]
}