| <?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="mobiletheme" default="main" basedir="."> |
| |
| <property name="FLEX_HOME" location="${basedir}/../../.."/> |
| |
| <property file="${FLEX_HOME}/env.properties"/> |
| <property environment="env"/> |
| <property file="${FLEX_HOME}/build.properties"/> |
| |
| <condition property="isMac"> |
| <os family="mac"/> |
| </condition> |
| <condition property="isWindows"> |
| <os family="windows" /> |
| </condition> |
| <condition property="isLinux"> |
| <and> |
| <os family="unix"/> |
| <not> |
| <os family="mac"/> |
| </not> |
| </and> |
| </condition> |
| |
| <target name="main" depends="clean,compile" description="Clean build of mobile.swc"/> |
| |
| <target name="clean"> |
| <delete failonerror="false"> |
| <fileset file="${basedir}/bundles.properties"/> |
| <fileset dir="${FLEX_HOME}/frameworks/themes/Mobile"> |
| <include name="mobile.swc"/> |
| <include name="mobile.swc.incr"/> |
| </fileset> |
| </delete> |
| </target> |
| |
| <target name="configModLinux" description="Modifies which config file to use" if="isLinux"> |
| <property name="configMod" value="AIR2"/> |
| </target> |
| |
| <target name="configModOther" description="Modifies which config file to use" unless="isLinux"> |
| <property name="configMod" value=""/> |
| </target> |
| |
| <target name="compile" description="Compiles mobile.swc" depends="configModLinux,configModOther"> |
| <echo message="Compiling frameworks/themes/Mobile/mobile.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"/> |
| <!-- |
| This project builds a theme SWC containing skin classes. |
| It has no MXML tags and therefore no manifest. |
| Link in the classes (and their dependencies) |
| listed in MobileThemeClasses.as. |
| Compile against framework.swc, but don't link it into mobile.swc. |
| Link in accessibility support. |
| Include various CSS and asset files in the SWC. |
| Don't put any resources into the SWC. (The classes don't require any.) |
| 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/themes/Mobile/mobile.swc"> |
| <jvmarg line="${compc.jvm.args}"/> |
| <load-config filename="compile-config${configMod}.xml" /> |
| <arg value="+playerglobal.version=${playerglobal.version}" /> |
| <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" /> |
| </compc> |
| </target> |
| |
| <target name="doc" depends="clean-temp-docs" description="updates mobile.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"/> |
| <doc-classes class="MobileThemeClasses"/> |
| <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="spark.swc" /> |
| </external-library-path> |
| <external-library-path dir="${FLEX_HOME}/frameworks/libs/mobile"> |
| <include name="mobilecomponents.swc" /> |
| </external-library-path> |
| <jvmarg line="${asdoc.jvm.args}"/> |
| </asdoc> |
| |
| <!-- updates mobile.swc with asdoc xml --> |
| <zip destfile="${FLEX_HOME}/frameworks/themes/Mobile/mobile.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> |