« AIR 2.0 Sample Applications | Main | Updating AIR 2.0 Flex 4 Apps »
Your First AIR 2.0 EXE file
| By Rich Tretola | November 17, 2009 | |
| 11,551 views |
Here is a very simple example of how to create your first installed exe for an AIR application. Here is what I did.
NOTE: Please make sure you have your application xml file set to:
1 | <supportedProfiles>extendedDesktop desktop</supportedProfiles> |
Using Flash Builder public beta with an updated Flex 4 SDK (overlayed with the new AIR 2.0 SDK), I created a simple application.
1 2 3 4 5 6 7 8 9 | <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Label x="138" y="143" text="Hello World!" fontSize="36"/> </s:WindowedApplication> |
Next, I compiled the application at an AIR file by exporting the release build and self signing it.
Finally, I simply opened the console and ran the following command:
1 | adt -package -target native C:\AIRSamples\AIRSample.exe C:\AIRSamples\AIRSample.air |
Thats it, my AIRSample.exe was created.
Note: you could also have created a dmg or rpm:
1 2 | adt -package -target native C:\AIRSamples\AIRSample.dmg C:\AIRSamples\AIRSample.air adt -package -target native C:\AIRSamples\AIRSample.rpm C:\AIRSamples\AIRSample.air |
Here is what the install process looks like for the exe.
Topics: Adobe AIR | 40 Comments »







