How can I enable auto-updates in a Qt cross-platform application?

前端 未结 12 515
孤街浪徒
孤街浪徒 2020-12-22 18:37

I love applications that are able to update themselves without any effort from the user (think: Sparkle framework for Mac). Is there any code/library I can leverage to do th

12条回答
  •  [愿得一人]
    2020-12-22 19:41

    I've developed an auto-updater library which works beautifully on Mac OS X, Linux and pretty much every Unix that allows you to unlink a file while the file is still open. The reason being that I simply extracted the downloaded package on top of the existing application. Unfortunately, because I relied on this functionality, I ran into problems on Windows as Windows does not let you unlink an open file.

    The only alternative I could find is to use MoveFileEx with the replace on reboot flag, but that is awful.

    However, renaming the working directory of the application works on Windows 7 and Windows XP. I haven't tried Windows Vista yet.

提交回复
热议问题