Task for building Flex Ant

Initial question.

I am creating a .swf using Flex Ant.

In my .swf I will link the file target.as

that I generate from the file with the source.txt

command

./tool.sh source.txt > target.as

      

How can I add what is described in the above sentence to the ant build process?

0


source to share


3 answers


The exec task executes any external program:

<exec executable="${basedir}/tool.sh" dir="${basedir}" output="target.as">
    <arg path="source.txt"/>
</exec>

      



So, if you are using mxmlc ant task to compile swf, you can define your build task like this:

<target name="build">
     <exec executable="${basedir}/tool.sh" dir="${basedir}" output="target.as">
          <arg path="source.txt"/>
     </exec>

     <mxmlc ....>
         ...
     </mxmlc>
</target>

      

+4


source


To run this command in Ant use exec

.



<exec executable="tool.sh" dir="toolshdir" output="target.as">
    <arg value="source.txt" />
</exec>

      

+2


source


http://livedocs.adobe.com/flex/3/html/anttasks_1.html

You can also use the "mxmlc" Flex task instead of calling it with exec. You can do a lot of configuration right in XML if you don't want it to support wrapper script.

+1


source







All Articles