Create first app using Adobe Air on Ubuntu
September 30, 2009 | linux, other, toolsauthor: Karol Zielinski | comments: 1 | views: 839
Tags: adobe, air, desktop, programming, technology, ubuntu
“Adobe Integrated Runtime (AIR) is a cross-platform runtime environment for building rich Internet applications using Adobe Flash, Adobe Flex, HTML, or Ajax, that can be deployed as a desktop application.” That’s from Wikipedia. Now let create our first application using this technology.
First, we will
Download Adobe Air SDK from http://adobe.com/go/getairsdk to our home directory.
and…
mkdir /tmp/air/ cd /tmp/air tar xvjf ~/AdobeAIRSDK.tbz2 sudo mkdir /opt/air-sdk sudo cp -r /tmp/air /opt/air-sdk/1.5.2 sudo mkdir /opt/air/ sudo ln -s /opt/air-sdk/1.5.2 /opt/air/current
now add PATH to our .bashrc file:
vim ~/.bashrc
and add line:
export PATH=/opt/air-sdk/1.5.2/bin:$PATH
logout, login again. Now Adobe AIR SDK should be installed. Check it by:
adt -version
You should see something like:
adt version "1.5.2.8870"
Ok, now the next step…
create some directories for our code:
cd mkdir air_workspace cd air_workspace mkdir appname/ mkdir appname/source/ mkdir appname/build/ cd appname
create an application descriptor:
vim source/application.xml
and add there:
<application xmlns="http://ns.adobe.com/air/application/1.0">
<id>com.example.appname</id>
<version>1.0</version>
<filename>AppName</filename>
<initialWindow>
<content>index.html</content>
<visible>true</visible>
<width>600</width>
<height>600</height>
</initialWindow>
<icon>
<image16x16>icons/appname-16.png</image16x16>
<image32x32>icons/appname-32.png</image32x32>
<image48x48>icons/appname-48.png</image48x48>
<image128x128>icons/appname-128.png</image128x128>
</icon>
</application>
if we don’t have any icons we can put there:
<application xmlns="http://ns.adobe.com/air/application/1.0">
<id>com.example.appname</id>
<version>1.0</version>
<filename>AppName</filename>
<initialWindow>
<content>index.html</content>
<visible>true</visible>
<width>600</width>
<height>600</height>
</initialWindow>
</application>
now create HTML file
cd source vim index.html
and add there:
<html> <head> <title>My Window Title</title> </head> <body> <h1>Hello World</h1> </body> </html>
test it:
adl application.xml
now you should see huge text ‘Hello world’
last step: package our application
cd ../ adt -certificate -cn SelfSign -ou Dev -o "Example" -c US 2048-RSA cert.pfx password
we just created certificate for our application, with ‘password’ as a password.
cd source/ adt -package -storetype pkcs12 -keystore ../cert.pfx ../build/AirTest.air application.xml .
The end.
Now have a look at the directory ‘build’. There will be file ‘AirTest.air’. Click twice on it (just open it) and now you can be proud of yourself. That’s your first AIR app.
based on:
Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.
December 17, 2009, 9:05 am
Thanks for this helpful tutorial. FYI, you shouldn’t need to restart if you’re running those commands from a terminal. Just do the following after you edit your ~/.bashrc
source ~/.bashrc
This will reload the aliases/variables into your terminal.