Hi Iiley,
as you already fount out: if you use srcset all files are added to the
command line. This behaviour won't change, because you may use more
complex patterns in the <include> (or <exclude>) tag which can't just be
replaced by "-pack ...".
But as you suggested, why not use the package option.
<package>
<pathelement path="/${AsWing}/src//com/aswing"/>
...
</package>
btw. "org.aswing.**/*.as" includes all files in the org.aswing package
and any sub-packages.
Hope this helps,
Simon
iiley wrote:
> Hi,
>
> I have several big projects with many classes, and i want to compile
> all the classes into one swf.
>
> I'v used this as2ant script:
> -----------------------------------------------------------------------------------
>
>
> /<project name="iHome" default="iHome" basedir=".">
> <import file="environment.xml"/>
> <mtasc mtasc="${mtasc}"
> version="8"
> frame="3"
> classpath="${AsWing}/src;${AsWingExt}/src;${XFlickr}/src;${iHome}/src;${Debugger}/src"
>
>
> swf="${iHomeIn.swf}"
> out="${ihome.flash.dir}/Main.swf"
> keep="yes"
> main="yes"
> trace="org.aswing.debug.Log.log"
> exclude="iHomeExclude.txt">
> <srcset dir="${Debugger}/src">
> <!--debug-->
> <include name="org/aswing/debug/*.as"/>
> </srcset>
> <srcset dir="${AsWing}/src">
> <!--aswing-->
> <include name="org/aswing/***.as"/>
> <include name="org/aswing/*/**.as"/>
> <include name="org/aswing/*/*/*.as"/>
> <include name="org/aswing/*/*/*/*.as"/>
> <include name="org/aswing/*/*/*/*/*.as"/>
> </srcset>
> <srcset dir="${AsWingExt}/src">
> <!--aswing ext-->
> <include name="com/xlands/***.as"/>
> <include name="com/xlands/*/**.as"/>
> <include name="com/xlands/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*/*.as"/>
> </srcset>
> <srcset dir="${XFlickr}/src">
> <!--xflickr-->
> <include name="com/xlands/***.as"/>
> <include name="com/xlands/*/**.as"/>
> <include name="com/xlands/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*/*.as"/>
> </srcset>
> <srcset dir="${iHome}/src">
> <!--iHome-->
> <include name="com/xlands/***.as"/>
> <include name="com/xlands/*/**.as"/>
> <include name="com/xlands/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*.as"/>
> <include name="com/xlands/*/*/*/*/*.as"/>
> <include name="iiley/*/*.as"/>
> </srcset>
> </mtasc>
> <target name="iHome"/>
> </project>
> /--------------------------------------------------------------------------------------------------------
>
>
> It works very well for us for months, thanks for the great ant tool.
> But today, it failed:
>
> /BUILD FAILED
> F:\workspace\builders\iHome.xml:13: error running
> E:\mtasc-1.12\mtasc.exe compiler/
>
> I guess because their are too many classes since as2ant produce params
> like this:
>
> /E:\AS\mtasc-1.12\mtasc.exe -swf
> F:\workspace\XClientM\ihomestatics\flashs\inMain.swf -out
> F:\workspace\XClientM\ihomestatics\flashs\Main.swf -frame 3 -trace
> org.aswing.debug.Log.log -version 8 -keep -exclude
> F:\workspace\builders\iHomeExclude.txt -cp
> E:\eclipse_svn\workspace\AsWing\src -cp F:\workspace\AsWingExt\src -cp
> F:\workspace\XFlickr\src -cp F:\workspace\XClientM\src -cp
> F:\workspace\Debugger\src -main org\aswing\debug\Delegate.as
> org\aswing\debug\Log.as org\aswing\debug\Logger.as
> org\aswing\debug\SOSLogger.as org\aswing\ASColor.as
> org\aswing\ASFont.as org\aswing\ASTextExtent.as ...... /
>
> It list all the as files, so i guess the command line must have a
> restrict of the line length, when i removed several classes to
> decrease the length, it runs ok. Well the issue is clear, then i think
> there must be another way to do with as2ant to avoid this, like
> generate " -pack packagePath" parammeter of mtasc instead of "-cp path
> and as files". Can as2ant do this? or another way? If it can't at this
> moment, will it be plan to implement in future, Thanks in advance a lot.
>
> Regards.
> --
> iiley
> AsWing http://www.aswing.org
> Blog http://spaces.msn.com/members/iiley/
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>osflash mailing list
>[email protected]
>http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
--
Simon Wacker
www.simonwacker.com
www.as2lib.org
www.hq-heilbronn.de
www.flik-flak.de
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org