Monday, September 19, 2011

Installing Adobe AIR 3 SDK in Flash Builder 4.5.1 on Mac OS

To install and use a new AIR SDK, you need to overlay it on an
existing Flex SDK. This is a bit more tricky on a Mac than on
Windows, because - as far as I know - you still cannot do a copy/overwrite
without deleting the contents of the folder you are overwriting.

The following steps illustrate how to install the AIR SDK using the terminal.



UPDATE April 4, 2012
I haven't done it myself yet, but the steps below also seem to work for overlaying the AIR 3.2 SDK on top of the 4.6 SDK.

UPDATE October 5, 2011
I wrote this post during the pre-release period of Flash Player 11 and AIR 3. Now that they are both officially released, I have changed the links to the official release url's, but I haven't updated all the screenshots!

1.
Close Flash Builder or Eclipse.

2.
Look up your current SDK. I was using 4.5.1. which on my macBook is located here:

/Applications/Adobe Flash Builder 4.5/sdks/


3.
Copy the entire, current SDK folder and rename it, I named it AIR3SDK.

4.
Download the AIR 3 SDK here,
and save this file inside your newly created AIR3SDK folder.

5.
Open the terminal (Applications>Utilities>Terminal.app), and cd to the root of the AIR3SDK folder.

You can also just type cd, add a white space and then drag the SDK folder in your terminal
username$ cd /Applications/Adobe\ Flash\ Builder\ 4.5/sdks/AIR3SDK
and hit enter.

6.
Now that you're in the root of the new Flex SDK folder, type or copy/paste

tar jxvf AdobeAIRSDK.tbz2
or use the name of the file you downloaded, when it's a different version,

and hit enter. This will unzip the tar file that you've downloaded, and automatically overwrite any duplicate files. Here's a (NOT UPDATED) screenshot of my terminal for step 5 and 6:



7.
In the root of the AIR3SDK folder, open flex-sdk-description.xml and change the content of the name node from Flex 4.5.1 to AIR3SDK.



8.
Still inside the AIR3SDK folder, go to

/frameworks/libs/player/

and create a folder called 11.0.
Now download PlayerGlobal (.swc) here, save it in the 11.0 folder and rename it to playerglobal.swc.

9.
Open Flash Builder or Eclipse and start a new project. In the opening popup, click on Configure Flex SDK's, click on Add, click Browse to browse to the AIR3SDK folder, and open it. Now you can set this SDK version as default SDK or select it in the dropdown list when you're back in the opening popup.



AIR 3 has some cool new features such as Captive Runtime, which bundles the AIR runtime with your app, so that the user doesn't have to download it separately; something that you already could do with AIR to iOS, but is new for Android and desktop.

Another new feature is extending AIR with Native Extensions, meaning that you can integrate native code from the target device into your app, of which one of the results can be a major performance boost.

