diff options
Diffstat (limited to 'lvc')
-rw-r--r-- | lvc/windows/autoupdate.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lvc/windows/autoupdate.py b/lvc/windows/autoupdate.py index f6d47c8..834a45f 100644 --- a/lvc/windows/autoupdate.py +++ b/lvc/windows/autoupdate.py @@ -37,14 +37,17 @@ winsparkle = ctypes.cdll.WinSparkle APPCAST_URL = 'http://miro-updates.participatoryculture.org/lvc-appcast.xml' + def startup(): enable_automatic_checks() winsparkle.win_sparkle_set_appcast_url(APPCAST_URL) winsparkle.win_sparkle_init() + def shutdown(): winsparkle.win_sparkle_cleanup() + def enable_automatic_checks(): # We should be able to use win_sparkle_set_automatic_check_for_updates, # but that's only available after version 0.4 and the current release @@ -53,6 +56,7 @@ def enable_automatic_checks(): if not check_for_updates_set(winsparkle_key): set_default_check_for_updates(winsparkle_key) + def open_winsparkle_key(): """Open the MVC WinSparkle registry key @@ -65,6 +69,7 @@ def open_winsparkle_key(): return open_or_create_key(lvc, "WinSparkle", write_access=True) + def open_or_create_key(key, subkey, write_access=False): if write_access: sam = winreg.KEY_READ | winreg.KEY_WRITE @@ -79,6 +84,7 @@ def open_or_create_key(key, subkey, write_access=False): else: raise + def check_for_updates_set(winsparkle_key): try: winreg.QueryValueEx(winsparkle_key, "CheckForUpdates") |