Airake
Rake tasks and generators for Adobe AIR apps.
RubyForge project | Resources | RDOC | Group | Blog
View: Tasks | App generators | Component generators
What you need first
If you didn't already have it
-
Install ruby, rubygems and rake
Or use the one-click installer (MacOSX)
-
Get AIR SDK
-
Get Flex 3 SDK
Choose 'Open Source Flex SDK' link
This gives you command line tools, including: mxmlc and fcsh.
-
Install airake (for Mac):
sudo gem install airake
While you're in the Terminal, include the AIR SDK and Flex SDK bin directories to your path:
export PATH="/path/to/air_sdk/bin:$PATH" export PATH="/path/to/flex_sdk_3/bin:$PATH"
-
Install airake (for Windows):
gem install airake
Add c:\path\to\air_sdk\bin and c:\path\to\flex_sdk\bin to your Control Panel, Enviroment Variables, Path
Flex compiler requires a JRE (install java if you don't have it)
-
Install the AIR runtime
Getting started
-
Create your AIR project:
airake MyProject
A new project is created.
-
Run it:
rake adl
For faster compiling using the Flex Compiler Shell (FCSH), start (or stop/restart) the FCSH daemon:
rake fcsh:start rake fcsh:stop rake fcsh:restart
-
Test it:
rake test
It uses FlexUnit.
-
Package it:
rake package
Look for MyProject.air in the project bin directory.
If you need to create a certificate, run:
rake certificate
Environments
The airake.yml sets up your default, development, and test environments.
The properties listed are defaults that may be overriden or added to by the env section.
| Property | Description |
| mxml_path | Path to application mxml |
| appxml_path | Path to application descriptor |
| src_dirs | Array of source paths |
| lib_dir | Path to lib dir |
| air_path | File to create for packaged AIR file |
| swf_path | File to create for generated swf file |
| assets | Assets (files and directories) to include in package |
| certificate | Path to certificate to sign packaged file |
| debug | Whether debug is on or off |
--- mxml_path: src/MyProject.mxml appxml_path: src/MyProject-app.xml src_dirs: [ 'src' ] lib_dir: lib air_path: bin/MyProject.air swf_path: bin/MyProject.swf assets: src/assets certificate: cert.pfx development: debug: true test: mxml_path: test/Test.mxml appxml_path: test/Test-app.xml src_dirs: [ 'src', 'test' ] debug: true
You can setup new environments in the airake.yml. The default env is development and can be specified via AIRAKE_ENV env variable.
foo: mxml_path: src/com/foo/ui/Foo.mxml appxml_path: src/Foo-app.xml air_path: bin/Foo.air swf_path: bin/Foo.swf assets:
Then run tasks using that env.
AIRAKE_ENV=foo rake adl
Would then run the ADL task using the overriden settings.
Learn more
Go to the resources page