Add Flex SWC Target
diff --git a/build.xml b/build.xml
index d8b3736..7c1976c 100755
--- a/build.xml
+++ b/build.xml
@@ -17,10 +17,17 @@
<project name="tlf" default="main" basedir=".">
+ <property file="${basedir}/env.properties"/>
+ <property environment="env"/>
+ <property file="${basedir}/build.properties"/>
+ <!-- Specify a FLEX_HOME in local.properties or
+ Override on cmd line with -D=FLEX_HOME=path. -->
+ <property file="${basedir}/local.properties"/>
<!-- Default Flex SDK is the trunk. Override on cmd line with -D=FLEX_HOME=path. -->
- <property name="FLEX_HOME" value="${basedir}/../../../sdk/trunk"/>
+ <property name="FLEX_HOME" value="${basedir}/../flex-sdk"/>
<echo>FLEX_HOME is ${FLEX_HOME}</echo>
+
<property name="flex.sdk.frameworks" value="${FLEX_HOME}/frameworks"/>
<property name="flex.locale" value="en_US"/>
@@ -85,6 +92,19 @@
</compc>
</target>
+ <target name="textLayout_flex" description="Compiles textLayout.swc for Flex SDK">
+ <compc fork="true"
+ output="${output.dir}/textLayout.swc">
+ <jvmarg line="${compc.jvm.args}"/>
+ <load-config filename="compile-config.xml" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+ <arg value="+source.dir=textLayout" />
+ <define name="CONFIG::debug" value="${dbg}"/>
+ <define name="CONFIG::release" value="${rel}"/>
+ </compc>
+ </target>
+
<target name="documentation" depends="textLayout" description="Updates textLayout.swc with ASDoc XML">
<condition property="asdoc.jvm.args" value="-Xmx384m">
<os family="windows"/>
diff --git a/compile-config.xml b/compile-config.xml
new file mode 100644
index 0000000..edd670f
--- /dev/null
+++ b/compile-config.xml
@@ -0,0 +1,67 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<flex-config>
+ <compiler>
+ <external-library-path>
+ <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
+ </external-library-path>
+
+ <keep-as3-metadata>
+ <name>IMXMLObject</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.adobe.com/flashx/textLayout</uri>
+ <manifest>${source.dir}/manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>${source.dir}/src</path-element>
+ </source-path>
+
+ <show-actionscript-warnings>false</show-actionscript-warnings>
+ </compiler>
+
+ <compute-digest>true</compute-digest>
+
+ <include-classes>
+ <class>flashx.textLayout.CoreClasses</class>
+ <class>flashx.textLayout.EditClasses</class>
+ <class>flashx.textLayout.ConversionClasses</class>
+ </include-classes>
+
+ <include-file>
+ <name>manifest.xml</name>
+ <path>${source.dir}/manifest.xml</path>
+ </include-file>
+
+ <include-namespaces>
+ <uri>library://ns.adobe.com/flashx/textLayout</uri>
+ </include-namespaces>
+
+ <resource-bundle-list>bundles.properties</resource-bundle-list>
+
+ <target-player>${playerglobal.version}</target-player>
+</flex-config>