Here is a sample NAnt build script for your flex projects. I have this building a project that has the ESRI Flex API in it so it should be a simple installation. I will explain to make it easier.Here is the script<?xml version="1.0"?>
<project name="FV2" default="build" basedir=".">
<target name="build">
<echo message=""/>
<exec program="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin\mxmlc.exe" basedir="${project::get-base-directory()}\src">
<arg value="${project::get-base-directory()}\src\index.mxml"/>
<arg value="-library-path+=${project::get-base-directory()}\libs\agslib-2.1-2010-09-17.swc" />
<arg value="-locale=en_US" />
<arg value="-source-path=locale/en_US" />
<arg value="-keep-all-type-selectors=true" />
</exec>
</target>
</project>
Change the path in this line to reflect your environment<exec program="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin\mxmlc.exe"
This line assumes your ESRI Flex swc is in the lib folder of your project. If it is not.... change it accordingly<arg value="-library-path+=${project::get-base-directory()}\libs\agslib-2.1-2010-09-17.swc" />
Change these if you need to... should be self explanatory<arg value="-locale=en_US" />
<arg value="-source-path=locale/en_US" />
Specifying the locale folder is used for finding ViewerStrings.properties file.Resources that may be of assistance:
- Unable to Resolve errors - You may run into a ton of reference errors. The compiler may have trouble finding the assets folder. Try this. I added the '/' to the beginning of the paths and then found this URL that solidified other people were doing the same.
If you run into problems let me know....Edit:Also... if you are interested in localizing flex applications with Ant (non NAnt) then try this link... Seems handy...