One click upgrade

I’ll soon implement “one click upgrade”, i.e. when there is an upgrade available, the GUI will show an “Upgrade!” button which when clicked will do the magic.

Will this mess things up on some platforms? Does it need a flag (env variable) to disable the behavior?

@Nutomic - specifically, can and should an app (or part of and app) upgrade itself like this Android?

This article says Google does not allow self-upgrading apps. Additionally, I’m not even sure if the binary is writable.

Gotcha. So there will at least need to be a mechanism to disable any auto / one-click upgrades.

Don’t bother with a self-update feature for the Android version, at least not initially. Google Play (and several other Android app stores) can already automatically update applications as new versions become available.

The the Amazon App Store and the beta version of 1Password have self-updating, but those apps are not available through any app stores. It’s kind of annoying to have them prompt for an upgrade and spend several seconds doing their thing before you can use them. Perhaps someone running a custom ROM without an app store might find self-update useful?

Well, self-updating binaries are a bad idea on itself. And mostly, they don’t even have a chance to modify themselves (Linux: /usr is only writeable by root; Windows: C:\Program Files is only writeable by the administrator (or by using the UAC); OS X: I don’t know, but don’t think so, sudo!).

Binaries are safe. Once the administrator (probably you) installed them, they shouldn’t be modified. If they were modiefiable (does this word even exist?), every malware and/or every user could modify them.

And this would break the package management (see issue #157).

Personally, I have “installed” (copied) syncthing to /usr/local/bin/.