|
Hi Just wanted to share this code with everybody.. I have a ‘buildtools’ folder that sits next to
all my Flash projects. I wanted to solve the problem of having to reproduce
linked library settings in every build file. Here’s the solution I came
up with. Hope it’s of help to someone somewhere. Include this in every build.xml file <property name="buildtools.dir" location="../../buildtools"/> <!-- imports
settings ${mtasc.exe}, ${swfmill.exe} and ${linkedlibraries} (from project
settings) --> <import file="${buildtools.dir}/settings.xml"/> Example swf task <!-- the
project-specific classpath --> <property name="src.dir" location="../Classes"/> <swf mtasc="${mtasc.exe}" swfmill="${swfmill.exe}" classpath="${linkedlibraries}${src.dir}" […other
swf settings…] > <!-- […]
--> </swf> Contents of ${buildtools}/settings.xml file <project name="settings" default="..."> <property name="swfmill.exe" location="${buildtools.dir}/exe/swfmill.exe"/> <property name="mtasc.exe" location="${buildtools.dir}/exe/mtasc/mtasc.exe"/> <!-- create and include a file classpaths.properties within
the project and import settings from this file--> <xslt style="${buildtools.dir}/transform_fdt_classpaths.xsl" in="../.project" out="classpaths.properties"> <outputproperty name="method" value="text" /> </xslt> <property file="classpaths.properties"/> </project> Contents of
${buildtools}/transform_fdt_classpaths.xsl <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/">linkedlibraries=<xsl:for-each select="//link"><xsl:value-of select="location"/>;</xsl:for-each></xsl:template> </xsl:stylesheet> |
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
