I just released the first version of AIR Remote Updater, an AS3 class to automate remote software updates in Adobe AIR applications.
It transparently checks version numbers, downloads the .AIR installer file if needed and triggers the AIR-native update process.
It grabs the version number directly from the remote .AIR file without having to download the entire file, eliminating the potential error prone need of having to put a separate descriptor file online along with the .AIR installer file.
Background:
An .AIR installer file is a PKZIP archive containing metadata files along with the packaged application files. The files contained in a .AIR installer file are, in this order:
- /mimetype
- /META-INF/AIR/application.xml (contains version info)
- /META-INF/AIR/hash
- /META-INF/signatures.xml
- packaged application files
The file we are interested in, /META-INF/AIR/application.xml (the “application descriptor file” that contains the version number), is always the second file in the archive. AIR Remote Updater uses FZip to stream in the remote .AIR until (and only until) the application descriptor file has loaded. We can then close the stream, uncompress that file and extract the version number.
More info and download here:
http://codeazur.com.br/lab/airremoteupdater/