flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [08/10] git commit: [flex-asjs] [refs/heads/develop] - Updated and refactored build files.
Date Wed, 06 Aug 2014 11:24:52 GMT
Updated and refactored build files.

Signed-off-by: Erik de Bruin <erik@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/abcec378
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/abcec378
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/abcec378

Branch: refs/heads/develop
Commit: abcec378bb36ff67167ff052abc70810ecbc282c
Parents: 53f9a97
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Wed Aug 6 13:22:35 2014 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Wed Aug 6 13:22:35 2014 +0200

----------------------------------------------------------------------
 vf2js/build.xml                                 | 103 +++++++-----
 vf2js/examples/build_example.xml                | 163 +++++--------------
 vf2js/examples/vf2js_DatabindingTest/build.xml  |  14 +-
 vf2js/examples/vf2js_SimpleTest/build.xml       |  11 --
 vf2js/frameworks/as/build.properties            |  27 ---
 vf2js/frameworks/as/build.xml                   |   8 +-
 vf2js/frameworks/as/projects/vf2js_mx/build.xml |  71 ++++----
 .../as/projects/vf2js_mx/compile-config.xml     |   2 +-
 vf2js/frameworks/as/projects/vf2js_s/build.xml  |  73 +++++----
 .../as/projects/vf2js_s/compile-config.xml      |   2 +-
 10 files changed, 182 insertions(+), 292 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/build.xml b/vf2js/build.xml
index a63b75e..45e50e1 100644
--- a/vf2js/build.xml
+++ b/vf2js/build.xml
@@ -18,24 +18,16 @@
 
 -->
 <project name="vf2js" default="main" basedir=".">