November 17th, 2009 at 10:29 am
Thanks for getting a sample up so quickly! What do you think of AIR 2 so far? Got any big plans for apps?
Christian
Reply to this comment
Rich Tretola Reply:
November 17th, 2009 at 11:31 am
No problem, I had to wait until today.
As far as apps, not sure yet but we certainly have a lot more possibilities now.
Reply to this comment
November 17th, 2009 at 11:26 am
Thanks too for this post.
The install screen doesn’t look like the default air install screen. I was wondering if it can be customized ?
Reply to this comment
November 17th, 2009 at 10:08 pm
hi,
i follow all off these steps and when i launch the command like, i have this error message (ava[2588:c0b] Can’t open input server /Library/InputManagers/SafariStand4.0L167).
I am on Mac osx leopard.
i type this in command like adt -package -target native /airApp/main.app /airApp/main.air
do you have any idea ??!!!
Reply to this comment
Rich Tretola Reply:
November 18th, 2009 at 5:20 am
Your command is incorrect, the -target native should be either an exe, dmg, or rmp.
Reply to this comment
November 17th, 2009 at 10:43 pm
Social comments and analytics for this post…
This post was mentioned on Twitter by CreativeTweet: Adobe AIR News: Your First AIR 2.0 EXE file: url=’http://blog.everythingflex.com/2009/11/17/your-first-air-2-0-exe-… http://bit.ly/1vi0gY…
November 18th, 2009 at 5:03 am
[...] This post was mentioned on Twitter by Scott Knutti and Heiko Dreyer, Flex Monster Team. Flex Monster Team said: Your First AIR 2.0 EXE file http://bit.ly/15a5kq (via @richtretola) [...]
November 18th, 2009 at 9:42 am
Hello,
I’ve tried the command, but I have problem. I can’t access (recognize) the adt! How to solve this?
And what about the shortcut menu option (convert to .exe) if you right click the air file?
Thanks in advance,
Nikola
Reply to this comment
Nikola Reply:
November 19th, 2009 at 10:53 am
I solved it!
Reply to this comment
November 18th, 2009 at 8:59 pm
[...] http://www.insideria.com/2009/11/udp-socket-connections-for-los-1.html http://blog.everythingflex.com/2009/11/17/your-first-air-2-0-exe-file/ http://flanture.blogspot.com/2009/11/simple-transparent-air-desktop-thing.html [...]
November 19th, 2009 at 8:42 am
[...] Your First AIR 2.0 EXE file [...]
December 7th, 2009 at 12:17 am
Hi,
I’ve tried the command ( adt -package -target native C:\sampleapp.exe C:\sampleapp.air ) in cmd, but I am getting an error message (’adt’ is not recognized as an internal or external command).
Then I tried the same command with ‘Adobe Flash Builder Beta 2 SDK Command Prompt’,but i am getting the error message (-storetype is required).
Please tell me how to solve this issue?
Thanks,
Ajith Kumar R
Reply to this comment
Rich Tretola Reply:
December 7th, 2009 at 5:44 am
This means that you do not have the SDK added to your classpath correctly.
Reply to this comment
Ajith Reply:
December 8th, 2009 at 2:37 am
Hi Rich Tretola,
Setting the classpath solved the issue.
Thank you very much..:)
Reply to this comment
December 7th, 2009 at 5:41 am
Hi,Thanks for the code. But I got the error “storetype is required.” I do not how to solve that, do u have any idea to solve that.I am using Flash4 builder with AIR version 1.5.2.
Reply to this comment
Rich Tretola Reply:
December 7th, 2009 at 5:45 am
This only works with AIR 2.0. You need to upgrade your SDK and then overlay the Flex SDK with the AIR 2.0 SDK.
Reply to this comment
December 23rd, 2009 at 10:43 pm
Mbt sale there,Would you want to experience the wonderful feeling in Mbt m walk shoes or Mbt chapa shoes?
http://www.discountmbt.com/
Reply to this comment
January 28th, 2010 at 8:06 am
Hi,
I got an error when i tried to build air file.Error message given below:
“Error creating AIR file: 306: ERROR, desktop, mobile Device, or extended MobileDevice”
Please help me.
Thanks,
Ajith Kumar R
Reply to this comment
john barrie Reply:
January 31st, 2010 at 11:12 am
“Error creating AIR file: 306: ERROR, desktop, mobile Device, or extended MobileDevice”
I also got this message while creating the .air !
Did you find a solution for this ?
if the “supportedProfiles” tag is removed I can export fine. Of course this means that the “nativeProcess” nolonger works.
But it does give some indication to the source of the problem.
Reply to this comment
Rich Tretola Reply:
January 31st, 2010 at 4:29 pm
Make sure you have your supportedProfiles set to:
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
Reply to this comment
ajith Reply:
February 1st, 2010 at 12:09 am
Hi,
Thank for the reply,now it works fine…
February 15th, 2010 at 9:31 am
Hi,
very nice example thanks for that.But i am facing only one problem whenever i execute the adt -package -target ////
i get signing options required to package from descriptor and file set. please help me i will be thankful to you
Reply to this comment
February 23rd, 2010 at 12:44 pm
[...] 1-4 above are covered very nicely in Rich Tretola’s Everything Flex blog, but has less emphasis on errors. The following steps will show you how to set up the environment [...]
March 23rd, 2010 at 6:36 pm
I am the same as Mitesh in that I get signing options required to package from descriptor and file set when I run the adt command
Reply to this comment
March 24th, 2010 at 6:37 pm
David (from the post above) found a solution to the signing problem that Mitesh was having (and that I sometimes get, although I dont know why). Here is the comment he put on my blog:
Quote: Can I just add (for those who have a similar problem) that apart from removing spaces in the command line,I did need to add signing options so my command line looked like
adt -package -target native -storetype pkcs12 -keystore C:\Users\David\test_cert.p12 C:\Users\David\mytest.exe C:\Users\David\test.air
Thanks Dave
Reply to this comment
March 29th, 2010 at 11:49 pm
welcome to buy wedding dresses
free shipping ,fashion style ,cheaper price
http://www.wedding-dresses-mall.com
Reply to this comment
March 31st, 2010 at 4:27 am
welcome to http://www.aj-wholesale.com/category-101-b0-ED+Hardy+Jeans.html
Reply to this comment
April 8th, 2010 at 3:07 am
quite well,it’s kind of u share this post with us which transfer useful information to us.God Job!I do support u.
[url=http://www.cheap-shoesonline.com]cheap shoes online[/url]
[url=http://www.cheap-shoesonline.com/mbt-shoes-c-22447.html]MBT Shoes[/url]
Reply to this comment
May 5th, 2010 at 7:04 am
Install is a long and useless step, i want only exe and want it to work NOW
Reply to this comment
May 28th, 2010 at 11:22 am
thank you ,I have learned a lot.
Reply to this comment
May 28th, 2010 at 11:24 am
Free shipping and top quality,comfortable fit
Reply to this comment
June 6th, 2010 at 10:57 pm
edhardy edhardy edhardy
http://www.cheap-ed-hardy.com
edhardy [url=http://www.cheap-ed-hardy.com]edhardy[/url] edhardy
Reply to this comment
June 24th, 2010 at 11:57 pm
Install is a long and useless step, i want only exe and want it to work NOW
Reply to this comment
July 1st, 2010 at 11:39 pm
adfa [url=http://www.adasd.com]adf[/url]sadf
Reply to this comment
July 3rd, 2010 at 11:05 am
http://30daysextremefitness.com
Reply to this comment
July 3rd, 2010 at 12:09 pm
http://dandruffhomeremedy.com
Reply to this comment
July 7th, 2010 at 11:22 pm
[...] [...]
July 9th, 2010 at 5:53 am
http://www.coach-handbags-outlet.com/
Reply to this comment
August 10th, 2010 at 6:35 am
Hi,
I create a dmg package using ” adt -package -target native C:\AIRSamples\AIRSample.dmg C:\AIRSamples\AIRSample.air ” command but when i open this into mac it gives me messgae that not recognize all time,
Can you please help me ?
Thanks
Mohit
Reply to this comment
August 12th, 2010 at 3:25 am
Hi,
i want to convert my .air to .exe
i try same process and also write this like to my xml
desktop extendedDesktop
and im using air2 so i write:
but when write
“adt -package -target native C:\AirExe\AirinstallerDemo1.0.dmg C:\AirExe\AirinstallerDemo1.0.air”
to command prompt i got the fallowing error:
————————————————————————————
-storetype is required
usage:
adt -checkstore SINGIN_OPTIONS
adt – certificate ……..
adt -help
…
.
.
…
adt -version
SINGIN_OPTIONS : – stroretype (- )?……….
…….
…….
*
———————————————————–
Reply to this comment