.. include:: headings.inc .. currentmodule:: lib.softwareupdate .. highlight:: python .. _lib.softwareupdate.SoftwareUpdate: ========================================================================================================================================== |phoenix_title| **SoftwareUpdate** ========================================================================================================================================== Mix this class with wx.App and call InitForUpdates from the derived class' OnInit method. Be sure that the wx.App has set a display name (self.SetSppDisplayName) as that value will be used in the update dialogs. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **SoftwareUpdate** .. raw:: html

Inheritance diagram of SoftwareUpdate

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.softwareupdate.SoftwareUpdate.AutoCheckForUpdate` If it has been frequencyInDays since the last auto-check then check if :meth:`~lib.softwareupdate.SoftwareUpdate.CheckForUpdate` This method will check for the availability of a new update, and will :meth:`~lib.softwareupdate.SoftwareUpdate.InitUpdates` Set up the Esky object for doing software updates. Passing either the ================================================================================ ================================================================================ | |api| Class API =============== .. class:: SoftwareUpdate(object) Mix this class with wx.App and call InitForUpdates from the derived class' OnInit method. Be sure that the wx.App has set a display name (self.SetSppDisplayName) as that value will be used in the update dialogs. .. method:: AutoCheckForUpdate(self, frequencyInDays, parentWindow=None, cfg=None) If it has been frequencyInDays since the last auto-check then check if a software update is available and prompt the user to download and install it. This can be called after a application has started up, and if there is no update available the user will not be bothered. .. method:: CheckForUpdate(self, silentUnlessUpdate=False, parentWindow=None, cfg=None) This method will check for the availability of a new update, and will prompt the user with details if there is one there. By default it will also tell the user if there is not a new update, but you can pass silentUnlessUpdate=True to not bother the user if there isn't a new update available. This method should be called from an event handler for a "Check for updates" menu item, or something similar. The actual update check will be run in a background thread and this function will return immediately after starting the thread so the application is not blocked if there is network communication problems. A callback to the GUI thread will be made to do the update or report problems as needed. .. method:: InitUpdates(self, updatesURL, changelogURL=None, icon=None) Set up the Esky object for doing software updates. Passing either the base URL (with a trailing '/') for the location of the update packages, or an instance of a class derived from the esky.finder.VersionFinder class is required. A custom VersionFinder can be used to find and fetch the newer verison of the software in some other way, if desired. Call this method from the app's OnInit method.