-  <!--
-    - release:
-      - source
-        - examples
-        - frameworks
-          - as scripts
-          - as/projects
-          - js/src/*
-        - ide
-        - js/vf2js/falconjx/bin
-      - binary
-        - 
-    - overlay:
-      - 
-  -->
-    
+
+  <property environment="env" />
+
   <property name="flex.sdk.loc" value="${basedir}/../../flex-sdk" />
 
+  <property name="antlr.version" value="3.5.2" />
+  <property name="closure.compiler.version" value="20140625" />
+  <property name="commons-io.version" value="2.4" />
+  <property name="falconjx.version" value="0.0.2" />
+
   <!-- ==
     Setup
   === -->
@@ -56,7 +48,7 @@
 
   <target name="build.release" depends="" description="Build release artefacts" />
 
-  <target name="download.deps" depends="overlay.falconjx" description="Download VF2JS
dependencies" />
+  <target name="download.deps" depends="falconjx.overlay" description="Download VF2JS
dependencies" />
 
   <target name="install" depends="main,clean.sdk,overlay.sdk,build.examples" description="Overlay
VF2JS on chosen (-Dflex.sdk.loc) directory" />
 
@@ -77,8 +69,9 @@
   <target name="build.examples" depends="" description="Build VF2JS examples in newly
overlayed Flex SDK">
     <ant dir="${flex.sdk.loc}/examples/vf2js">
       <property name="FLEX_HOME" value="${flex.sdk.loc}" />
-      <property name="FALCONJX_HOME" value="${flex.sdk.loc}/js/vf2js/falconjx" />
       <property name="GOOG_HOME" value="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-library"
/>
+      <property name="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}" />
+      <property name="playerglobal.version" value="14.0" />
     </ant>
   </target>
 
@@ -106,8 +99,7 @@
       <fileset dir="${basedir}/ide/flashbuilder/launch" />
     </copy>
     <replace file="${flex.sdk.loc}/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch">
-        <replacefilter token="$MXMLC" value="mxmlc"/>
-        <replacefilter token="$FLEX_HOME" value="${flex.sdk.loc}"/>
+        <replacefilter token="$flex_sdk_loc" value="${flex.sdk.loc}" />
     </replace>
   </target>
 
@@ -115,40 +107,63 @@
     <ant dir="${basedir}/frameworks/as" target="copy.to.sdk" />
   </target>
 
-  <target name="download.falconjx" depends="" description="Download FalconJX nightly binary">
-    <!-- apache-flex-falconjx-0.0.2-bin.tar.gz -->
+  <target name="falconjx.build" depends="" description="Build FalconJX dependencies">
+    <!-- Closure Compiler -->
+    <ant dir="${basedir}/in/closure-compiler-${closure.compiler.version}" inheritAll="false"
/>
   </target>
 
-  <target name="overlay.falconjx" depends="download.falconjx,unzip.falconjx" description="Overlay
FalconJX artefacts on Flex SDK">
-    <!-- Falcon -->
-    <copy todir="${flex.sdk.loc}/js/vf2js/lib" overwrite="true">
-      <fileset file="${basedir}/in/apache-flex-falconjx-0.0.2-bin/compiler/generated/dist/sdk/lib/compiler.jar"
/>
-    </copy>
+  <target name="falconjx.download" depends="" description="Download FalconJX nightly binary
and dependencies">
+    <mkdir dir="${basedir}/in" />
+    <!-- Antlr -->
+    <get src="http://search.maven.org/remotecontent?filepath=org/antlr/antlr-complete/${antlr.version}/antlr-complete-${antlr.version}.jar"
dest="${basedir}/in/antlr-complete-${antlr.version}.jar" />
+    <!-- Closure Compiler -->
+    <get src="https://codeload.github.com/google/closure-compiler/zip/v${closure.compiler.version}"
dest="${basedir}/in/closure-compiler-${closure.compiler.version}.zip" />
+    <!-- Closure Library -->
+    <exec executable="git" failifexecutionfails="true">
+      <arg value="clone" />
+      <arg value="https://github.com/google/closure-library" />
+      <arg value="${basedir}/in/closure-library" />
+    </exec>
+    <!-- Commons-IO -->
+    <get src="http://archive.apache.org/dist/commons/io/binaries/commons-io-${commons-io.version}-bin.tar.gz"
dest="${basedir}/in/commons-io-${commons-io.version}-bin.tar.gz" />
     <!-- FalconJX -->
-    <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib" overwrite="true">
-      <fileset file="${basedir}/in/apache-flex-falconjx-0.0.2-bin/js/lib/jsc.jar" />
-      <fileset file="${basedir}/in/apache-flex-falconjx-0.0.2-bin/js/lib/mxmlc.jar" />
-    </copy>
+    <get src="http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-${falconjx.version}-bin.zip"
dest="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin.zip" />
+  </target>
+
+  <target name="falconjx.overlay" depends="falconjx.download,falconjx.unzip,falconjx.build"
description="Overlay FalconJX artefacts on Flex SDK">
     <!-- Antlr -->
     <copy tofile="${flex.sdk.loc}/js/vf2js/lib/external/antlr.jar" overwrite="true">
-      <fileset file="${basedir}/in/antlr.jar" />
-    </copy>
-    <!-- Commons-IO -->
-    <copy tofile="${flex.sdk.loc}/js/vf2js/falconjx/lib/commons-io.jar" overwrite="true">
-      <fileset file="${basedir}/in/commons-io-2.4/commons-io-2.4.jar" />
+      <fileset file="${basedir}/in/antlr-complete-${antlr.version}.jar" />
     </copy>
     <!-- Closure Compiler -->
-    <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-compiler" overwrite="true">
-      <fileset dir="${basedir}/in/closure-compiler" />
+    <copy toDir="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-compiler" verbose="true">
+      <fileset file="${basedir}/in/closure-compiler-${closure.compiler.version}/build/compiler.jar"
/>
     </copy>
     <!-- Closure Library -->
     <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-library" overwrite="true">
       <fileset dir="${basedir}/in/closure-library" />
     </copy>
+    <!-- Commons-IO -->
+    <copy tofile="${flex.sdk.loc}/js/vf2js/falconjx/lib/commons-io.jar" overwrite="true">
+      <fileset file="${basedir}/in/commons-io-${commons-io.version}/commons-io-${commons-io.version}.jar"
/>
+    </copy>
+    <!-- FalconJX -->
+    <copy todir="${flex.sdk.loc}/js/vf2js/lib" overwrite="true">
+      <fileset file="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin/compiler/generated/dist/sdk/lib/compiler.jar"
/>
+    </copy>
+    <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib" overwrite="true">
+      <fileset file="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin/js/lib/jsc.jar"
/>
+      <fileset file="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin/js/lib/mxmlc.jar"
/>
+    </copy>
   </target>
 
-  <target name="unzip.falconjx" depends="" description="Unzip FalconJX artefact">
-    
+  <target name="falconjx.unzip" depends="" description="Unzip FalconJX artefacts and dependencies">
+    <!-- Closure Compiler -->
+    <unzip src="${basedir}/in/closure-compiler-${closure.compiler.version}.zip" dest="${basedir}/in"
/>
+    <!-- Commons-IO -->
+    <untar src="${basedir}/in/commons-io-${commons-io.version}-bin.tar.gz" dest="${basedir}/in"
compression="gzip" />
+    <!-- FalconJX -->
+    <unzip src="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin.zip" dest="${basedir}/in/apache-flex-falconjx-${falconjx.version}-bin"
/>
   </target>
 
 
@@ -158,7 +173,9 @@
   ============= -->
 
   <target name="clean" depends="" description="Cleans all possible 'garbage'">
-    <ant dir="${basedir}/frameworks/as" target="clean"/>
+    <delete dir="${basedir}/in" />
+
+    <ant dir="${basedir}/frameworks/as" target="clean" />
   </target>
 
   <target name="clean.sdk" depends="" description="Cleans previous VF2JS overlay">
@@ -173,10 +190,10 @@
     </delete>
   </target>
 
-  <target name="chmod" unless="isWindows" description="Make mxmlc script executable">
+  <target name="chmod" unless="isWindows" description="Make mxmlc script executable on
*nix">
       <exec executable="chmod" dir="${flex.sdk.loc}">
           <arg value="+x" />
-          <arg value="${flex.sdk.loc}/js/vf2js/falconjx/bin/mxmlc"/>
+          <arg value="${flex.sdk.loc}/js/vf2js/falconjx/bin/mxmlc" />
       </exec>
   </target>
   

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/vf2js/examples/build_example.xml b/vf2js/examples/build_example.xml
index 31051c4..6c1325a 100644
--- a/vf2js/examples/build_example.xml
+++ b/vf2js/examples/build_example.xml
@@ -19,149 +19,68 @@
 -->
 <project name="build_example" basedir=".">
 
-  <property name="FLEXJS_HOME" location="../.."/>
+  <property environment="env" />
+  <property name="FLEX_HOME" value="${env.FLEX_HOME}" /> <!-- must exist for compc
task -->
+  <property name="GOOG_HOME" value="${env.GOOG_HOME}" />
+  <property name="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}" />
+  <property name="playerglobal.version" value="14.0" />
 
-  <condition property="local.d32" value="-d32">
-      <and>
-          <os family="mac"/>
-          <matches pattern="1.6.*" string="${java.version}"/>
-          <equals arg1="${sun.arch.data.model}" arg2="64"/>
-          <equals arg1="${os.arch}" arg2="x86_64"/>
-      </and>
-  </condition>
-
-  <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>  
+  <property name="falconjx.home" value="${FLEX_HOME}/js/vf2js/falconjx" />
 
-  <property file="${FLEXJS_HOME}/env.properties"/>
-  <property environment="env"/>
-  <property file="${FLEXJS_HOME}/build.properties"/>
+  <property name="" location="" />
 
   <path id="lib.path">
-    <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+    <fileset dir="${FLEX_HOME}/ant/lib" includes="flexTasks.jar" />
   </path>
 
+  <condition property="local.d32" value="-d32" else="">
+      <and>
+          <os family="mac" />
+          <matches pattern="1.6.*" string="${java.version}" />
+          <equals arg1="${sun.arch.data.model}" arg2="64" />
+          <equals arg1="${os.arch}" arg2="x86_64" />
+      </and>
+  </condition>
+
   <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"/>
+    <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="+flexlib=${basedir}/frameworks"/>
-      <arg value="-debug"/>
-      <arg value="+playerglobal.version=${playerglobal.version}"/>
-      <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
+      <jvmarg line="${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true" />
+      <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+      <arg value="-debug" />
+      <arg value="+playerglobal.version=${playerglobal.version}" />
+      <arg value="+env.PLAYERGLOBAL_HOME=${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="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}"/>
-      <arg value="+playerglobal.version=${playerglobal.version}"/>
-      <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
-      <arg value="-load-config=${FLEX_HOME}/frameworks/flex-config.xml"/>
-      <arg value="-js-output-type=VF2JS"/>
-      <arg value="-closure-lib=${GOOG_HOME}"/>
-      <arg value="-sdk-js-lib=${FLEXJS_HOME}/vf2js/frameworks/js/src"/>
-      <arg value="-output=${basedir}"/>
-      <arg value="${basedir}/src/${example}.mxml"/>
+    <echo message="Compiling ${example}.js" />
+    <echo message="falconjx.home: ${falconjx.home}" />
+    <echo message="FLEX_HOME: ${FLEX_HOME}" />
+    <echo message="GOOG_HOME: ${GOOG_HOME}" />
+    <java jar="${falconjx.home}/lib/mxmlc.jar" resultProperty="errorCode" fork="true">
+      <jvmarg line="${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true" />
+      <arg value="+playerglobal.version=${playerglobal.version}" />
+      <arg value="+env.PLAYERGLOBAL_HOME=${PLAYERGLOBAL_HOME}" />
+      <arg value="-load-config=${FLEX_HOME}/frameworks/flex-config.xml" />
+      <arg value="-js-output-type=VF2JS" />
+      <arg value="-closure-lib=${GOOG_HOME}" />
+      <arg value="-sdk-js-lib=${FLEX_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"/>
+            <equals arg1="${errorCode}" arg2="0" />
+            <equals arg1="${errorCode}" arg2="2" />
           </or>
         </not>
       </condition>
     </fail>
   </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/abcec378/vf2js/examples/vf2js_DatabindingTest/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/examples/vf2js_DatabindingTest/build.xml b/vf2js/examples/vf2js_DatabindingTest/build.xml
index 022f8ff..75f60cc 100644
--- a/vf2js/examples/vf2js_DatabindingTest/build.xml
+++ b/vf2js/examples/vf2js_DatabindingTest/build.xml
@@ -21,20 +21,10 @@
 
   <property name="example" value="vf2js_DataBindingTest" />
 
-  <property environment="env" />
-
-  <property name="FLEXJS_HOME" location="../../.." />
-  <property file="${FLEXJS_HOME}/env.properties" />
-  <property file="${FLEXJS_HOME}/build.properties" />
-
-  <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="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js"
description="Clean build of ${example}" />
+  <!-- target name="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js"
description="Clean build of ${example}" / -->
+  <target name="main" depends="clean,build_example.compile_vf2js" description="Clean build
of ${example}" />
 
   <target name="clean">
     <delete dir="${basedir}/bin" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/examples/vf2js_SimpleTest/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/examples/vf2js_SimpleTest/build.xml b/vf2js/examples/vf2js_SimpleTest/build.xml
index 432d310..bbd979e 100644
--- a/vf2js/examples/vf2js_SimpleTest/build.xml
+++ b/vf2js/examples/vf2js_SimpleTest/build.xml
@@ -21,17 +21,6 @@
 
   <property name="example" value="vf2js_SimpleTest" />
 
-  <property environment="env" />
-
-  <property name="FLEXJS_HOME" location="../../.." />
-  <property file="${FLEXJS_HOME}/env.properties" />
-  <property file="${FLEXJS_HOME}/build.properties" />
-
-  <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="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js"
description="Clean build of ${example}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/build.properties
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/build.properties b/vf2js/frameworks/as/build.properties
deleted file mode 100644
index 222c87c..0000000
--- a/vf2js/frameworks/as/build.properties
+++ /dev/null
@@ -1,27 +0,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.
-##
-################################################################################
-
-# Flash player version for which player global swc to use
-playerglobal.version=14.0
-
-# JVM options for <compc> and <mxmlc> tasks
-#   -Xms64m: start out with a 64 MB heap
-#   -Xmx384m: allow the heap to grow to 384 MB
-#   -ea: enable Java assertions
-jvm.args=-Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/build.xml b/vf2js/frameworks/as/build.xml
index b6a6869..e45d69d 100644
--- a/vf2js/frameworks/as/build.xml
+++ b/vf2js/frameworks/as/build.xml
@@ -19,7 +19,7 @@
 -->
 <project name="vf2js-frameworks-as" default="main" basedir=".">
 
-  <property environment="env"/>
+  <property name="flex.sdk.loc" value="${basedir}/.." />
 
   <target name="main" depends="clean,compile" description="Clean build of all SWCs" />
 
@@ -43,9 +43,9 @@
     <ant dir="${basedir}/projects/vf2js_s" />
   </target>
 
-  <target name="copy-to-sdk" description="Copy SWCs to SDK">
-    <copy todir="${env.FLEX_HOME}/frameworks/libs">
-      <fileset dir="${env.VF2JS_HOME}/frameworks/as/libs" />
+  <target name="copy.to.sdk" description="Copy SWCs to SDK">
+    <copy todir="${flex.sdk.loc}/frameworks/libs">
+      <fileset dir="./libs" />
     </copy>
   </target>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/projects/vf2js_mx/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/projects/vf2js_mx/build.xml b/vf2js/frameworks/as/projects/vf2js_mx/build.xml
index 897b527..c50a59f 100644
--- a/vf2js/frameworks/as/projects/vf2js_mx/build.xml
+++ b/vf2js/frameworks/as/projects/vf2js_mx/build.xml
@@ -17,48 +17,49 @@
   limitations under the License.
 
 -->
-
-
 <project name="vf2js_mx" default="main" basedir=".">
-    
-    <property file="../../build.properties"/>
 
-    <property environment="env"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
-    <property name="VF2JS_HOME" location="${env.VF2JS_HOME}"/>
+  <property environment="env" />
+  <property name="FLEX_HOME" value="${env.FLEX_HOME}" /> <!-- must exist for compc
task -->
+  <property name="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}" />
+  <property name="playerglobal.version" value="14.0" />
 
-    <target name="main" depends="clean,compile" description="Clean build of vf2js_mx.swc">
-    </target>
+  <property name="vf2js.home" location="${basedir}/../../../.." />
 
-    <target name="clean">
-        <delete failonerror="false">
-            <fileset dir="${VF2JS_HOME}/frameworks/as/libs">
-                <include name="vf2js_mx.swc"/>
-            </fileset>
-        </delete>
-    </target>
-    
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+  <target name="main" depends="clean,compile" description="Clean build of vf2js_mx.swc"
/>
 
-    <target name="compile" description="Compiles vf2js_mx.swc">
-        <echo message="Compiling '${VF2JS_HOME}/frameworks/as/libs/vf2js_mx.swc'"/>
+  <path id="lib.path">
+    <fileset dir="${FLEX_HOME}/ant/lib" includes="flexTasks.jar" />
+  </path>
 
-        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        <echo message="VF2JS_HOME: ${VF2JS_HOME}"/>
+  <condition property="local.d32" value="-d32" else="">
+    <and>
+      <os family="mac" />
+      <matches pattern="1.6.*" string="${java.version}" />
+      <equals arg1="${sun.arch.data.model}" arg2="64" />
+      <equals arg1="${os.arch}" arg2="x86_64" />
+    </and>
+  </condition>
 
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+  <target name="compile" description="Compiles vf2js_mx.swc">
+    <echo message="Compiling '${vf2js.home}/frameworks/as/libs/vf2js_mx.swc'" />
+    <echo message="FLEX_HOME: ${FLEX_HOME}" />
+    <echo message="vf2js.home: ${vf2js.home}" />
+    <taskdef resource="flexTasks.tasks" classpathref="lib.path" />
+    <compc fork="true" output="${vf2js.home}/frameworks/as/libs/vf2js_mx.swc">
+      <jvmarg line="${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true" />
+      <load-config filename="compile-config.xml" />
+      <arg value="+playerglobal.home=${PLAYERGLOBAL_HOME}" />
+      <arg value="+playerglobal.version=${playerglobal.version}" />
+    </compc>
+  </target>
 
-        <compc fork="true" output="${VF2JS_HOME}/frameworks/as/libs/vf2js_mx.swc">
-            <jvmarg line="${jvm.args}"/>
-            <load-config filename="compile-config.xml" />
-            <arg value="+PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+FLEX_HOME=${FLEX_HOME}" />
-        </compc>
-    </target>
+  <target name="clean">
+    <delete failonerror="false">
+      <fileset dir="${vf2js.home}/frameworks/as/libs">
+        <include name="vf2js_mx.swc" />
+      </fileset>
+    </delete>
+  </target>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/projects/vf2js_mx/compile-config.xml
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/projects/vf2js_mx/compile-config.xml b/vf2js/frameworks/as/projects/vf2js_mx/compile-config.xml
index b1eb49a..4269c8d 100644
--- a/vf2js/frameworks/as/projects/vf2js_mx/compile-config.xml
+++ b/vf2js/frameworks/as/projects/vf2js_mx/compile-config.xml
@@ -20,7 +20,7 @@
 <flex-config>
   <compiler>
     <external-library-path>
-      <path-element>${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
+      <path-element>${playerglobal.home}/${playerglobal.version}/playerglobal.swc</path-element>
     </external-library-path>
     <namespaces>
       <namespace>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/projects/vf2js_s/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/projects/vf2js_s/build.xml b/vf2js/frameworks/as/projects/vf2js_s/build.xml
index a84a0af..6687042 100644
--- a/vf2js/frameworks/as/projects/vf2js_s/build.xml
+++ b/vf2js/frameworks/as/projects/vf2js_s/build.xml
@@ -17,48 +17,49 @@
   limitations under the License.
 
 -->
+<project name="vf2js_mx" default="main" basedir=".">
 
+  <property environment="env" />
+  <property name="FLEX_HOME" value="${env.FLEX_HOME}" /> <!-- must exist for compc
task -->
+  <property name="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}" />
+  <property name="playerglobal.version" value="14.0" />
 
-<project name="vf2js_s" default="main" basedir=".">
-    
-    <property file="../../build.properties"/>
+  <property name="vf2js.home" location="${basedir}/../../../.." />
 
-    <property environment="env"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
-    <property name="VF2JS_HOME" location="${env.VF2JS_HOME}"/>
+  <target name="main" depends="clean,compile" description="Clean build of vf2js_s.swc"
/>
 
-    <target name="main" depends="clean,compile" description="Clean build of vf2js_s.swc">
-    </target>
+  <path id="lib.path">
+    <fileset dir="${FLEX_HOME}/ant/lib" includes="flexTasks.jar" />
+  </path>
 
-    <target name="clean">
-        <delete failonerror="false">
-            <fileset dir="${VF2JS_HOME}/frameworks/as/libs">
-                <include name="vf2js_s.swc"/>
-            </fileset>
-        </delete>
-    </target>
-    
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+  <condition property="local.d32" value="-d32" else="">
+    <and>
+      <os family="mac" />
+      <matches pattern="1.6.*" string="${java.version}" />
+      <equals arg1="${sun.arch.data.model}" arg2="64" />
+      <equals arg1="${os.arch}" arg2="x86_64" />
+    </and>
+  </condition>
 
-    <target name="compile" description="Compiles vf2js_s.swc">
-        <echo message="Compiling '${VF2JS_HOME}/frameworks/as/libs/vf2js_s.swc'"/>
+  <target name="compile" description="Compiles vf2js_s.swc">
+    <echo message="Compiling '${vf2js.home}/frameworks/as/libs/vf2js_s.swc'" />
+    <echo message="FLEX_HOME: ${FLEX_HOME}" />
+    <echo message="vf2js.home: ${vf2js.home}" />
+    <taskdef resource="flexTasks.tasks" classpathref="lib.path" />
+    <compc fork="true" output="${vf2js.home}/frameworks/as/libs/vf2js_s.swc">
+      <jvmarg line="${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true" />
+      <load-config filename="compile-config.xml" />
+      <arg value="+playerglobal.home=${PLAYERGLOBAL_HOME}" />
+      <arg value="+playerglobal.version=${playerglobal.version}" />
+    </compc>
+  </target>
 
-        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        <echo message="VF2JS_HOME: ${VF2JS_HOME}"/>
-
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-
-        <compc fork="true" output="${VF2JS_HOME}/frameworks/as/libs/vf2js_s.swc">
-            <jvmarg line="${jvm.args}"/>
-            <load-config filename="compile-config.xml" />
-            <arg value="+PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+FLEX_HOME=${FLEX_HOME}" />
-        </compc>
-    </target>
+  <target name="clean">
+    <delete failonerror="false">
+      <fileset dir="${vf2js.home}/frameworks/as/libs">
+        <include name="vf2js_s.swc" />
+      </fileset>
+    </delete>
+  </target>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abcec378/vf2js/frameworks/as/projects/vf2js_s/compile-config.xml
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/as/projects/vf2js_s/compile-config.xml b/vf2js/frameworks/as/projects/vf2js_s/compile-config.xml
index 22f63e2..2c6e4e2 100644
--- a/vf2js/frameworks/as/projects/vf2js_s/compile-config.xml
+++ b/vf2js/frameworks/as/projects/vf2js_s/compile-config.xml
@@ -20,7 +20,7 @@
 <flex-config>
   <compiler>
     <external-library-path>
-      <path-element>${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
+      <path-element>${playerglobal.home}/${playerglobal.version}/playerglobal.swc</path-element>
     </external-library-path>
     <namespaces>
       <namespace>


Mime
View raw message