Creating project templates for FDT4

Note that this tutorial is for Mac users!

Step 1 – Get to the stock templates

Open up the Finder and navigate to your home folder. After you installed the latest FDT4 Milestone release you’ll find a folder called “FDT” there. Navigate to FDT/projectTemplates/Web (so we’ll build a web project template).

You’ll find several folders in there such as “EmptyAS3″, “EmptyFlex4″ and so on.

Step 2 – Choosing the base

If you want to create your very own project template choose a base to startup on. I’ll take “EmptyFlex4″ and duplicate it. Now name your folder. This name will never appear anywhere but you need to remember what is inside of it. So choose a describing name.

Step 3 – Description.xml

Navigate into your duplicated folder and open up the “description.xml” and find the “name” tag. Type in whatever you want your template to be called. I’ll choose “Tutorial” the sake of simplicity. After the “name” tag you’ll find the “description” tag. The content of it is display in the new project dialog box when the template is being selected. Enter whatever you prefer. For this tutorial I’ll just add the as3-signals.swc so I’ll write “default empty flex 4 project with signals”.

Step 4 – Add custom libraries

Go back to your template folder and create a folder called “project”. Put your custom libs inside of it. You can even create another folder inside of the project folder called “libs” or something like that. It depends on how you want the project to be organized. I’ll just put the as3-signals.swc into the project folder.

Now go back into the description.xml and navigate all the way down to the closing “folders” tag. After that, insert the a “libraries” tag like this:



as3-signals.swc


You can add as many swc’s as you like this way. Just open up a new “swc” tag inside of the “libraries” tag and give it a “path”. There is another tag you’ll want to add and it is called “source”. Just leave this one empty. There is a third tag that you can use, but do not leave it empty. It is called “asDoc” for a link to a documentation. However if you leave this one empty you won’t be able to properly browse the swc file.
Now save the description.xml, start up FDT4 (or just create a new project if FDT is already running).
Your description.xml should look similar to this:



	Tutorial
	default empty flex 4 project with signals
Flex 4
	
		src
		bin
	

		
as3-signals.swc
			
		
	

Step 5 – Creating a project from your template

So fire up FDT if it is no already running. Create a new project. You’ll see your custom template in the project templates dialog. Enter a name for your project, select your template and click finish.

Step 6 – The end

I hope this will speed up your workflow as it speeded up mine.
So happy coding!

Tags: , ,

6 Responses to “Creating project templates for FDT4”

  1. [...] This post was mentioned on Twitter by Jesse Freeman. Jesse Freeman said: RT @aidentailor: blogged: Creating project templates for FDT4 – http://tinyurl.com/373tpy8 [...]

  2. sine says:

    Thanks. But what is the unclosed empty tag about..please?

  3. Daniel Goulding says:

    In the latest version of FDT 4 on a Mac, the project templates are found here:

    /Library/Application Support/FDT/projectTemplates

    This was causing me a headache for a while since I had a previous version installed meaning I had duplicate FDT directories.

  4. Jonathan says:

    I’m using FDT on windows, how do I create project templates?

Leave a Reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>