Air project with sprouts?

0 views
Skip to first unread message

Stray

unread,
Oct 27, 2009, 11:06:08 AM10/27/09
to ProjectSprouts
Anyone had any luck getting Air up and running this way?

Adobe seem to suggest using the amxmlc wrapper for the mxmlc compiler
- which seems to simply set a property +configname=air.

However, I can't set configname on the mxmlc compiler directly it
seems. Also the amxmlc and air-config.xml files aren't included in the
flexsdk-tool sprout gem as far as I can tell.

So - before I go blindly wandering (on a deadline... as always... and
now boxed into a corner as I used the RobotLegs framework which
depends upon metadata to compile, so the old Flash IDE isn't going to
work) ... anyone got any tips or tricks?

Obviously I'll share when I get it done...

Thanks

Luke Bayes

unread,
Oct 27, 2009, 12:51:10 PM10/27/09
to project...@googlegroups.com
You're in luck - 

Sprouts has the ADTTask and ADLTask.



The ADTTask takes an properly-compiled SWF file and certificate keys as input and creates an AIR application.

The ADLTask takes an AIR application and runs it in the AIR Debug Launcher for testing and debugging.

I haven't used these tools in quite awhile and at one time had plans to automate the certificate creation, but as far as I know, they should still work.

Please let me know if you run into any snags with these.


Thanks,

Luke


Stray

unread,
Oct 27, 2009, 12:57:48 PM10/27/09
to project...@googlegroups.com
Thanks Luke!

I'm just about there with it - got it working part-sprouts part plain command line. Not sure how to pass the +configname argument to the mxmlc compiler, but I'm digging about.

The adl stuff is a pain so hopefully this'll remove some of that!

At the moment I'm finding that I have to manually restart and then 'continue' the fdb each time I test. P-I-A.

It's working though... !

I've got certificate and manifest creation handled in textmate at the moment. I'll try and wrap it all up neatly for sprouts when I get past this deadline...

Luke Bayes

unread,
Oct 27, 2009, 3:11:29 PM10/27/09
to project...@googlegroups.com
Hey Stray,

As far as the configname argument goes, all ToolTasks (basically anything in Sprouts that wraps up a command line tool), have a prepended_args and appended_args property.

These will insert whatever string you set them to as the first or last command line argument, respectively.

Anytime you find a configuration option that hasn't yet been added, you can set them with one of these like:

mxmlc 'bin/SomeProject.swf' do |t|
   t.prepended_args = "-configname=foo"
end

In the case of MXMLC, it expects the input class to be the final argument, so you'll probably want to use prepended_args there.

As I said, it's been quite awhile since I've been in those AIR tasks, does the ADL task launch FDB? Is that what you're referring to with having to continue?

If that's the case, we could look at putting the FDBTask into it's inheritance chain which would let you specify FDB commands that will be executed 'interactively' within rake like:

adl :run do |t|
   t.run
   t.continue
   t.continue
end

Thanks,

Luke

Stray

unread,
Oct 27, 2009, 3:16:02 PM10/27/09
to project...@googlegroups.com
Wow - great stuff. Thanks Luck. The prepended_args is super useful.

I've got rake run doing the adl, but I'm not sure how to communicate with the fdb because it's in another terminal window... or am I missing something?
Reply all
Reply to author
Forward
0 new messages