Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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="build_example" basedir=".">
- <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
- <and>
- <not>
- <isset property="GOOG_HOME" />
- </not>
- <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
- </and>
- </condition>
- <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
- <and>
- <not>
- <isset property="GOOG_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
- </and>
- </condition>
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
- <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="env GOOG_HOME: ${env.GOOG_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <property name="theme_arg" value="-define=CONFIG::theme,false" />
- <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
- <property name="lib_arg" value="-define=CONFIG::extlib,false" />
- <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
- <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
- <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
- fork="true">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug=true" />
- <arg value="${theme_arg}" />
- <arg value="-compiler.mxml.children-as-data" />
- <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
- <arg value="+playerglobal.version=${playerglobal.version}" />
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
- <arg value="${extlib_arg}" />
- <arg value="${lib_arg}"/>
- <arg value="${opt1_arg}" />
- <arg value="${opt2_arg}" />
- <arg value="-js-output-type=FLEXJS" />
- <arg value="-closure-lib=${GOOG_HOME}" />
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
- <arg value="${basedir}/src/${example}.mxml" />
- </java>
- <fail>
- <condition>
- <not>
- <or>
- <equals arg1="${errorCode}" arg2="0" />
- <equals arg1="${errorCode}" arg2="2" />
- </or>
- </not>
- </condition>
- </fail>
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment