pyqt application performing updates -
i have pyqt
application ready release. it's first attempt on gui thing bare me. works pretty , have 1 more thing wrap up. love software updates itself:
- check url new version;
- new version found;
- notify user of updates (click) → update.
the problem don't know how perform update. check, find new version, download , must close application , execute installer of new version. if close can't execute else, if execute installer can't close application.
based on user choices program downloads , installs third party software needs same thing: close before install program, restart after install program.
after downloading installer newer version, can use atexit.register()
os.exec*()
run installer, e.g. atexit.register(os.execl, "installer.exe", "installer.exe")
. make installer start when application exit. application exit after os.exec*()
call, no race condition occur.
Comments
Post a Comment