[osflash] Ant builds in Eclipse
Tim Walling
mail-osflash at timwalling.com
Tue Jun 7 10:47:08 PDT 2005
So if one were to go this route it looks like someone should write a
task for swfmill also. That's the job that got me started on this.
Tim
Simon Wacker wrote:
> Oh, yeah, you are right, an example in form of a complete build.xml
> would definitely be a good idea. If you download the as2lib
> (http://www.as2lib.org) there is a build.xml included. This uses the
> mtasc task I posted previously.
>
> <project name="As2lib - Open Source ActionScript 2.0 Library"
> default="usage" basedir=".">
>
> <property name="src.dir" location="src"/>
> <property name="lib.dir" location="lib"/>
>
> <taskdef name="mtasc" classname="org.as2lib.ant.Mtasc" classpath="ant"/>
>
> <target name="usage">
> <echo message=""/>
> <echo
> message="------------------------------------------------------"/>
> <echo message="Among the available targets are:"/>
> <echo message=""/>
> <echo message="compile"/>
> <echo
> message="------------------------------------------------------"/>
> <echo message=""/>
> </target>
>
> <target name="compile" description="compile source files">
> <mtasc srcdir="${src.dir}/org/as2lib/data" split="yes">
> <classpath path="${src.dir}"/>
> <classpath path="${lib.dir}/alcon/classes"/>
> <classpath path="${lib.dir}/ascb logging/classes"/>
> <classpath path="${lib.dir}/debug panel"/>
> <classpath path="${lib.dir}/flash debug tool/Flash"/>
> <classpath path="${lib.dir}/flashout"/>
> <classpath path="${lib.dir}/flex panel/src"/>
> <classpath path="${lib.dir}/lb.log"/>
> </mtasc>
> </target>
>
> </project>
>
> It first defines the basic properties src.dir and lib.dir, and then a
> new task, 'mtasc'. In the above case the task must be in the same
> directory and in the package 'ant' (you may also omit classpath and
> include the task directly in your global classpath etc.). The target
> usage is arbitrary. ;) The target compile uses the previously defined
> task. It compiles the source directory org/as2lib/data and any
> sub-directories, and each class on its own (split).
> You may of course also create a swf with a main method. You can
> therefore use the attributes 'swf' and 'main'. All attributes are
> actually the same as in mtasc, except 'exclude' which is 'excl' in the
> task. For a full list of this attributes you can take a look at the
> task's docu.
>
> Greetings,
> Simon
>
> PS: I should open a page on osflash.
> --
> Simon Wacker
> www.simonwacker.com
> www.as2lib.org
> www.hq-heilbronn.de
> www.flik-flak.de
>
> ----- Original Message ----- From: "Tim Walling"
> <mail-osflash at timwalling.com>
> To: "Open Source Flash Mailing List" <osflash at osflash.org>
> Sent: Tuesday, June 07, 2005 4:40 PM
> Subject: Re: [osflash] Ant builds in Eclipse
>
>
>> Thanks. I actually noticed this when I was looking through the
>> updated as2lib release last week but hadn't taken a stab at hooking
>> it up.
>>
>> Not being that experienced yet with Ant, I'm guessing that the sample
>> you provide in the class documentation would go into the build.xml
>> file as an Ant task. Is that right? Maybe a sample build.xml file
>> would be helpful for people just getting started with Ant.
>>
>> Tim
>>
>> Simon Wacker wrote:
>>
>>> I have also created Ant support for MTASC a month ago. I made a new
>>> task out of it. I think of this task approach to be more natural to
>>> use than doing everything with the executable task.
>>> You may wanna have a look; it is included in this mail. The usage is
>>> explained in the class docu (see Mtasc.java).
>>>
>>> Greetings,
>>> Simon
>>> --
>>> Simon Wacker
>>> www.simonwacker.com
>>> www.as2lib.org
>>> www.hq-heilbronn.de
>>> www.flik-flak.de
>>>
>>> ----- Original Message ----- From: "Tim Walling"
>>> <mail-osflash at timwalling.com>
>>> To: <osflash at osflash.org>
>>> Sent: Tuesday, June 07, 2005 7:31 AM
>>> Subject: [osflash] Ant builds in Eclipse
>>>
>>>
>>>> Finally took a stab at putting together a build file for Ant so I
>>>> could publish my library with swfmill. I decided to take it a step
>>>> further and include a compile of a project in mtasc using the
>>>> library swf output from swfmill. I put up some more info here:
>>>>
>>>> http://www.timwalling.com/actionscript/22/ant-builds-with-fames/
>>>>
>>>> I included two build files in the zip. Basically one for a simple
>>>> build using swfmill since I know some would rather just stick with
>>>> Flashout for compiling and another one which compiles the whole
>>>> package. I was curious to see what I could do with Ant. Please feel
>>>> free to modify and expand upon this. I haven't used Ant much and
>>>> I'd be interested in other people's input.
>>>>
>>>> Tim
>>>>
>>>>
>>>> _______________________________________________
>>>> osflash mailing list
>>>> osflash at osflash.org
>>>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>>
>>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> osflash mailing list
>>> osflash at osflash.org
>>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>
>> _______________________________________________
>> osflash mailing list
>> osflash at osflash.org
>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>
>>
>------------------------------------------------------------------------
>
><project name="As2lib - Open Source ActionScript 2.0 Library" default="usage" basedir=".">
>
> <property name="src.dir" location="src"/>
> <property name="lib.dir" location="lib"/>
>
> <taskdef name="mtasc" classname="org.as2lib.ant.Mtasc" classpath="ant"/>
>
> <target name="usage">
> <echo message=""/>
> <echo message="------------------------------------------------------"/>
> <echo message="Among the available targets are:"/>
> <echo message=""/>
> <echo message="compile"/>
> <echo message="------------------------------------------------------"/>
> <echo message=""/>
> </target>
>
> <target name="compile" description="compile source files">
> <mtasc srcdir="${src.dir}/org/as2lib/data" split="yes">
> <classpath path="${src.dir}"/>
> <classpath path="${lib.dir}/alcon/classes"/>
> <classpath path="${lib.dir}/ascb logging/classes"/>
> <classpath path="${lib.dir}/debug panel"/>
> <classpath path="${lib.dir}/flash debug tool/Flash"/>
> <classpath path="${lib.dir}/flashout"/>
> <classpath path="${lib.dir}/flex panel/src"/>
> <classpath path="${lib.dir}/lb.log"/>
> </mtasc>
> </target>
>
></project>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>osflash mailing list
>osflash at osflash.org
>http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
More information about the osflash
mailing list