我正在尝试使用艾斯基差异补丁进行自动更新,但我还无法让应用程序仅使用这些差异补丁进行更新。似乎总是需要一个完整的版本来进行正确的更新。
因此,如果更新服务器中有0.1版和补丁,加上0.3的完整文件版本,客户端应用程序将同时获取修补程序和完整的最新版本文件:
updatesServer/
App-0.1.win32.zip (client version running)
App-0.2.win32.zip (this isn't fetched)
App-0.2.win32.from-0.1.patch (this is fetched first)
App-0.3.win32.zip (this is fetched third)
App-0.3.win32.from-0.2.patch (this is fetched second)此外,如果无法获得最新版本(App-0.3.win32.zip,本例中为App-0.3.win32.zip),则更新将失败。
我期望的行为是Esky获得补丁文件并进行更新,同时忽略其他可用的完整文件版本,因此更新非常迅速。有办法做到这一点吗?
环境信息:我使用的冰箱是cx_freeze,我的Python版本是3.4。
更新-例行代码:
from esky import *
from esky.util import appexe_from_executable
def restart_this_app():
appexe = appexe_from_executable(sys.executable)
os.execv(appexe,[appexe] + sys.argv[1:])
if hasattr(sys, "frozen"):
app = esky.Esky(sys.executable, UPDATES_URL)
print("You are running version "+app.active_version)
print("Looking for updates...")
if app.find_update() is None:
print("No updates have been found.")
else:
print("Updates available. Updating...")
try:
app.auto_update()
except Exception as e:
print("Error while updating:", e)
else:
print("Update complete.")
print("Restarting app...")
time.sleep(3)
restart_this_app()顺便说一句,这是我第一个StackOverflow问题。(谢谢你看一看;)
发布于 2016-02-13 21:01:28
这个补丁是解决这一问题的潜在短期解决方案。
请试一试,让开发者知道它是否适合你。
https://stackoverflow.com/questions/35383676
复制相似问题