Developing AIR applications on Ubuntu Part 1

I’ve recently been looking at developing a cross-platform application on my Linux system for eventual use on Windows and Macintosh.  AIR became an obvious choice, because it’s solid on Windows and Macintosh, and supports Linux pretty well as well. I’m still in the midst of development, but I thought I’d post some of my original thoughts on JS/HTML AIR development on Linux.

After deciding to develop on Linux, and on AIR, the first point that came up was whether to develop in HTML/JS or to use Flex.  Unfortunately, Adobe has made the decision not to support Flex Builder 3 fully on Linux, and the prospects for Flash Builder 4 don’t look good either, so the main reason to use Flex over HTML/JavaScript (namely, a kick ass development environment) isn’t really there in Linux.  I did check out the Flex SDK version 3 and 4 using Ant (and I’ll post some thoughts on that later) but overall, without Flex Builder, Flex Development on Linux is just less appealing.   Given that there’s some really good tooling out there in Linux for building HTML/JavaScript applications, I’ve decided to use that for my current project.

The first step to developing an AIR application is of course to download the AIR SDK from Adobe.  This is available as a download for Linux.  Extracting files from a tarball is probably pretty familiar to Linux users, but in case you aren’t familiar with it, I’ll give a short instruction set here.

  1. Download the file to your home directory (/home/<username>)
  2. Unzip the directory to your temp directory (mkdir /tmp/air/;cd /tmp/air; tar xvjf /home/<username>/AdobeAIRSDK.tbz2)
  3. Copy the AIR SDK to the “/opt” directory. (sudo mkdir /opt/air-sdk; sudo cp -r /tmp/air /opt/air-sdk/1.5.2)
  4. Create a symbolic link to the “current” AIR SDK (sudo ln -s /opt/air-sdk/1.5.2 /opt/air/current)
  5. Create a script to add the environment variables.
  6. 
    
    #!/bin/sh
    export PATH=/opt/air-sdk/1.5.2/bin:$PATH
    #!/bin/sh export PATH=/opt/air-sdk/1.5.2/bin:$PATH
  7. Setup your environment for your main username.  Basically, add to the end of your .profile file “source /opt/air-sdk/current/setup.sh”

At this point, you should verify (by opening a command window and typing “source ~/.profile”) that your profile is working.  If it’s not, fix it and try again.  Once you’ve got it working, log all the way out of your linux account, and log back in again.  This should make sure that any terminals you launch will have access to the AIR tools (ADL and ADT).

ADL

ADL is the primary debugging tool that you’ll use when developing an AIR application.  adl is a Java program, and takes as an argument the Application descriptor XML for an AIR application.

ADT

ADT is the primary packaging and package signing tool that you will use when “compiling” and “distributing” your AIR application.  The adt tool uses the same application xml descriptor as adl, and requires an SSL certificate.  You may generate your own “Self Signed” certificate, but it will be less trusted than a real SSL certificate. Finally, when packaging an application using adt you MUST be connected to the internet.  ADT verifies the current date with several known timeservers to validate that the certificate is current and not expired.  If you are not connected to the internet, ADT WILL fail.

Next time I will get into a description of my project structure, and how to work with the HTML and JavaScript files that make up the AIR application

Share

3 Responses to “Developing AIR applications on Ubuntu Part 1”

  1. Heinrich says:

    Just if it’s helpful for somebody…

    I added the following two lines in the end of file at: /etc/bash.bashrc

    PATH=$PATH:/opt/AdobeAIRSDK/bin (that’s the path to my adl & adt files)
    export PATH

    saved and closed the file, then opened a new console and typed:

    source /etc/bash.bashrc

    I guess that “refreshed” the file to the system. Then I opened: /etc/environment
    and i found this:

    PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”

    And i just added the path at the end of line like this:

    PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/AdobeAIRSDK/bin”

    Saved and closed again, after that in a new console i wrote this:

    source /etc/environment

    To “refresh” again, and then i wrote:

    adl [press enter]

    and i saw the following:

    application descriptor file not specified
    usage:
    adl ( -runtime )? ( -pubid )? -nodebug? ? ( — … )?
    adl -help

    wich means that now i can use just adl to test my air-based applications, sorry for my bad english and sorry for the big comment but i hope that it helps to somebody :)

  2. ravi says:

    thanks to greylurk and heinrich air sample application working thanks alor

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>