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/08/06 13:24:51 UTC
[07/10] git commit: [flex-asjs] [refs/heads/develop] - Adjustments to
make FB launch config work properly.
Adjustments to make FB launch config work properly.
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/53f9a975
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/53f9a975
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/53f9a975
Branch: refs/heads/develop
Commit: 53f9a97523f472c26a74de9dbac6cb7ba03afb65
Parents: 37323f4
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Tue Aug 5 15:26:32 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Aug 5 15:26:32 2014 +0200
----------------------------------------------------------------------
vf2js/build.xml | 122 ++++++++++++++++++-
.../VF2JS (Debug and Release Build).launch | 2 +-
vf2js/js/vf2js/falconjx/bin/mxmlc | 7 +-
3 files changed, 122 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/53f9a975/vf2js/build.xml
----------------------------------------------------------------------
diff --git a/vf2js/build.xml b/vf2js/build.xml
index 9daa161..a63b75e 100644
--- a/vf2js/build.xml
+++ b/vf2js/build.xml
@@ -36,17 +36,33 @@
<property name="flex.sdk.loc" value="${basedir}/../../flex-sdk" />
+ <!-- ==
+ Setup
+ === -->
+
+ <condition property="platform" value="windows">
+ <os family="windows" />
+ </condition>
+
+ <condition property="isWindows" value="windows">
+ <os family="windows" />
+ </condition>
+
+
+
<!-- ============
Primary targets
============= -->
- <target name="main" depends="clean,build.as.frameworks" description="Build binaries from source" />
+ <target name="build.release" depends="" description="Build release artefacts" />
- <target name="install" depends="main" description="Install to chosen (-Dflex.sdk.loc) directory">
- </target>
+ <target name="download.deps" depends="overlay.falconjx" description="Download VF2JS dependencies" />
- <target name="build.release" depends="" description="Build release artefacts">
- </target>
+ <target name="install" depends="main,clean.sdk,overlay.sdk,build.examples" description="Overlay VF2JS on chosen (-Dflex.sdk.loc) directory" />
+
+ <target name="main" depends="clean,build.as.frameworks" description="Build binaries from source" />
+
+ <target name="overlay.sdk" depends="download.deps,copy.examples,copy.as.swcs,copy.falconjx.scripts,copy.js.framework,copy.launch.config" description="Overlay VF2JS on Flex SDK" />
@@ -58,6 +74,83 @@
<ant dir="${basedir}/frameworks/as" />
</target>
+ <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" />
+ </ant>
+ </target>
+
+ <target name="copy.examples" depends="" description="Copy VF2JS examples to Flex SDK">
+ <copy todir="${flex.sdk.loc}/examples/vf2js" overwrite="true">
+ <fileset dir="${basedir}/examples" />
+ </copy>
+ </target>
+
+ <target name="copy.falconjx.scripts" depends="" description="Copy customized FalconJS scripts - mxmlc and mxmlc.bat - to Flex SDK">
+ <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/bin" overwrite="true">
+ <fileset dir="${basedir}/js/vf2js/falconjx/bin" />
+ </copy>
+ <antcall target="chmod" />
+ </target>
+
+ <target name="copy.js.framework" depends="" description="Copy VF2JS JS framework to Flex SDK">
+ <copy todir="${flex.sdk.loc}/frameworks/js/vf2js/src" overwrite="true">
+ <fileset dir="${basedir}/frameworks/js/vf2js/src" />
+ </copy>
+ </target>
+
+ <target name="copy.launch.config" depends="" description="Copy launch config to Flex SDK">
+ <copy todir="${flex.sdk.loc}/ide/flashbuilder/launch" overwrite="true">
+ <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}"/>
+ </replace>
+ </target>
+
+ <target name="copy.as.swcs" depends="" description="Copy VF2JS SWCs to Flex SDK">
+ <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>
+
+ <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>
+ <!-- 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>
+ <!-- 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" />
+ </copy>
+ <!-- Closure Compiler -->
+ <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-compiler" overwrite="true">
+ <fileset dir="${basedir}/in/closure-compiler" />
+ </copy>
+ <!-- Closure Library -->
+ <copy todir="${flex.sdk.loc}/js/vf2js/falconjx/lib/google/closure-library" overwrite="true">
+ <fileset dir="${basedir}/in/closure-library" />
+ </copy>
+ </target>
+
+ <target name="unzip.falconjx" depends="" description="Unzip FalconJX artefact">
+
+ </target>
+
<!-- ============
@@ -68,4 +161,23 @@
<ant dir="${basedir}/frameworks/as" target="clean"/>
</target>
+ <target name="clean.sdk" depends="" description="Cleans previous VF2JS overlay">
+ <delete dir="${flex.sdk.loc}/examples/vf2js" />
+ <delete dir="${flex.sdk.loc}/js/vf2js" />
+ <delete dir="${flex.sdk.loc}/frameworks/js/vf2js" />
+ <delete>
+ <fileset dir="${flex.sdk.loc}/ide/flashbuilder/launch" includes="VF2JS*" />
+ </delete>
+ <delete>
+ <fileset dir="${flex.sdk.loc}/frameworks/libs" includes="vf2js_*" />
+ </delete>
+ </target>
+
+ <target name="chmod" unless="isWindows" description="Make mxmlc script executable">
+ <exec executable="chmod" dir="${flex.sdk.loc}">
+ <arg value="+x" />
+ <arg value="${flex.sdk.loc}/js/vf2js/falconjx/bin/mxmlc"/>
+ </exec>
+ </target>
+
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/53f9a975/vf2js/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch
----------------------------------------------------------------------
diff --git a/vf2js/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch b/vf2js/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch
index 6b56fd9..ed4b96e 100644
--- a/vf2js/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch
+++ b/vf2js/ide/flashbuilder/launch/VF2JS (Debug and Release Build).launch
@@ -23,6 +23,6 @@
<listEntry value='org.eclipse.ui.externaltools.launchGroup'/>
</listAttribute>
<stringAttribute key='org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE' value='${project}'/>
-<stringAttribute key='org.eclipse.ui.externaltools.ATTR_LOCATION' value='$VF2JS_HOME/js/vf2js/falconjx/bin/$MXMLC'/>
+<stringAttribute key='org.eclipse.ui.externaltools.ATTR_LOCATION' value='$FLEX_HOME/js/vf2js/falconjx/bin/$MXMLC'/>
<stringAttribute key='org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS' value='-fb "${project_loc}"'/>
</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/53f9a975/vf2js/js/vf2js/falconjx/bin/mxmlc
----------------------------------------------------------------------
diff --git a/vf2js/js/vf2js/falconjx/bin/mxmlc b/vf2js/js/vf2js/falconjx/bin/mxmlc
index 05df71b..c868028 100755
--- a/vf2js/js/vf2js/falconjx/bin/mxmlc
+++ b/vf2js/js/vf2js/falconjx/bin/mxmlc
@@ -25,8 +25,9 @@
# In Windows Command Prompt, use mxmlc.bat instead.
#
-FLEX_HOME=`dirname $0`/../../../..
-FALCON_HOME=$FLEX_HOME/js/vf2js
+SCRIPT_HOME=$(dirname "$0")
+FLEX_HOME=${SCRIPT_HOME}/../../../..
+FALCON_HOME=${FLEX_HOME}/js/vf2js
echo Using Flex SDK: $FLEX_HOME
echo Using Falcon compiler: $FALCON_HOME
@@ -59,4 +60,4 @@ fi
VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
-java $VMARGS $D32 -Dflexcompiler="$FALCON_HOME" -jar "$FLEX_HOME/js/vf2js/falconjx/lib/mxmlc.jar" -load-config="$FLEX_HOME/frameworks/flex-config.xml" -js-output-type=VF2JS -sdk-js-lib="$FLEX_HOME/frameworks/js/src" "$@"
+java $VMARGS $D32 -Dflexcompiler="$FALCON_HOME" -jar "$FLEX_HOME/js/vf2js/falconjx/lib/mxmlc.jar" -load-config="$FLEX_HOME/frameworks/flex-config.xml" -js-output-type=VF2JS "$@"