Esky patching procedure

105 views Asked by At

I'm trying to auto update using Esky differential patches, but I haven't been able to get the app to update using only those differential patches. It seems like a full version is always needed for a correct update.

So, if I have version 0.1 and patches plus full file versions up to 0.3 in the updates server, the client app will fetch both the patches AND the full latest version file:

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)

Also, if the latest version weren't to be available (App-0.3.win32.zip in this case), the update would fail.

The behavior I would expect is for Esky to get the patch file and update while ignoring the other full file version available so the update is blazing fast. Is there a way to achieve this?

Environment info: the freezer I'm using is cx_freeze and my Python version is 3.4.

Update-routine code:

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()

BTW, this is my first StackOverflow question ever. Thank you for taking a look at it ;)

1

There are 1 answers

4
timeyyy On

This patch is a potential short term fix for the issue.

Please give it a go and let the developers know if it works for you.