Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
225 lines (188 sloc) 8.9 KB
<?xml version="1.0"?>
<!--
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.
-->
<project name="flash-integration" default="main" basedir=".">
<property name="FLEX_HOME" location="${basedir}/../../.."/>
<property file="${FLEX_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEX_HOME}/build.properties"/>
<macrodef name="bundle">
<attribute name="locale"/>
<sequential>
<echo message="Compiling frameworks/locale/@{locale}/flash-integration_rb.swc"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>
<compc fork="true"
output="${FLEX_HOME}/frameworks/locale/@{locale}/flash-integration_rb.swc">
<jvmarg line="${compc.jvm.args}"/>
<load-config filename="bundle-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+locale=@{locale}" />
</compc>
</sequential>
</macrodef>
<macrodef name="fat-swc">
<attribute name="locale"/>
<sequential>
<mkdir dir="${basedir}/bundles/@{locale}/docs" />
<zip destfile="${FLEX_HOME}/frameworks/locale/@{locale}/flash-integration_rb.swc" update="true">
<zipfileset dir="${basedir}/bundles/@{locale}/docs" prefix="docs">
<include name="*.*"/>
</zipfileset>
</zip>
</sequential>
</macrodef>
<macrodef name="bundler">
<attribute name="locale"/>
<sequential>
<bundle locale="@{locale}"/>
<fat-swc locale="@{locale}"/>
</sequential>
</macrodef>
<target name="main" depends="clean,compile" description="Clean build of flash-integration.swc and en_US">
<bundle locale="${locale}"/>
</target>
<target name="other.locales" depends="bundles" description="Build other locale SWCs"/>
<!-- This is a private target for building automation_flashflexkit_rb.swc for various locales. -->
<!-- The targets below set the 'locale' parameter and call it with <antcall>. -->
<target name="bundles">
<bundler locale="de_DE"/><!-- German resources -->
<bundler locale="fr_FR"/><!-- French resources -->
<bundler locale="ja_JP"/><!-- Japanese resources -->
<bundler locale="ru_RU"/><!-- Russian resources -->
<bundler locale="zh_CN"/><!-- Simplified Chinese resources -->
</target>
<target name="clean" depends="bundles-clean">
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${basedir}">
<include name="bundles.properties"/>
<include name="libs/flash-integration.swc"/>
</fileset>
<fileset dir="${FLEX_HOME}/frameworks/libs">
<include name="flash-integration.swc"/>
<include name="flash-integration.swc.incr"/>
</fileset>
<fileset dir="${FLEX_HOME}/frameworks/flash-integration"/>
<fileset dir="${FLEX_HOME}/frameworks/projects/flash-integration/libs"/>
</delete>
</target>
<target name="bundles-clean">
<delete failonerror="false">
<fileset dir="${FLEX_HOME}/frameworks/locale">
<include name="*/flash-integration_rb.swc"/>
<include name="*/flash-integration_rb.swc.incr"/>
</fileset>
</delete>
</target>
<target name="compile" description="Compiles flash-integration.swc">
<echo message="Compiling frameworks/projects/flash-integration/libs/flash-integration.swc"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>
<!--
Link in the classes (and their dependencies) for the MXML tags
listed in manifest.xml.
Compile against framework source, and link it into flash-integration.swc
(only a few interfaces will be linked in).
Don't put any resources into the SWC.
Write a bundle list of referenced resource bundles
into the file bundles.properties in this directory.
(This should be an empty list.)
-->
<compc fork="true"
output="${FLEX_HOME}/frameworks/libs/flash-integration.swc">
<jvmarg line="${compc.jvm.args}"/>
<load-config filename="${FLEX_HOME}/frameworks/projects/framework/framework-config.xml"/>
<load-config filename="compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</compc>
<!-- need to copy the file produced over so that the MXI
can refer to the flash-integration.swc -->
<copy todir="${basedir}/libs" verbose="true">
<fileset dir="${FLEX_HOME}/frameworks/libs">
<include name="flash-integration.swc"/>
</fileset>
</copy>
<antcall target="FlashMXP" />
</target>
<target name="FlashMXP" description="builds flash-integration.MXP">
<echo message="ADOBE_EXTENSION_MANAGER is ${env.ADOBE_EXTENSION_MANAGER}"/>
<available file="${env.ADOBE_EXTENSION_MANAGER}"
type="file"
property="ADOBE_EXTENSION_MANAGER.set"/>
<antcall target="ReportNoExtensionManager" />
<antcall target="PackageMXP" />
</target>
<target name="ReportNoExtensionManager" unless="ADOBE_EXTENSION_MANAGER.set" >
<echo message="Adobe ExtensionManager not found. MXP file will not be created" />
</target>
<target name="PackageMXP" if="ADOBE_EXTENSION_MANAGER.set" >
<echo message="Creating MXP file ${FLEX_HOME}/frameworks/flash-integration/FlexComponentKit.mxp" />
<mkdir dir="${FLEX_HOME}/frameworks/flash-integration" />
<exec executable="${env.ADOBE_EXTENSION_MANAGER}" dir="${basedir}" failonerror="true">
<arg value="-suppress" />
<arg value="-package" />
<arg value="mxi=FlexComponentKit.mxi" />
<arg value="mxp=${FLEX_HOME}/frameworks/flash-integration/FlexComponentKit.mxp" />
</exec>
</target>
<target name="doc" depends="clean-temp-docs" description="updates flash-integration.swc with asdoc xml">
<!-- Load the <asdoc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>
<condition property="asdoc.jvm.args" value="-Xmx384m">
<os family="windows"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="mac"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="unix"/>
</condition>
<!-- Call asdoc to generate dita xml files -->
<asdoc output="${FLEX_HOME}/tempDoc" lenient="true" failonerror="true" keep-xml="true" skip-xsl="true" fork="true">
<compiler.source-path path-element="${basedir}/src"/>
<!-- doesn't matter what we put in here as long as it links in the classes.
Flash Authoring ignores this and the namespace it's mapped too...
it just needs to be linked through a manifest file -->
<namespace uri="http://www.adobe.com/someNonSensicalURI" manifest="${basedir}/manifest.xml"/>
<doc-namespaces uri="http://www.adobe.com/someNonSensicalURI"/>
<external-library-path dir="${env.PLAYERGLOBAL_HOME}">
<include name="${playerglobal.version}/playerglobal.swc"/>
</external-library-path>
<external-library-path dir="${FLEX_HOME}/frameworks/libs">
<include name="framework.swc" />
<include name="mx/mx.swc"/>
<include name="textLayout.swc" />
</external-library-path>
<library-path/>
<jvmarg line="${asdoc.jvm.args}"/>
</asdoc>
<!-- updates FlexComponentBase.swc with asdoc xml -->
<zip destfile="${FLEX_HOME}/frameworks/locale/en_US/flash-integration_rb.swc" update="true">
<zipfileset dir="${FLEX_HOME}/tempDoc/tempdita" prefix="docs">
<include name="*.*"/>
<exclude name="ASDoc_Config.xml"/>
<exclude name="overviews.xml"/>
</zipfileset>
</zip>
</target>
<target name="clean-temp-docs">
<delete dir="${FLEX_HOME}/tempDoc" failonerror="false" includeEmptyDirs="true"/>
</target>
</project>
You can’t perform that action at this time.