Hello World! - Adobe Air on Ubuntu and Windows
This article is to help fellow web developers get started with working on Adobe AIR! Using Adobe AIR, you will be able to create desktop applications which are cross-operating system using just HTML, JS and a bit of XML.
Adobe Air works great on Windows, Linux, Mac and hopefully a lot of future operating systems and mobile devices. If you get an application working, it should work and display exactly as it does across all the other operating systems as all AIR installations use WebKit. This article will give you an insight into how I got it working on Windows and Linux. We need Abobe AIR SDK to develop and build AIR applications. You can get Adobe AIR SDK from this link here.
Setting up AIR SDK on Ubuntu
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Linux)
2) Extract contents of the file into a location that you prefer
3) Pick the adl and adt files and place them in your bin directory on your machine OR set a path to the bin folder so that these files are accessible
4) Once you have it all setup, you should be able to run adl on your terminal and get a message back instead of the standard “command not found”
5) You will have to save both of the files (AIRHello.xml and AIRHello.html into a folder)
6) On the terminal, go into the folder where the files are saved and run “adl AIRHello.xml” and that’s it you
Setting up AIR SDK on Windows
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Windows)
2) Extract contents of the file into a location that you prefer
3) Go to Start > My Computer (Right click Properties) > Advanced Tab > Environment Variables > Path > Edit and add the path to your bin folder
4) Once you have it all setup you should be able to run adl on your command line and get a message back instead of the standard “command not found”
5) Make sure that on the command line if you type “path” you get to see the new entry.
6) You will have to save both of the files (AIRHello.xml and AIRHello.html into any folder)
6) On the command line browse to the folder where files are saved and run “adl AIRHello.xml” and that’s it!
AIRHello.xml
<?xml version="1.0" encoding="utf-8" ?> <application xmlns="http://ns.adobe.com/air/application/1.0"> <id>uk.co.webdigi.AIRHello</id> <filename>AIRHello</filename> <name>Hello World</name> <description>This is a sample Adobe AIR application.</description> <version>1.0</version> <initialWindow> <content>AIRHello.html</content> <title>Hello by Webdigi</title> <systemChrome>standard</systemChrome> <transparent>false</transparent> <visible>true</visible> <minimizable>true</minimizable> <maximizable>true</maximizable> <resizable>true</resizable> <width>500</width> <height>500</height> <x>150</x> <y>150</y> <minSize>300 300</minSize> <maxSize>800 800</maxSize> </initialWindow> </application>
AIRHello.html
AIRHello <div> <h2>Hello World</h2> </div>
This should get you started on working with Adobe AIR! You can easily create AIR applications using just HTML, Javascript and XML, all tools that web developers regularly use. You can do more advanced stuff like system tray alerts, drag and drop, sounds, file access and many more stuff that you can’t do on a traditional web browser.
