A while back, I wrote about using OpenLaszlo to write Adobe AIR applications. A number of people asked me for step-by-step instructions. It’s taken me a while to get around to writing these, and I’m happy to post this finally.
The instructions below explain what to install, where I installed it, and the steps I took to create a chromeless AIR application. A chromeless AIR app is one that doesn’t have the operating system’s standard window around the embedded SWF. It’s trickier to create a chromeless app, than a windowed app. You can drag the application, and close it from within OpenLaszlo.
I use Windows XP and Cygwin, so the build script won’t work on Mac/Linux machines right away. It’s intended to serve as a guide.
Download the OpenLaszlo AIR Application Source and Installer.
Setup
- Download and install the Adobe AIR runtime, for your platform. You’ll need this to run your application. I used Adobe AIR Beta 3.
- Download and install the appropriate OpenLaszlo distribution for your platform. I used OpenLaszlo 4.0.9.1. If you’re new to OpenLaszlo, the Windows/Mac/Linux distributions include Apache Tomcat and OpenLaszlo. Install to the default directory. If you’re on Windows, you may need to download and install the Java SDK (i.e. the JDK) first (if you don’t have it already). You can get that from Sun’s website. Look for J2SE JDK 6.
- Download and unzip the Adobe Flex SDK. You’ll need this to act as a bridge between OpenLaszlo and the AIR runtime. I got Flex 3 SDK Beta , and extracted it to a new folder called C:\Program Files\flex3sdk_b3_121207.
- Download and unzip Adobe AIR SDK. I got AIR Beta 3, and extracted it to C:\Program Files\air_b3_win_sdk_121207.
Development
- Copy the OpenLaszlo source code/build script to (say) the my-apps directory. Check the paths set in build.sh – you may need to update them.
- Copy the Flex source code to the appropriate place in your Flex install directory. See the paths in build.sh as a guide.
- Copy the AIR source code to the appropriate place in your AIR install directory. See the paths in build.sh as a guide.
- To do a quick test, cd to your OpenLaszlo directory and run:
./build.sh -test
That will compile your application and launch it (without installing). If all goes well, you’ll be facing your first OpenLaszlo AIR application. - To build the installer, run:
./build.sh
The .air installer will be build in the AIR source directory.
Installation
If you just want to test out the application, double-click the OpenLaszloAir.air file to install it.