3

Example : Using ANT with COMPC to compile SWCs

 3 years ago
source link: http://www.mikechambers.com/blog/2006/05/19/example-using-ant-with-compc-to-compile-swcs/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Example : Using ANT with COMPC to compile SWCs

Friday, May 19, 2006

Following up on my previous post on how to use compc to compile SWCs, here is an ANT build file that calls compc to compile a SWC:

<?xml version="1.0" ?>
<project default="main">
	<property name="base" value="../" />
	<property name="componentName" value="MyWindow" />
	<property name="swcFile" value="${componentName}.swc" />
	<property name="manifest" value="${base}manifest.xml" />
	<property name="namespace" value="http://www.adobe.com/2006/foo" />

	<available property="swc.exists" file="${swcFile}"/>
	
	<target name="main" depends="init, compile">
	</target>
	
	<target name="init" if="swc.exists">
		<delete file="${swcFile}" />
	</target>

	<target name="compile" description="Compile SWC.">
		<echo>Building ${swcFile}</echo>
		<exec dir="." executable="cmd" failonerror="true">
		    <arg line="/c compc -namespace ${namespace} ${manifest} 
		        -source-path ${base}
		    	-include-namespaces ${namespace} -include-classes mx.containers.MyWindow
		    	-include-file MyWindow.png ${base}mx/containers/MyWindow.png 
				-output='${swcFile}'"/>
		</exec>        
	</target>
	
</project>

Put this in a file called build.xml, and run ant in the same directory.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK