You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/07/31 14:17:29 UTC
[2/4] git commit: [flex-asjs] [refs/heads/VF2JS] - Added VF2JS
support to 'build_example.xml'.
Added VF2JS support to 'build_example.xml'.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0e7641f5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0e7641f5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0e7641f5
Branch: refs/heads/VF2JS
Commit: 0e7641f5f8b9d8f8e80b8ee0e1f34616cd3f8df1
Parents: 3e78e62
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Jul 31 09:45:21 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Jul 31 14:17:18 2014 +0200
----------------------------------------------------------------------
examples/build_example.xml | 67 ++++++++++++
examples/vf2js_DatabindingTest/build.xml | 146 +++-----------------------
examples/vf2js_SimpleTest/build.xml | 146 +++-----------------------
3 files changed, 97 insertions(+), 262 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e7641f5/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
index aeb05b8..a3a5c2b 100644
--- a/examples/build_example.xml
+++ b/examples/build_example.xml
@@ -75,6 +75,41 @@
</copy>
</target>
+ <target name="compile_vf2js" description="Compiles ${example} (VF2JS style)">
+ <echo message="Compiling ${example}.swf"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+
+ <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+
+ <mxmlc fork="true"
+ file="${basedir}/src/${example}.mxml"
+ output="${basedir}/bin-debug/${example}.swf">
+ <jvmarg line="${mxmlc.jvm.args}"/>
+ <arg value="+flexlib=${basedir}/frameworks" />
+ <arg value="-debug" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+ </mxmlc>
+
+ <!-- html-wrapper
+ height="300"
+ width="400"
+ bgcolor="#ffffff"
+ name="${example}"
+ versionmajor="11"
+ versionminor="1"
+ versionrevision="0"
+ output="${basedir}/bin-debug"/ -->
+
+ <copy todir="${basedir}/bin-debug">
+ <fileset dir="${basedir}/src">
+ <include name="*.png" />
+ <include name="*.jpg" />
+ </fileset>
+ </copy>
+ </target>
+
<target name="compileair" description="Compiles ${example}">
<echo message="Compiling ${example}.swf"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
@@ -206,6 +241,38 @@
</fail>
</target>
+ <target name="compilejs_vf2js" description="Cross-compiles ${example} (VF2JS style)">
+ <echo message="Compiling ${example}.js"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FLEXJS_HOME: ${FLEXJS_HOME}"/>
+ <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+ <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+
+ <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+ fork="true">
+ <jvmarg line="${mxmlc.jvm.args}"/>
+ <jvmarg line="-Dflexlib=${FLEX_HOME}/frameworks}"/>
+ <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+ <arg value="-js-output-type=VF2JS" />
+ <arg value="-closure-lib=${GOOG_HOME}" />
+ <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/VF2JS/src" />
+ <arg value="-output=${basedir}" />
+ <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>
+
<target name="compilejsair" description="Cross-compiles ${example}">
<echo message="Compiling ${example}.js"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e7641f5/examples/vf2js_DatabindingTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/vf2js_DatabindingTest/build.xml b/examples/vf2js_DatabindingTest/build.xml
index e14925f..cea6c04 100644
--- a/examples/vf2js_DatabindingTest/build.xml
+++ b/examples/vf2js_DatabindingTest/build.xml
@@ -19,143 +19,27 @@
-->
<project name="vf2js_databindingtest" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../.."/>
- <property name="example" value="vf2js_DataBindingTest"/>
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <!-- property name="FLEX_HOME" value="${FLEXJS_HOME}" / -->
- <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
- <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
- <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
- <property name="GOOG_HOME" value="${env.GOOG_HOME}"/>
+ <property name="example" value="vf2js_DataBindingTest" />
- <!-- target name="main" depends="clean,compile,compilejs" description="Clean build of ${example}" / -->
- <target name="main" depends="clean,compile" description="Clean build of ${example}"/>
+ <property environment="env" />
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
+ <property name="FLEXJS_HOME" location="../.." />
+ <property file="${FLEXJS_HOME}/env.properties" />
+ <property file="${FLEXJS_HOME}/build.properties" />
- <target name="compile" description="Compiles ${example}">
- <echo message="Compiling ${example}.swf"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
- <mxmlc fork="true" file="${basedir}/src/${example}.mxml" output="${basedir}/bin-debug/${example}.swf">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <arg value="+playerglobal.version=${playerglobal.version}"/>
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
- </mxmlc>
- <html-wrapper height="300" width="400" bgcolor="#ffffff" name="${example}" versionmajor="11" versionminor="1" versionrevision="0" output="${basedir}/bin-debug"/>
- <copy todir="${basedir}/bin-debug">
- <fileset dir="${basedir}/src">
- <include name="*.png"/>
- <include name="*.jpg"/>
- </fileset>
- </copy>
- </target>
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
+ <property name="FALCON_HOME" value="${env.FALCON_HOME}" />
+ <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
+ <property name="GOOG_HOME" value="${env.GOOG_HOME}" />
+
+ <include file="${basedir}/../build_example.xml"/>
- <!-- target name="compilejs" description="Cross-compiles ${example}">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <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"/>
- <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="+playerglobal.version=${playerglobal.version}"/>
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
- <arg value="-js-output-type=FLEXJS"/>
- <arg value="-closure-lib=${GOOG_HOME}"/>
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src"/>
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs"/>
- <arg value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src/jquery_externals.js"/>
- <arg value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src/createjs_externals.js"/>
- <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 -->
+ <target name="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js" description="Clean build of ${example}" />
<target name="clean">
- <delete dir="${basedir}/bin" failonerror="false"/>
- <delete dir="${basedir}/bin-debug" failonerror="false"/>
- <delete dir="${basedir}/bin-release" failonerror="false"/>
+ <delete dir="${basedir}/bin" failonerror="false" />
+ <delete dir="${basedir}/bin-debug" failonerror="false" />
+ <delete dir="${basedir}/bin-release" failonerror="false" />
</target>
- <macrodef name="html-wrapper">
- <attribute name="width"/>
- <attribute name="height"/>
- <attribute name="bgcolor"/>
- <attribute name="name"/>
- <attribute name="versionmajor"/>
- <attribute name="versionminor"/>
- <attribute name="versionrevision"/>
- <attribute name="output"/>
- <sequential>
- <copy toFile="@{output}/@{name}.html" file="${FLEXJS_HOME}/templates/swfobject/index.template.html"/>
- <copy toDir="@{output}/history">
- <fileset dir="${FLEXJS_HOME}/templates/swfobject/history">
- <include name="**"/>
- </fileset>
- </copy>
- <copy toDir="@{output}">
- <fileset dir="${FLEXJS_HOME}/templates/swfobject">
- <include name="*"/>
- <exclude name="index.template.html"/>
- </fileset>
- </copy>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${title}" value="@{name}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${bgcolor}" value="@{bgcolor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${useBrowserHistory}" value="--"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_major}" value="@{versionmajor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_minor}" value="@{versionminor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_revision}" value="@{versionrevision}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${expressInstallSwf}" value="expressInstall.swf"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${expressInstallSwf}" value="expressInstall.swf"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${width}" value="@{width}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${height}" value="@{height}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${application}" value="@{name}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${swf}" value="@{name}"/>
- </replace>
- </sequential>
- </macrodef>
-
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e7641f5/examples/vf2js_SimpleTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/vf2js_SimpleTest/build.xml b/examples/vf2js_SimpleTest/build.xml
index b317aa7..f52c984 100644
--- a/examples/vf2js_SimpleTest/build.xml
+++ b/examples/vf2js_SimpleTest/build.xml
@@ -19,143 +19,27 @@
-->
<project name="vf2js_simpletest" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../.."/>
- <property name="example" value="vf2js_SimpleTest"/>
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <!-- property name="FLEX_HOME" value="${FLEXJS_HOME}" / -->
- <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
- <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
- <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
- <property name="GOOG_HOME" value="${env.GOOG_HOME}"/>
+ <property name="example" value="vf2js_SimpleTest" />
- <!-- target name="main" depends="clean,compile,compilejs" description="Clean build of ${example}" / -->
- <target name="main" depends="clean,compile" description="Clean build of ${example}"/>
+ <property environment="env" />
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
+ <property name="FLEXJS_HOME" location="../.." />
+ <property file="${FLEXJS_HOME}/env.properties" />
+ <property file="${FLEXJS_HOME}/build.properties" />
- <target name="compile" description="Compiles ${example}">
- <echo message="Compiling ${example}.swf"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
- <mxmlc fork="true" file="${basedir}/src/${example}.mxml" output="${basedir}/bin-debug/${example}.swf">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <arg value="+playerglobal.version=${playerglobal.version}"/>
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
- </mxmlc>
- <html-wrapper height="300" width="400" bgcolor="#ffffff" name="${example}" versionmajor="11" versionminor="1" versionrevision="0" output="${basedir}/bin-debug"/>
- <copy todir="${basedir}/bin-debug">
- <fileset dir="${basedir}/src">
- <include name="*.png"/>
- <include name="*.jpg"/>
- </fileset>
- </copy>
- </target>
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
+ <property name="FALCON_HOME" value="${env.FALCON_HOME}" />
+ <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
+ <property name="GOOG_HOME" value="${env.GOOG_HOME}" />
+
+ <include file="${basedir}/../build_example.xml"/>
- <!-- target name="compilejs" description="Cross-compiles ${example}">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <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"/>
- <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="+playerglobal.version=${playerglobal.version}"/>
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
- <arg value="-js-output-type=FLEXJS"/>
- <arg value="-closure-lib=${GOOG_HOME}"/>
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src"/>
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs"/>
- <arg value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src/jquery_externals.js"/>
- <arg value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/src/createjs_externals.js"/>
- <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 -->
+ <target name="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js" description="Clean build of ${example}" />
<target name="clean">
- <delete dir="${basedir}/bin" failonerror="false"/>
- <delete dir="${basedir}/bin-debug" failonerror="false"/>
- <delete dir="${basedir}/bin-release" failonerror="false"/>
+ <delete dir="${basedir}/bin" failonerror="false" />
+ <delete dir="${basedir}/bin-debug" failonerror="false" />
+ <delete dir="${basedir}/bin-release" failonerror="false" />
</target>
- <macrodef name="html-wrapper">
- <attribute name="width"/>
- <attribute name="height"/>
- <attribute name="bgcolor"/>
- <attribute name="name"/>
- <attribute name="versionmajor"/>
- <attribute name="versionminor"/>
- <attribute name="versionrevision"/>
- <attribute name="output"/>
- <sequential>
- <copy toFile="@{output}/@{name}.html" file="${FLEXJS_HOME}/templates/swfobject/index.template.html"/>
- <copy toDir="@{output}/history">
- <fileset dir="${FLEXJS_HOME}/templates/swfobject/history">
- <include name="**"/>
- </fileset>
- </copy>
- <copy toDir="@{output}">
- <fileset dir="${FLEXJS_HOME}/templates/swfobject">
- <include name="*"/>
- <exclude name="index.template.html"/>
- </fileset>
- </copy>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${title}" value="@{name}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${bgcolor}" value="@{bgcolor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${useBrowserHistory}" value="--"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_major}" value="@{versionmajor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_minor}" value="@{versionminor}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${version_revision}" value="@{versionrevision}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${expressInstallSwf}" value="expressInstall.swf"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${expressInstallSwf}" value="expressInstall.swf"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${width}" value="@{width}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${height}" value="@{height}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${application}" value="@{name}"/>
- </replace>
- <replace file="@{output}/@{name}.html">
- <replacefilter token="$${swf}" value="@{name}"/>
- </replace>
- </sequential>
- </macrodef>
-
</project>