0
我試圖使用Esky差異修補程序自動更新,但我一直無法使用更新應用程序,只有這些差異修補程序。看起來總是需要完整版本才能進行正確的更新。Esky修補程序
所以,如果我有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),則更新將失敗。
behavior我期望的是,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上有史以來。感謝您看看它;)
我現成的esky pip 0.9.9安裝有些過時,所以我安裝了esky 0.9.10.dev0來自補丁的官方回購。但是,問題依然存在。我會盡力幫助壓扁這個bug。 –
該修補程序尚未應用,因爲我們仍然不知道是什麼原因導致問題(沒有時間),只有在從遠程URL安裝修補程序時纔會引發異常。 https://github.com/cloudmatrix/esky/issues/113 – timeyyy
另外,你能告訴我們你使用的是什麼操作系統嗎?例如,在OSX上,來自修補程序的更新不起作用。我已經能夠使用Linux和Windows的補丁,但是我必須承認,我沒有讓它們競爭(只有補丁存在於服務器上)。 – Rififi