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/
Pingback: Sönke Rohde » AIR Remote Updater
great stuff – makes autoupdate much easier.
Thanks
Benz
cool stuff Claus. Thanks for sharing :)
I bet you it’s going to be used in a lot of AIR Apps !
Thank you! I used your library in my Apollo Desktop Photos application.
Hi,
I have renamed the application.xml file into app-version.xml and moved into root. I have implemented your code. But the file path was not find the xml file for the descriptor. How can I get the descriptor file? and update the AIR file?
James, you don’t need a separate descriptor xml on your server. Just pass the URL of the .AIR and AIR Remote Updater figures it out by itself