1

Now that FDT no longer supports fdt.launch.Application from AIR projects, how do you go about building modules for an AIR application? You can't just create multiple AIR launch configs because almost all the properties are set in the project properties rather than the launch config. Do I really have to create a new project for each module? Having 20 projects for one application seems awfully messy when you used be able to use one project and one Ant script.

Here's a link to a sample build.xml file I might use: build.xml

Dave Wolfe
  • 660
  • 5
  • 14
  • How are the AIR modules different from one another? Do they each require their own descriptor.xml which are different from one another? – Alan Klement May 23 '12 at 01:28
  • They don't need their own descriptor, but the output name and location is different. – Dave Wolfe May 23 '12 at 14:00
  • What would you need to change? Just the output name and location? What about the 'Main' class. Can you provide a sample build script that shows how you were using 'fdt.launch.Application' for modules? This way the FDT team can come up with ways to adjust the AIR workflow. Add the link to your original post. – Alan Klement May 23 '12 at 14:21
  • The main class is already set in the launch config so I can make a launch config for each main class, I just need the output name and location need to be different for each config. I added a link to an example of the build scripts I usually use. It's not uncommon for a client to ask for one or more of the modules to be available as a standalone app, so whenever possible I try to make them work as projectors, that's why the build script uses Adobe Flash Player instead of AIR Debug Launcher. – Dave Wolfe May 23 '12 at 18:14
  • In your example, each target is set to 'module01.swf' and each has the same 'Main' class is that a mistake? It looks like it just does the same thing 3 times. – Alan Klement May 23 '12 at 18:30
  • Oops, forgot to save the changes before I copied to Dropbox :) I've updated it, but yes each module has a different main class and output swf (module02.as, module02.swf, etc). – Dave Wolfe May 23 '12 at 22:25

1 Answers1

0

With FDT 5.5, you cannot use the workflow you mentioned by only using FDT's ANT tasks or launchers. The FDT team is looking to make adjustments so that it can.

Until the next (soon) minor release, you have three options:

  1. Create a new AIR project for each module and use the Launcher Chain. Techniques for this (and why it s) are described in two other stackoverflow questions, here and here.
  2. Create another project that isn't an AIR project and use that to house your modules.
  3. Create a custom Project Type

AIR project for each module

Creating a project for each module is not as unusual as it may it seem. It's actually the suggested workflow in the Java world and many large teams work this way. They will often have a project with 10-50 modules and have 1-2 developers working on each module. For small teams one-man shops, this might not make sense.

Create Another Project That Isn't An 'AIR' project (e.g. A Web Project)

You might be able to create another project that isn't an AIR project and use that to compile your modules. If you are not using AIR APIs, this is easy; however, if you are, try to adjust your SDK settings

Create A Custom Project Type

This is a bit of a hack and not recommended for general use; however, it will solve your issue. You can use a custom project type that is 'hacked' to use the AIR SDK & API but launch like a web project. To use this, put it in your FDT Project Types folder:

For OSX, place it in: /Users/[your user name]/Library/Application\ Support/FDT/projectTypes

...then restart FDT. Next create a simple web project than right click >Flash Project>Set Project Type and choose this new project type. I called mine 'Air Module'

Here is an example project type to download:

Community
  • 1
  • 1
Alan Klement
  • 1,218
  • 7
  • 18