canmove, Confirmed users
1,570
edits
No edit summary |
|||
| Line 25: | Line 25: | ||
==AddonInstall== | ==AddonInstall== | ||
The [[Extension Manager:API Rewrite:API#AddonInstall|AddonInstall]] object represents an add-on that is not yet installed or has just been installed. It may come from an update check to an existing add-on, a request to install a new add-on or a search for new add-ons. It tracks the high level progress of any necessary downloads and installation of the add-on. | The [[Extension Manager:API Rewrite:API#AddonInstall|AddonInstall]] object represents an add-on that is not yet installed or has just been installed. It may come from an update check to an existing add-on, a request to install a new add-on or a search for new add-ons. It tracks the high level progress of any necessary downloads, dependencies and installation of the add-on. | ||
The AddonInstall goes through a set of states: | The AddonInstall goes through a set of states: | ||
[[File:AddonInstallStates.png|center]] | |||
;Available :Represents an add-on that is known to be available for install. Depending on where the AddonInstall came from there may be very little information about the add-on available. | ;Available :Represents an add-on that is known to be available for install. Depending on where the AddonInstall came from there may be very little information about the add-on available. | ||
;Downloading :This state | ;Downloading :This state is used to show that downloads are in progress for the add-on. Almost all add-ons consist of a single file to download. Once the file is downloaded the Checking state may be entered if additional information is required, otherwise the Downloaded state is entered. | ||
;Downloaded :At this point all the | ;Checking :In some cases the additional information about version compatibility and dependencies may be required. The Checking state is used for small lookup requests for these and then dependant on the result the AddonInstall may move back to the Downloading state or on to the Downloaded state. | ||
;Downloaded :At this point all the necessary parts of the add-on are available on the computer. It is here that the user may be asked if they want to proceed with the installation. | |||
;Installing :Here the add-on is being installed by its provider. This may cover file extraction etc. | ;Installing :Here the add-on is being installed by its provider. This may cover file extraction etc. | ||
;Installed :Here the add-on has been installed and its Addon object will appear in AddonManager.getAddons. The add-on itself however may not be active until after an application restart. | ;Installed :Here the add-on has been installed and its Addon object will appear in AddonManager.getAddons. The add-on itself however may not be active until after an application restart. | ||
Once the install process for an AddonInstall is started with <code>startInstall</code> it will move through all of the states naturally sending out notifications at each transition and some progress events in between until either an error is encountered or the install is stopped by calling <code>stopInstall</code> or the install completes successfully. | Once the install process for an AddonInstall is started with <code>startInstall</code> it will move through all of the states naturally sending out notifications at each transition and some progress events in between until either an error is encountered or the install is stopped by calling <code>stopInstall</code> or the install completes successfully. | ||
Certain types on installs may skip steps. Installing an add-on from the file system for example may jump straight to the Downloaded (or Checking) state since there is no need to download it. | |||