23 comments:

  1. Thanks to guide for installation . Your way of explanation is really good. Anyone can understand even he is newbie.

    ReplyDelete
  2. Your supposed to overlay the air sdk with the flex 4.5.1 folder. I usually do this like:

    cp -R /Applicaitons/pathtoflashbuilder/sdks/4.5.1/ /Applicaitons/pathtoflashbuilder/sdks/4.5.1_air3/

    rsync -avz /pathtosdk/ /Applicaitons/pathtoflashbuilder/sdks/4.5.1_air3/

    ReplyDelete
  3. Followed the steps here including overlaying the new Air SDK folder with the Flex 4.5.1 directory as suggested but I'm still not having any luck. Eclipse complains during step 9 that my new directory with the merged contents isn't a Flex sdk.

    I also noticed that my folder is missing the '/frameworks/libs/player/' folder from step 8. Any ideas?

    ReplyDelete
  4. I seem to have resolved the issue. I had cheated and used a gui-based tar extractor which was causing some problems. Stick to the terminal and it works like a charm, thanks!

    ReplyDelete
  5. Thank you so much.

    It's a total disgrace to Adobe that we have to perform this patching manually.

    ReplyDelete
  6. Can this be applied to Flash Professional CS5.5?

    ReplyDelete
  7. The url to download the PlayerGlobal.swc is incorrect. The correct url is: http://www.adobe.com/support/flashplayer/downloads.html

    ReplyDelete
  8. Here is a great link on how to target AIR 3 & Flash Player 11 in Flash Professional CS5.5.
    http://www.swfgeek.net/2011/09/26/targeting-flash-player-11-rc1-air-3-rc1-in-flash-professional-cs5-5/

    ReplyDelete
  9. Jeff: just happened on your post - been pulling my hair out trying to get this working on a Win XP machine.

    All is fine except for the ApplicationUpdaterUI examples - have you had any luck using the new Air 3 in your program's AutoUpdate functions?

    I get the error "application descriptor namespace error" 16218 - which typically indicates that you haven't modified your app-xml and update xml files to matching 3.0 version numbers. But I'm thinking there's a component missing somewhere.

    Going back to square one with Flex 4.5.1 sdk and will test updater there first with default Air 2.6

    Don

    ReplyDelete
  10. Also - noticed your reference to using the 11.0 playerglobal.swc

    Just thinking that we might have to do the same thing in the runtimes\player folder. That is create a new "11.0" folder and then download and rename the exe's from your Flash Player link above?

    ReplyDelete
  11. For example in the runtimes\player\win folder I download and rename...
    1. http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_ax_debug_32bit.exe FlashPlayerDebugger.exe
    2. http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug_32bit.exe InstallPlugin.exe
    3.http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_ax_debug_32bit.exe InstallAX.exe

    ReplyDelete
  12. Hi Don,

    I haven't tried auto update yet in air 3. Did you read this post
    http://forums.adobe.com/thread/899921
    It's about air 3 on windows, although it probably won't answer your question. I'm in Taiwan right now without my laptop, so i cannot dive into it.

    Jeff.

    ReplyDelete
  13. Will give it a shot ... thanks for the remote post.
    Right now I'm going to try and go back to square 1 and test without any changes. Then update one thing at a time to see what I can get to work

    Thanks again
    Don

    ReplyDelete
  14. Thanks a lot! Best tutorial I've found yet.

    ReplyDelete
  15. Works fine with FB 4.6 & AIR 3.3

    Thx!

    ReplyDelete
  16. not working with fb 4.6 and air 3.3 for me. getting the following error:

    Process terminated without establishing connection to debugger.

    DVFreeThread - CFMachPortCreateWithPort hack = 0x2634ae0, fPowerNotifyPort= 0x2633980
    DVFreeThread - CFMachPortCreateWithPort hack = 0x16cd90, fPowerNotifyPort= 0x16d5b0
    invalid application descriptor: Unknown namespace: http://ns.adobe.com/air/application/3.3


    Launch command details: "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 air 3.6/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 air 3.6/runtimes/air/mac" -profile mobileDevice -screensize 768x1004:768x1024 -XscreenDPI 132 -XversionPlatform IOS "/Users/mark/Documents/Adobe Flash Builder 4.6/test/bin-debug/test-app.xml" "/Users/mark/Documents/Adobe Flash Builder 4.6/test/bin-debug"

    ReplyDelete
  17. Great - I didn't have a clue how to sort this. Well done!

    ReplyDelete
  18. Excellent tutorial for this! Thank you very much!

    ReplyDelete
  19. Even works with Apache Flex 4.9.0 and Air 3.6 Beta.
    By changing the lines:
    11.6
    19
    in air-config.xml, airmobile-config.xml and flex-config.xml to the current Versions you don't have to set the player Version in compiler settings.
    And you don't have the need to download the playerglobal.swc anymore - it comes now with the Air Framework automatically.

    ReplyDelete
    Replies
    1. <target-player>11.6</target-player>
      <swf-version>19</swf-version>

      Delete
  20. freelance creativeMarcheMelo - The Marketplace for Creative Services. Hire Creative highly skilled Freelancer online. We are leading Outsourcing Marketplace. Join us now

    ReplyDelete