Best practice for autoupdates

前端 未结 3 823
谎友^
谎友^ 2021-01-31 12:00

For desktop based applications, what are best practices to perform auto updates? Currently, we download all files, then copy and register (if com dll) to their respective direc

3条回答
  •  太阳男子
    2021-01-31 12:33

    The recent blog post from the Chromium team is a great guide:

    http://blog.chromium.org/2009/01/google-chrome-installation-and-updates.html

    Basically, the same thing is done when you use MS's ClickOnce and I have no problem using applications with such update method so far, so I guess this classify as a "Best practice"... but that's just me.

    1. Store each version in its own unique folder.
    2. Use a "Launcher" to launch the most updated version available and...
    3. Check for any new versions in the background after the application has launched.
    4. Download any new version found and make a new folder for that version.

    Google Chrome is a little different since they use the Google Update service to do the updating but the overall experience/cycle is pretty much the same.

    Your user launch an application, if any new version is available, it's downloaded in the background. And then the next time the application starts, your user gets the new version automatically and (if possible) silently.

提交回复
热议问题