PurposeAirSimpleUpdater uses Adobe AIR's Updater class to help you build self-updating AIR apps with just a few lines of extra code:
var myUpdater = new AirSimpleUpdater(
Getting startedTo use AirSimpleUpdater, you need to keep two files on your web server: The latest AIR installer archive for your application, and a copy of its application.xml file.
When you release a new version, simply overwrite the application.xml file and upload the new AIR installer archive. If the filename of your AIR file changes with each version (it contains the version number), then include %version% in your URL (optional).
If the code snippet in the first section is enough of an introduction for you, download updater-1.0.js to get started.
Or, you can download the sample application code and poke around.
To see AirSimpleUpdater in action, install version 1.0 of the sample application. After launching the application, you will be able to "auto-update" to version 1.1.
If you run into any trouble or have any feedback please email me.
Advanced usageYou may want to provide your own implementation for some of the functions in updater-1.0.js. For example:
myUpdater.noUpdateRequired = function()
alert("You already have the latest version! Congratulations!");
myUpdater.whileWaiting = function(status)
case "CHECKING_FOR_UPDATE" :
statusText = "Checking for update, please wait...";
case "DOWNLOADING_UPDATE" :
statusText = "Downloading update, please wait...";
}Some of the other functions you might want to customize:
Function Returns Default behavior Possible customized behavior noUpdateRequired Trigger normal program initialization beforeUpdate false to cancel update Asks the user if they would like to update Force the update compareVersions true if update required Numerically compares version numbers Compare using your own version numbering scheme whileWaiting Changes window title to update status Show a customized status box finishedWaiting Restores window title Hide customized status box handleError Displays error in an alert box Show a customized error box
These details are provided for information only. No information here is legal advice and should not be used as such.