blob: 017195e08f83bc53f458e448c8f0891add0fd68a [file] [log] [blame]
<?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.
-->
<!-- Note:
If you modify this file you may have to make the same change in build_framework.xml.
build_framework.xml is renamed to build.xml when it is packaged.
It is used to build the frameworks directory from the zip file.
-->
<project name="frameworks" default="main" basedir=".">
<property name="FLEX_HOME" location=".."/>
<property name="playerglobal.version" value="11.1"/>
<!-- Required for OSX 10.6 / Snow Leopard Performance -->
<condition property="local.d32" value="-d32" >
<and>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
<os family="mac"/>
</and>
</condition>
<!-- Property for the platform. -->
<condition property="isMac" value="true">
<os family="mac"/>
</condition>
<condition property="isWindows">
<os family="windows" />
</condition>
<property file="${FLEX_HOME}/build.properties"/>
<target name="main" depends="clean,thirdparty-downloads,prepare,javascript,compile" description="Clean build of all SWCs"/>
<!-- Note:
Removed osmf from build. For now, just use the downloaded swc.
We can move the osmf source from osmf-download to projects/osmf and add back the
property files for all the languages if we choose.
Should consider updating the OSMF and TLF versions in use.
-->
<target name="compile" description="Builds all SWCs but not their resource bundles">
<antcall target="framework"/>
<antcall target="mx"/>
<antcall target="rpc"/>
<antcall target="charts"/>
<antcall target="advancedgrids"/>
<antcall target="spark"/>
<antcall target="sparkskins"/>
<antcall target="spark_dmv"/>
<antcall target="airframework"/>
<antcall target="airspark"/>
<antcall target="mobilecomponents"/>
<antcall target="mobiletheme"/>
<antcall target="core"/>
<antcall target="flash_integration"/>
<antcall target="authoringsupport"/>
<antcall target="halo"/>
<!--antcall target="osmf"/-->
<antcall target="wireframe"/>
<!-- need to resolve whether we can donate automation_agent.swc
<antcall target="automation"/>
<antcall target="automation_dmv"/>
<antcall target="automation_spark"/>
<antcall target="automation_air"/>
<antcall target="automation_airspark"/>
<antcall target="automation_flashflexkit"/>
-->
</target>
<target name="other.locales" description ="Builds resource SWCs for all locales">
<ant dir="${basedir}/projects/framework" target="other.locales"/>
<ant dir="${basedir}/projects/mx" target="other.locales"/>
<ant dir="${basedir}/projects/airframework" target="other.locales"/>
<ant dir="${basedir}/projects/airspark" target="other.locales"/>
<ant dir="${basedir}/projects/rpc" target="other.locales"/>
<ant dir="${basedir}/projects/charts" target="other.locales"/>
<ant dir="${basedir}/projects/advancedgrids" target="other.locales"/>
<ant dir="${basedir}/projects/spark" target="other.locales"/>
<ant dir="${basedir}/projects/mobilecomponents" target="other.locales" />
<ant dir="${basedir}/projects/textLayout" target="other.locales"/>
<!--ant dir="${basedir}/projects/osmf" target="other.locales"/-->
<ant dir="${basedir}/projects/playerglobal" target="other.locales" />
<ant dir="${basedir}/projects/automation" target="other.locales"/>
<ant dir="${basedir}/projects/flash-integration" target="other.locales"/>
</target>
<target name="doc" >
<ant dir="${basedir}/projects/framework" target="doc" />
<ant dir="${basedir}/projects/mx" target="doc" />
<ant dir="${basedir}/projects/rpc" target="doc" />
<ant dir="${basedir}/projects/charts" target="doc" />
<ant dir="${basedir}/projects/advancedgrids" target="doc" />
<ant dir="${basedir}/projects/spark" target="doc" />
<ant dir="${basedir}/projects/spark_dmv" target="doc" />
<ant dir="${basedir}/projects/sparkskins" target="doc" />
<ant dir="${basedir}/projects/airframework" target="doc" />
<ant dir="${basedir}/projects/airspark" target="doc" />
<ant dir="${basedir}/projects/mobilecomponents" target="doc" />
<ant dir="${basedir}/projects/mobiletheme" target="doc" />
<ant dir="${basedir}/projects/core" target="doc" />
<ant dir="${basedir}/projects/authoringsupport" target="doc" />
<!--ant dir="${basedir}/projects/osmf" target="doc" /-->
<ant dir="${basedir}/projects/wireframe" target="doc" />
<ant dir="${basedir}/projects/flash-integration" target="doc" />
<ant dir="${basedir}/projects/automation" target="doc" />
</target>
<target name="clean" description="Cleans all SWCs and their resource bundles">
<!-- Delete AIR files and directories from 'prepare' target -->
<delete file="${FLEX_HOME}/AIR SDK Readme.txt"/>
<delete file="${FLEX_HOME}/SDK license.pdf"/>
<delete file="${FLEX_HOME}/bin/adl"/>
<delete file="${FLEX_HOME}/bin/adl.exe"/>
<delete file="${FLEX_HOME}/bin/adt"/>
<delete file="${FLEX_HOME}/bin/adt.bat"/>
<delete dir="${FLEX_HOME}/frameworks/libs/air"/>
<delete dir="${FLEX_HOME}/frameworks/projects/air"/>
<delete file="${FLEX_HOME}/lib/adt.jar"/>
<delete dir="${FLEX_HOME}/runtimes"/>
<delete dir="${FLEX_HOME}/samples/badge"/>
<delete file="${FLEX_HOME}/samples/descriptor-sample.xml"/>
<delete dir="${FLEX_HOME}/samples/icons"/>
<delete dir="${FLEX_HOME}/templates/air"/>
<!-- Delete output from SWC projects -->
<ant dir="${basedir}/projects/framework" target="clean"/>
<ant dir="${basedir}/projects/mx" target="clean"/>
<ant dir="${basedir}/projects/airframework" target="clean"/>
<ant dir="${basedir}/projects/airspark" target="clean"/>
<ant dir="${basedir}/projects/mobilecomponents" target="clean"/>
<ant dir="${basedir}/projects/mobiletheme" target="clean"/>
<ant dir="${basedir}/projects/core" target="clean"/>
<ant dir="${basedir}/projects/spark" target="clean"/>
<ant dir="${basedir}/projects/spark_dmv" target="clean"/>
<ant dir="${basedir}/projects/sparkskins" target="clean"/>
<ant dir="${basedir}/projects/authoringsupport" target="clean"/>
<ant dir="${basedir}/projects/halo" target="clean"/>
<ant dir="${basedir}/projects/wireframe" target="clean"/>
<ant dir="${basedir}/projects/flash-integration" target="clean"/>
<ant dir="${basedir}/projects/rpc" target="clean"/>
<ant dir="${basedir}/projects/authoringsupport" target="clean"/>
<ant dir="${basedir}/projects/charts" target="clean"/>
<ant dir="${basedir}/projects/advancedgrids" target="clean"/>
<ant dir="${basedir}/projects/automation" target="clean"/>
<ant dir="${basedir}/projects/automation_air" target="clean"/>
<ant dir="${basedir}/projects/automation_dmv" target="clean"/>
<ant dir="${basedir}/projects/automation_flashflexkit" target="clean"/>
<ant dir="${basedir}/projects/automation_spark" target="clean"/>
<ant dir="${basedir}/projects/automation_airspark" target="clean"/>
<ant dir="${basedir}/javascript" target="clean"/>
<!-- Delete empty folders -->
<delete dir="${basedir}/locale">
<exclude name="**/automation_agent_rb.swc"/>
<exclude name="**/metadata.properties"/>
<exclude name="**/qtp_air_rb.swc"/>
</delete>
<delete dir="${basedir}/libs/generated"/>
</target>
<target name="thirdparty-clean" description="Cleans thirdparty downloaded files.">
<delete failonerror="false" verbose="true">
<fileset dir="${basedir}/libs" includes="osmf.swc,textLayout.swc"/>
<fileset dir="${basedir}/libs/player/${playerglobal.version}" includes="playerglobal.swc"/>
</delete>
<delete dir="${FLEX_HOME}/in/air" excludes="*.xml"/>
<delete dir="${FLEX_HOME}/in/downloads"/>
<!-- textLayout source -->
<delete failonerror="false" verbose="false">
<fileset dir="${basedir}/projects/textLayout">
<include name="**/**"/>
<exclude name="build.xml"/>
<exclude name="**/.settings/**"/>
<exclude name="**/.actionScriptProperties"/>
<exclude name="**/.flexLibProperties"/>
<exclude name="**/.project"/>
</fileset>
</delete>
</target>
<target name="prepare" description="Prepares for building framework SWCs">
<!-- Expand the Mac AIK on top of the SDK -->
<copy file="${FLEX_HOME}/in/air/mac/AIR Integration Kit.tbz2" todir="${FLEX_HOME}" verbose="true"/>
<echo file="${FLEX_HOME}/air_unzip.sh">#!/bin/sh
tar -xjf "AIR Integration Kit.tbz2"
</echo>
<exec executable="sh" dir="${FLEX_HOME}">
<arg line="${FLEX_HOME}/air_unzip.sh"/>
</exec>
<delete file="${FLEX_HOME}/air_unzip.sh"/>
<delete file="${FLEX_HOME}/AIR Integration Kit.tbz2"/>
<!-- Expand the Win AIK on top of the SDK -->
<unzip src="${FLEX_HOME}/in/air/win/AIR Integration Kit.zip" dest="${FLEX_HOME}"/>
<!-- Delete AIK files that we don't put in the SDK -->
<delete file="${FLEX_HOME}/frameworks/libs/air/AIRAliases.js"/>
<delete file="${FLEX_HOME}/frameworks/libs/air/airglobal.abc"/>
<delete file="${FLEX_HOME}/frameworks/libs/air/servicemonitor.swf"/>
<delete file="${FLEX_HOME}/AIR SDK Readme.txt"/>
<delete dir="${FLEX_HOME}/lib/nai"/>
<!-- Delete AIR files for 3.x support -->
<delete dir="${FLEX_HOME}/frameworks/libs/air/flex3" quiet="true" />
</target>
<!-- Download thirdparty code -->
<target name="thirdparty-downloads"
depends="airsdk-download,playerglobal-download, osmf-download, textLayout-download"
description="Copies third-party software into place for build">
<echo message="Use the thirdparty-clean target to remove these."/>
</target>
<target name="airsdk-check" description="Checks if the Air SDK has been downloaded.">
<available file="${FLEX_HOME}/in/air/mac/AIR Integration Kit.tbz2" property="airsdk.mac.present"/>
<available file="${FLEX_HOME}/in/air/win/AIR Integration Kit.zip" property="airsdk.win.present"/>
</target>
<target name="playerglobal-check" description="Checks if the Adobe Air SDK has been downloaded.">
<available file="${basedir}/libs/player/${playerglobal.version}/playerglobal.swc" property="playerglobal.swc.present"/>
</target>
<target name="osmf-check" description="Checks if the Open Source Media Framework has been downloaded.">
<available file="${basedir}/libs/osmf.swc" property="osmf.swc.present"/>
</target>
<target name="textLayout-check" description="Checks if the Text Layout Framework has been downloaded.">
<available file="${basedir}/libs/textLayout.swc" property="textLayout.swc.present"/>
</target>
<target name="airsdk-download" depends="airsdk-mac-download,airsdk-win-download" />
<!-- Adobe AIR SDK -->
<!-- Because this requires a network connection it is copied only if it doesn't already exist. -->
<!-- ToDo: prepare uses both the mac and win kits. Need to figure out why. -->
<target name="airsdk-mac-download" depends="airsdk-check" unless="airsdk.mac.present" description="Copies Adobe AIR SDK for the Mac from the Adobe website">
<echo message="Be patient. This takes a few minutes..." />
<mkdir dir="${FLEX_HOME}/in/air/mac"/>
<get src="http://airdownload.adobe.com/air/mac/download/3.1/AdobeAIRSDK.tbz2"
dest="${FLEX_HOME}/in/air/mac/AIR Integration Kit.tbz2"
verbose="false"/>
</target>
<target name="airsdk-win-download" depends="airsdk-check" unless="airsdk.win.present" description="Copies Adobe AIR SDK for Windows from the Adobe website">
<echo message="Be patient. This takes a few minutes..." />
<mkdir dir="${FLEX_HOME}/in/air/win"/>
<get src="http://airdownload.adobe.com/air/win/download/3.1/AdobeAIRSDK.zip"
dest="${FLEX_HOME}/in/air/win/AIR Integration Kit.zip"
verbose="false"/>
</target>
<!-- playerglobal.swc -->
<!-- Because this requires a network connection it copies playglobal.swc only if it doesn't already exist. -->
<target name="playerglobal-download" depends="playerglobal-check" unless="playerglobal.swc.present" description="Copies playerglobal.swc from the Adobe website">
<mkdir dir="${basedir}/libs/player/${playerglobal.version}"/>
<get src="http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/playerglobal11_0.swc"
dest="${basedir}/libs/player/${playerglobal.version}/playerglobal.swc"
verbose="false"/>
</target>
<!-- osmf.swc (Version 1.0) -->
<!-- Because this requires a network connection it downloads OSMF only if it doesn't already exist. -->
<!-- The swc at the top-level has lots of trace statements in it. Use the one in the source zip. -->
<target name="osmf-download" depends="osmf-check" unless="osmf.swc.present" description="Copies Text Layout Framework from Sourceforge">
<mkdir dir="${FLEX_HOME}/in/downloads/OSMF_1.0"/>
<get src="http://sourceforge.net/projects/osmf.adobe/files/OSMF%201.0%20%28final%20source%2C%20ASDocs%2C%20PDF%20guides%2C%20and%20release%20notes%29/OSMF_1.0.zip/download"
dest="${FLEX_HOME}/in/downloads/OSMF_1.0.zip"
verbose="false"/>
<unzip dest="${FLEX_HOME}/in/downloads/OSMF_1.0" src="${FLEX_HOME}/in/downloads/OSMF_1.0.zip" />
<unzip dest="${FLEX_HOME}/in/downloads/OSMF_1.0/osmf_source_v1-0" src="${FLEX_HOME}/in/downloads/OSMF_1.0/osmf_source_v1-0.zip" />
<copy file="${FLEX_HOME}/in/downloads/OSMF_1.0/osmf_source_v1-0/OSMF.swc" tofile="${basedir}/libs/osmf.swc"/>
<delete dir="${FLEX_HOME}/in/downloads/OSMF_1.0" failonerror="false"/>
</target>
<!-- textLayout.swc (Version 2.0.232) -->
<!-- Because this requires a network connection it downloads TLF only if it doesn't already exist. -->
<target name="textLayout-download" depends="textLayout-check" unless="textLayout.swc.present" description="Copies Text Layout Framework from Sourceforge">
<mkdir dir="${FLEX_HOME}/in/downloads/textLayout_build"/>
<get src="http://sourceforge.net/projects/tlf.adobe/files/2.0/232/textLayout_build.zip/download"
dest="${FLEX_HOME}/in/downloads/textLayout_build.zip"
verbose="false"/>
<unzip dest="${FLEX_HOME}/in/downloads/textLayout_build" src="${FLEX_HOME}/in/downloads/textLayout_build.zip" />
<copy file="${FLEX_HOME}/in/downloads/textLayout_build/libs/textLayout.swc" todir="${basedir}/libs"/>
<copy todir="${basedir}/projects/textLayout">
<fileset dir="${FLEX_HOME}/in/downloads/textLayout_build">
<include name="**/**"/>
<exclude name="textLayout_build.zip"/>
<exclude name="build.xml"/>
<exclude name="libs/**"/>
</fileset>
</copy>
<delete dir="${FLEX_HOME}/in/downloads/textLayout_build" failonerror="false"/>
</target>
<target name="airframework" description="Clean build of airframework.swc">
<ant dir="${basedir}/projects/airframework"/>
</target>
<target name="airspark" description="Clean build of airspark.swc">
<ant dir="${basedir}/projects/airspark"/>
</target>
<target name="mobilecomponents" description="Clean build of mobilecomponents.swc">
<ant dir="${basedir}/projects/mobilecomponents"/>
</target>
<target name="mobiletheme" description="Clean build of mobile.swc">
<ant dir="${basedir}/projects/mobiletheme"/>
</target>
<target name="charts" description="Clean build of charts.swc">
<ant dir="${basedir}/projects/charts"/>
</target>
<target name="advancedgrids" description="Clean build of advancedgrids.swc">
<ant dir="${basedir}/projects/advancedgrids"/>
</target>
<target name="core" description="Clean build of core.swc">
<ant dir="${basedir}/projects/core"/>
</target>
<target name="framework" description="Clean build of framework.swc and its resource bundles">
<ant dir="${basedir}/projects/framework"/>
</target>
<target name="halo" description="Clean build of halo.swc">
<ant dir="${basedir}/projects/halo"/>
</target>
<target name="mx" description="Clean build of mx.swc and its resource bundles">
<ant dir="${basedir}/projects/mx"/>
</target>
<target name="spark" description="Clean build of spark.swc">
<ant dir="${basedir}/projects/spark"/>
</target>
<target name="sparkskins" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/sparkskins"/>
</target>
<target name="spark_dmv" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/spark_dmv"/>
</target>
<target name="wireframe" description="Clean build of wireframe.swc">
<ant dir="${basedir}/projects/wireframe"/>
</target>
<target name="flash_integration" description="Clean build of FlexComponentBase.swc">
<ant dir="${basedir}/projects/flash-integration"/>
</target>
<target name="osmf" description="Clean build of osmf.swc">
<ant dir="${basedir}/projects/osmf"/>
</target>
<target name="rpc" description="Clean build of rpc.swc">
<ant dir="${basedir}/projects/rpc"/>
</target>
<!-- For debugging only. For release, we distribute the swc built by the TLF team. -->
<target name="tlf" description="Clean build of textLayout.swc">
<ant dir="${basedir}/projects/textLayout"/>
</target>
<target name="authoringsupport" description="Clean build of authoringsupport.swc">
<ant dir="${basedir}/projects/authoringsupport"/>
</target>
<target name="javascript" description="Clean build of javascript examples">
<ant dir="${basedir}/javascript"/>
</target>
<target name="automation" description="Clean build of automation swc">
<ant dir="${basedir}/projects/automation"/>
</target>
<target name="automation_air" description="Clean build of automation_air swc">
<ant dir="${basedir}/projects/automation_air"/>
</target>
<target name="automation_dmv" description="Clean build of automation_dmv swc">
<ant dir="${basedir}/projects/automation_dmv"/>
</target>
<target name="automation_flashflexkit" description="Clean build of automation_flashflexkit swc">
<ant dir="${basedir}/projects/automation_flashflexkit"/>
</target>
<target name="automation_spark" description="Clean build of automation_spark swc">
<ant dir="${basedir}/projects/automation_spark"/>
</target>
<target name="automation_airspark" description="Clean build of automation_airspark swc">
<ant dir="${basedir}/projects/automation_airspark"/>
</target>
<!--
<target name="updateAIR" description="Rebuild a AIK SWC and SWF that depend on Flex" >
<property name="flex.home" value="${FLEX_HOME}" />
<delete dir="${basedir}/projects/air/build" quiet="true" />
<ant dir="${basedir}/projects/air" antfile="sample-frameworks-build.xml" target="application_updater.application_updater_ui" />
<copy todir="${basedir}/libs/air">
<fileset dir="${basedir}/projects/air/build/results">
<include name="applicationupdater_ui.swc"/>
<include name="applicationupdater_ui.swf"/>
</fileset>
</copy>
<delete dir="${basedir}/projects/air/build" quiet="true" />
</target>
-->
</project>