Configuring FDT to use the HellFire compiler

Now that HFCD supports Apache Ant, Flex IDEs other than Flex Builder (e.g. FDT and IntelliJ IDEA) can take advantage of some of the core functionalities of HFCD to improve build performance. In this post I’m going to briefly describe how to configure FDT to use HFCD. I hope to do IntelliJ IDEA in the next post.

First of all, the HFCD installers target Flex Builder. So, if you use FDT, you have to install HFCD manually. Well, it’s really not that bad. Instead of downloading the installers, you download the zip archive (hfcd_3.x.x.zip or hfcd_4.x.x.zip) from stopcoding.org.

Unzip the archive file and run ‘ant client server’ from the command-line.

To start the HFCD server, run ‘hfcd’ in the HFCD_HOME/server/bin directory.

Now, start FDT.

Some developers are already familiar with using Ant in FDT. So, it’s not absolutely necessary to follow my instructions here. But I would do it like the following:

1. Assume that my FDT workspace is empty. For this demo, create the legendary HelloWorld project.

2. Create a generic project called “HFCD Build”. Add a file called “build.xml” to the “HFCD Build” project.

4. Add build.xml to the “Ant” view. Since build.xml uses a 3rd-party ant task, you have to configure how FDT runs the build script and where to locate the ant task definition. Right-click on the build file in the “Ant” view and select “2 Ant Build…”.

5. The “Main” tab shows that ${workspace_loc:/HFCD Build/build.xml} is the build file.

8. In the “Classpath” tab, click “Add External JARs…” and select hfcd-ant-tasks.jar in the HFCD_HOME/client/lib directory.

9. In the “JRE” tab, select “Run in the same JRE as the workspace”.

Now, you’re all set. Check again to make sure that hfcd is actually running. Then in the “Ant” view, double-click the “main” target. You should see the ant output in the “Console” view…

and HelloWorld.swf in the “HFCD Build” directory. Note that in the “HFCD Build” directory, there is a new directory called “build.hfcd”. This directory stores the list of files that have already been uploaded to HFCD and the build reports. If you delete this directory, all the files and directories specified in the <watcher> task will be uploaded again the next time you run the build script.

As you add more projects to the FDT workspace, you should add <application> and <library> tasks to the same build.xml file – add the tasks within the same <hfcd> task in the “main” target. For more information on the ant task syntax, please check out my previous post.

14 Responses

I am afraid I having difficulty following your directions as I am stuck on:

“…. and run ‘ant client server’ from the command-line.”

I unsure how to go about this step as I don’t know where to find the ‘ant client server’ or what I ought to enter into the command-line.
(the zip doesn’t seem to contain any of file with a similar name)

I will deal with the following steps once I understand the first one clearly but I think that:
“To start the HFCD server, run ‘hfcd’ in the HFCD_HOME/server/bin directory.”
might make me ask a question or two :o)

There is a file called “build.xml” in /Applications/hfcd_3.5.0. When you run ant in the hfcd_3.5.0 directory (which is pre-installed on Snow Leopard), ant looks for build.xml by default and runs the script.

Once “ant client server” is done. You should see “server” in the hfcd_3.5.0 directory.

Hi Clement, Is it possible to compile pure Actionscript projects with the HFCD? And what’s the advantage to have a separate project for the build.xml over having it within the same project? Kind regards, Uwe

In the build.xml file, you define a task and a number of and tasks. You use this task to build the entire workspace. That’s why putting the file outside of any project directories makes more sense than putting it in a particular project directory. Second reason is that you also want to be able to modify build.xml in Eclipse and putting it in a separate project makes it easy to access the file.

These are great news! Though as I tried to download the package there seems to be a problem with the link: http://stopcoding.org/hfcd/4/download/ Do you have an advice on how to download for me? Kind Regards, Uwe

I think there is a reason why FDT is alive and well. From the perspective of building Flex apps, they are on a level playing field with HFCD. Actually, I’d go out on a limb to say that in some situations, FDT could outperform by a mile when using HFCD. Stay tuned if you want to know what I’m saying…

From installation guide for HFCD 3.x.x Plugin / Windows version: “7. If you install the HFCD Eclipse plugin on an Eclipse installation (not a Flex Builder installation), the
HFCD Eclipse plugin should be in the “eclipse/dropins” directory.”

When I install HFCD, this item don’t match! There is no file ( hellfire.admin.ui_3.0.0.jar) on droping folder. (Installation version detail: Eclipse Ganymede, Flex Buider 3.0.2, SDK 3.5.0, Windws 7 64Bits, HFCD 3.5.0 Plugin/Windows version).
When I try to build, I get this error: “HFCD license data not found.”, even informing the evaluation license file during the installation.
How can I fix this?