[osflash] [AS2ANT]Too many classes made mtasc -cp param too long then crashed mtasc

iiley iiley.chen at gmail.com
Thu Apr 20 22:59:54 EDT 2006


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.execompiler
*

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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20060421/bfae79fd/attachment.htm


More information about the osflash mailing list