Recently we came to the question how to use FCSH with Ant. So we ran into some problems.
1. First Problem: Starting FCSH from the commandline compiles the command and shuts down. So the next time compiling the same command you won’t have advantage.FCSH just compiles all classes again and not only the changed classes.
2. Second Problem: There are huge amount of compileroptions that you have to know when creating an Ant task with exec for mxmlc or compc.
Therefore we decided to write our own FCSH Wrapper. You ask why? There are already plugins available, such as iFac. But these plugins work with socket connections and on some computers, especially in big enviroments, you need Dadministration-rights to use sockets. So we made a plugin without the need of using sockets and the advantages of the Flex Ant Tasks.
Below you find an example build.xml with the currently available features.
<project name="FCSH Wrapper" default="example_bigsource_mxmlc" basedir=".">
<property file="${user.name}.build.properties" />
<property file="build.properties" />
<target name="example_bigsource_mxmlc" description="compiles a swf">
<bigsource.mxmlc basedir="${basedir}">
<default_size height="768" width="1024" />
<file_specs path="${swf.main.class}" />
<library_path path="${swc.applicationasset}" />
<source_path path="source/as" />
<output path="${swf.main.target}" />
<verbose_stacktraces value="true" />
</bigsource.mxmlc>
</target>
<target name="example_bigsource_flashplayer" description="opens swf in flashplayer">
<bigsource.flashplayer basedir="${basedir}" swf="${swf.main.target}" />
</target>
<target name="example_bigsource_compc" description="creates a swc">
<bigsource.compc basedir="${basedir}" maxexecutiontime="30000">
<source_path path="src/" />
<namespace uri="http://www.mydomain.com/projects/as3framework" manifest="manifest.xml" />
<include_namespaces name="http://www.mydomain.com/projects/as3framework" />
<output path="swc/your.swc" />
</bigsource.compc>
</target>
<target name="example_bigsource_translate" description="creates a xml file without the pluginspecific tasks">
<bigsource.translate basedir="${basedir}" inputfile="build.xml" outputfile="build_wo_fcsh.xml" />
</target>
</project>
If you want to use this plugin you can install it with the Install Manager in Eclipse. Here is the update URL: http://update.bigsource.de/update
After installation you have to specify the paths for FCSH and the Flashplayer you want to use in the preferences section of Eclipse. Now you have code completion for the BigSource tasks in the Ant editor of Eclipse. In order to compile you will also be able to compile for Flashplayer 9 and 10 in the same build.xml. You just need to specify the flashplayer-version in the task. Version 9 and 10 are available.
Starting the tasks first time you will get an taskdef error. This causes the Antscript must run in the same JRE as Eclipse. You can set it in the applicationmenu under “Run” -> “External Tools” -> “Open External Tools” -> “JRE”.
Some settings have standard values:
- version = 9
- maxexecutiontime = 20000 (Milliseconds)
The plugin needs the attribute basedir for every task. This should be set to ${basedir} because the plugin uses this path to check the files for building internal paths.
We will write a detailed documentation very soon. The plugin is in beta status, so it will be distributed as is with no warranty. If you need some features or want to report bugs feel free to contact us. FCSH, mxmlc, compc and Flash are product or trademarks of Adobe.
UPDATE: Fcsh Wrapper has a new name!!!! It’s now called BigSource Zarkov and has new Features!!
![[del.icio.us]](http://www.bigsource.de/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.bigsource.de/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.bigsource.de/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.bigsource.de/wp-content/plugins/bookmarkify/google.png)
![[Mixx]](http://www.bigsource.de/wp-content/plugins/bookmarkify/mixx.png)
![[MySpace]](http://www.bigsource.de/wp-content/plugins/bookmarkify/myspace.png)
![[StumbleUpon]](http://www.bigsource.de/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://www.bigsource.de/wp-content/plugins/bookmarkify/twitter.png)

