自动更新软件的设计 [英] Design of auto-updating software

查看:215
本文介绍了自动更新软件的设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,您将如何设计一个支持直接且可靠的自动更新的应用程序?

Simply put, how would you design an application that supports straightforward and reliable auto-updating?

我对它的切割方式以及所涉及的各种操作很感兴趣.

I'm interested in how it could be cut up and the various operations involved.

这与以下问题相关:自毁应用程序

推荐答案

需要处理的问题:

  • 如果执行更新的应用程序正在更新本身,则将需要重新启动,或者需要执行存根将文件移到适当位置(以避免使用中的文件错误.)

  • If the app that does the updating is itself being updated, a restart is going to need to occur, or a stub would need to be executed to move the file into place (to avoid a file-in-use error.)

与您通过网络请求与之通信以获取文件的任何服务都需要知道您正在运行的安装软件包的当前版本.它会动态生成文件URL列表,甚至可以压缩文件并将其放在客户端的单个URL中.否则,让客户端浏览URL列表,拉出每个文件.每个URL都将与一个操作相关联,例如复制"或执行".

Whatever service you're communicating with to retrieve files via a web request would need to know what current version of installed package you're running. It would dynamically build the file URL list and maybe even zip up a file and put it out at a single URL for the client. Otherwise, have the client walk through the URL list, pulling each file. Each URL would be associated with an operation, such as 'copy' or 'execute'.

处理每个检索到的文件并将其安装到客户端.

Process each retrieved file and install it to the client.

更新必须是原子的(如果操作的任何部分失败,则可以回滚.)您不希望处于部分状态.

Update needs to be atomic (ability to rollback if any part of the operation fails.) You don't want to be left in a partial state.

这篇关于自动更新软件的设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