NativeApplicationUpdater – updater for AIR apps packaged with native installers
I just released on Google Code a new project called NativeApplicationUpdater. Basically the name explains its purpose but for those that don’t know, AIR 2.0 brings new capability of packaging applications with native installers. This is necessary when you want to use the new NativeProcess APIs. Unfortunately Update Framework that comes with AIR 2.0 SDK doesn’t bring yet capability of updating this type of applications. That is why I decided to build it myself and publish it as open source library.
Here is a video explaining how it works:


[...] can get the library from here or read Piotr’s post. August 25, 2010 | Filed Under [...]
Application Updater Library for AIR Native Installer Apps : Mihai Corlan
25 Aug 10 at 12:47 pm
[...] Adobe Platform Evangelist Piotr Walczyszyn has written just such a framework. If you are adopting native application installers, it’s worth a [...]
An Updater Framework for Native Application Installers « Pursuit of Simplicity
25 Aug 10 at 9:23 pm
Thanks! Later try it.
Dee
27 Aug 10 at 12:37 pm
[...] Native Installers now can have auto-update!: If you need to add auto-update to your AIR 2 application that uses a native installer, Piotr Walczyszyn created a solution! Piotr blogged about it at http://www.riaspace.com/2010/08/nativeapplicationupdater-updater-for-air-apps-packaged-with-native-i… [...]
Adding auto update features to your AIR application in 3 easy steps « Greg Wilson's Ramblings
27 Aug 10 at 6:12 pm
Thanks a lot Piotr, it’s a very useful library, and works great too!
Anatoly
28 Aug 10 at 12:25 am
Hello Piotr,
Thank you for writing this great ressource however in trying it out the first time I received an RTE: Error: Error #3219: The NativeProcess could not be started. ‘Not supported in current profile.’
at Error$/throwError()
at flash.desktop::NativeProcess/start()
at com.riaspace.nativeApplicationUpdater::NativeApplicationUpdater/installFromFile()[/Users/pwalczys/Projects/NativeApplicationUpdater/src/com/riaspace/nativeApplicationUpdater/NativeApplicationUpdater.as:414]
at com.riaspace.nativeApplicationUpdater::NativeApplicationUpdater/installUpdate()[/Users/pwalczys/Projects/NativeApplicationUpdater/src/com/riaspace/nativeApplicationUpdater/NativeApplicationUpdater.as:342]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
maybe this is caused by my own faulty configuration but I did follow the instructions from the site ? any help appreciated
Allan Lund Hansen
31 Aug 10 at 1:23 pm
ok never mind i figured it out
Allan Lund Hansen
31 Aug 10 at 3:05 pm
Hello Piotr,
I can see in examples that you have used the UI for visualizing updater downloading process.
Is there a way to use built in Adobe air UI (I think it is the gray one with blue progress bar etc.)?
Great job,
Cheers,
Jacek
Jacek
10 Sep 10 at 9:32 am
@Jacek: At the moment you have to implement your own UI, I’m planning to extend it in the future with a default UI.
p.
Piotr Walczyszyn
10 Sep 10 at 12:48 pm
Great, thanks.
Is there any way to set NativeApplicationUpdater to automatically checks for update.
Milos
13 Sep 10 at 3:25 pm
@Milos what do you mean? You can always run checkNow() function when your application starts…
Piotr Walczyszyn
14 Sep 10 at 9:21 am
[...] Piotr Walczyszyn’s NativeApplicationUpdater for AIR 2. Thanks! [...]
NativeApplicationUpdater (for AIR 2.0) | arlen
16 Sep 10 at 2:40 am
[...] You can get the library from here or read Piotr’s post. [...]
Application Updater Library for AIR Native Installer Apps (Adobe Flash Platform Blog)
16 Sep 10 at 11:01 pm
how to use html / javascript
thanks
cihan
29 Sep 10 at 2:50 pm
Unzip NAU swc and get swf out of it, next you should be able to use it like any other swf from JS/AIR like that.
Piotr Walczyszyn
29 Sep 10 at 3:55 pm
worked.
I installed the application but it automatically restarts again and again.
2.How can I enable dialog box to be visible ?
cihan
29 Sep 10 at 10:11 pm
hello,
this is error
[2010-10-01:02:24:31] Bootstrapper begin (Win:version 2.0.2.12610)
[2010-10-01:02:24:31] Installed runtime located (2.0.3.13070)
[2010-10-01:02:24:31] Launching application installer: “Adobe AIR Application Installer.exe” “C:\Users\CIHANO~1\AppData\Local\Temp\AIR7050.tmp\timas”
[2010-10-01:02:24:31] Starting app install of file:///C:/Users/CIHANO~1/AppData/Local/Temp/AIR7050.tmp/timas
[2010-10-01:02:24:31] UI SWF load is complete
[2010-10-01:02:24:32] UI initialized
[2010-10-01:02:24:32] Detected native app installer
[2010-10-01:02:24:32] style being loaded from Resources/stylesNative.swf
[2010-10-01:02:24:32] beginning UI styling
[2010-10-01:02:24:32] UI styling complete
[2010-10-01:02:24:32] Validating the native package at file:///C:/Users/CIHANO~1/AppData/Local/Temp/AIR7050.tmp/timas
[2010-10-01:02:24:42] unpackaging/validation is complete
[2010-10-01:02:24:42] application is bound to this version of the runtime
[2010-10-01:02:24:42] app id cihanozturk
[2010-10-01:02:24:42] pub id
[2010-10-01:02:24:42] Application located at C:\Program Files
[2010-10-01:02:24:42] Application handles updates; launching it
[2010-10-01:02:24:42] starting cleanup of temporary files
[2010-10-01:02:24:42] application installer exiting
[2010-10-01:02:24:42] Application installer success
[2010-10-01:02:24:42] Bootstrapper success
Please help
cihan
1 Oct 10 at 1:20 pm
NAU doesn’t have built-in UI you can build it yourself. This can be done like in as3term application.
1. Initialize using initilize() function and listen to INITIALIZED and UPDATE_STATUS events.
updater.addEventListener(UpdateEvent.INITIALIZED, updater_initializedHandler);
updater.addEventListener(StatusUpdateEvent.UPDATE_STATUS, updater_statusUpdateHandler);
updater.initialize();
2. When initialized run checkNow() function:
protected function updater_initializedHandler(event:UpdateEvent):void
{
updater.checkNow();
}
3. Handle StatusUpdateEvent.UPDATE_STATUS if update is available with preventDefault(); and switch your view to custom updater view:
protected function updater_statusUpdateHandler(event:StatusUpdateEvent):void
{
if (event.available)
{
event.preventDefault();
// Show your custom updater view
// applicationModel.currentState = ApplicationModel.UPDATES_STATE;
}
}
4. Initiated downloading installer:
public function btnYes_clickHandler(event:MouseEvent):void
{
updater.addEventListener(DownloadErrorEvent.DOWNLOAD_ERROR, updater_downloadErrorHandler);
updater.addEventListener(UpdateEvent.DOWNLOAD_COMPLETE, updater_downloadCompleteHandler);
updater.downloadUpdate();
}
5. In case of download error notify user:
protected function updater_downloadErrorHandler(event:DownloadErrorEvent):void
{
Alert.show(“Error downloading update file, try again later.”);
}
6. When download is complete install update by calling installUpdate() function:
protected function updater_downloadCompleteHandler(event:UpdateEvent):void
{
updater.installUpdate();
}
All that you can see in action in following source code:
http://code.google.com/p/as3term/source/browse/trunk/as3term/src/com/riaspace/as3term/controllers/StartupController.as
http://code.google.com/p/as3term/source/browse/trunk/as3term/src/com/riaspace/as3term/pms/UpdatePresentationModel.as
http://code.google.com/p/as3term/source/browse/trunk/as3term/src/com/riaspace/as3term/views/UpdateView.mxml
Piotr Walczyszyn
1 Oct 10 at 3:10 pm
very thanks
cihan
2 Oct 10 at 11:27 pm
hi
fixed problem
description.xml
cahange to disabled
<!–true–>
<!–true–>
cihan
3 Oct 10 at 9:30 pm
false
cihan
3 Oct 10 at 9:30 pm
sory
customUpdateUI set to false
translate google
cihan
3 Oct 10 at 9:32 pm
Hi!
Did you experienced any problems with automatic updates on Win XP SP3 and a large application? I am trying to use NativeApplicationUpdater for an exe application of size 20MB. Everything goes fine until actual install of update, where after event UpdateEvent.DOWNLOAD_COMPLETE application stays open and won’t install newer version. I even tried manually force installation, but the result is same. At the moment problem occurred on 3 out of 6 computers I tested.
On Win7 I didn’t experienced any problems.
Ronin
12 Oct 10 at 1:18 pm
To be honest I never experienced this issue, please let me know if you find the cause, this is most likely some setup on those XP machines.
You can try to look into a temp folder to see if it was fully downloaded and if you can run it just by double-clicking.
p.
Piotr Walczyszyn
12 Oct 10 at 1:59 pm
Hi Ronin,
I am facing the same issue. Its downloading , and the status is showing as “INSTALLING” but is doesnt seem to install the newer version.
win
13 Oct 10 at 11:52 am
I also looked into the temp folder and it installed on double clicking.
Not able to figure out why it doesnt install through the NativeApplicationUpdater though.
win
13 Oct 10 at 12:27 pm
@Ronin and @win can you test latest trunk version? I have fixed one hack that was in Win platform and it may fix your issue.
p.
Piotr Walczyszyn
15 Oct 10 at 12:04 pm
I can’t even begin to thank you enough for this. I’m integrating it into my JS AIR app right now. I’ll try to to do a blog post with instructions for incorporating this into JS apps in the near future
Aaron
17 Oct 10 at 8:48 pm
@Aaron I’m happy to hear that!
Send me a link when you write your post.
thx
p.
Piotr Walczyszyn
18 Oct 10 at 8:45 am
Piotr thanks for updated library!
So far it works on all Win XP computers with previous problems.
Ronin
22 Oct 10 at 8:47 am
Hello Piotr,
Needed to bring up to date an application AIR 2.0 that uses NativeProcess and I have achieved with success to do an updating of the application using NativeApplicationUpdater. Nevertheless it is very large the time that delays the updater in dischargeing the new version (~30-40 min), even being in a local network.
In my case the application weighs some 60 MB but of all forms the download time is excessive.
Because it may be passing this?
Thanks and congratulations by the app
Ricardo
Ricardo
12 Dec 10 at 6:06 pm
Piotr,
Thanks for taking the time to create this. I’m thinking of using this in a kiosk-type application where user interaction will be impossible. Is it possible to update my native application behind the scenes without needing any user interaction at all? Thanks.
Matt
16 Dec 10 at 11:19 pm
Hello again!
Have same question as Matt. Is there any way to skip dialog with Update, Skip, Remove options and automaticly install newer version? Tried -silent option at run, but it didn’t help.
Ronin
6 Jan 11 at 2:05 pm
@Ronin if -silent option didn’t work I don’t think there is anything that can be done. The UI AIR runtime specific and I have no control over it.
p.
Piotr Walczyszyn
10 Jan 11 at 3:18 pm
@Ricardo I have no idea what can be causing such a long download time. NAU uses URLStream/FileStream to download and store i locally, there is no special magic there. What OS you are on?
p.
Piotr Walczyszyn
10 Jan 11 at 3:21 pm
[...] comments Today I published a new version (0.5.0) of NativeApplicationUpdater library to Google Code project. This is a minor, mostly bug fix [...]
NativeApplicationUpdater 0.5.0 released at Space of Flex/AIR technologies
21 Feb 11 at 1:43 pm
I am going to try and use this for a Playbook app. What do you think?
Paul Bradley
10 Mar 11 at 9:25 pm
@Paul You should use Playbook’s own update mechanism, NAU will only work with desktop applications.
p.
Piotr Walczyszyn
19 Mar 11 at 11:18 am
[...] [...]
Update-Funktion und Nativer Installer (exe) - Flashforum
7 Apr 11 at 5:39 pm
I get this error sometimes when debugging my application
Error: Error #2029: This URLStream object does not have a stream opened.
at flash.net::URLStream/close()
at flash.net::URLLoader/close()
at com.riaspace.nativeApplicationUpdater::NativeApplicationUpdater/updateDescriptorLoader_ioErrorHandler()[/Users/pwalczys/Projects/nativeapplicationupdater/NativeApplicationUpdater/src/com/riaspace/nativeApplicationUpdater/NativeApplicationUpdater.as:262]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Please look into this and suggest a solution.
Thanks
Dhruv
15 Apr 11 at 1:15 pm
My current version uses the builtin applicationUpdater function but i need to use the nativeProccess function in an upcoming rls so i have to switch to your nativeApplicationUpdater.
Any idea on how to migrate from the old ApplicationUpdater to the native application updater?
My idea was tu distribute the (new_rls_with_nau).air via AU but since your NAU uses the nativeProcess itself it can’t be done automaticly – am i right?
upsite
19 Apr 11 at 11:46 pm
This works great, what a time saver. Thanks for taking the time to write this up.
Stephen Braitsch
15 Jun 11 at 8:18 pm
[...] http://www.riaspace.com/2010/08/flerry-1-2-0-released/ http://www.riaspace.com/2010/08/nativeapplicationupdater-updater-for-air-apps-packaged-with-native-i… [...]
AIR + JAVA = Flerry » Bruno bg + ADOBE FLEX
15 Sep 11 at 4:17 am
Hello Piotr!
Just want to thank you for making this project!
We just used it in our game – Coloropus to make auto-updates of game prototype during beta-testing.
Now it saves lot of time for us
Thank you
Eugene
24 Sep 11 at 1:11 am
My current version uses the builtin applicationUpdater function but i need to use the nativeProccess function in an upcoming release so i have to switch to your nativeApplicationUpdater.
Any idea on how to migrate from the old ApplicationUpdater to the native application updater?
Thanks in Advance
Ashish Verma
3 Oct 11 at 8:02 am
@Ashish moving to NativeApplicationUpdater should be straight forward as the API are almost identical.
Piotr Walczyszyn
3 Oct 11 at 2:19 pm
That is really interesting, You’re a very professional blogger. I have joined your rss feed and look ahead to searching for extra of your great post. Additionally, I have shared your website in my social networks
url shortener
29 Oct 11 at 7:53 am
Piotr, is there any auto update solution for native installer with packaged AIR runtime ?
Nemi
28 Feb 12 at 5:16 pm
is there any auto update solution for APK?? without using market is it possible to update on client side?
as3script
10 Sep 12 at 3:10 pm
I’ve been browsing online greater than three hours today, but I by no means found any fascinating article like yours. It is lovely price enough for me. In my view, if all webmasters and bloggers made good content material as you did, the web can be much more helpful than ever before.
msn grupos
8 May 13 at 8:29 am