build scripts for examples

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fdaeaae6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fdaeaae6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fdaeaae6

Branch: refs/heads/develop
Commit: fdaeaae6168dd641dbbec19a04b0b27d80bf2554
Parents: 3454316
Author: Alex Harui <[email protected]>
Authored: Thu Nov 21 07:44:54 2013 -0800
Committer: Alex Harui <[email protected]>
Committed: Thu Nov 21 07:44:54 2013 -0800

----------------------------------------------------------------------
 build.xml                              |  16 +-
 examples/DataBindingTest/build.xml     | 141 +--------------
 examples/DataGridExample/build.xml     |  42 +++++
 examples/FlexJSTest_HTML5/build.xml    |  42 +++++
 examples/FlexJSTest_Panel/build.xml    |  42 +++++
 examples/FlexJSTest_SVG/build.xml      |  42 +++++
 examples/FlexJSTest_basic/build.xml    |  42 +++++
 examples/FlexJSTest_createjs/build.xml |  42 +++++
 examples/FlexJSTest_jquery/build.xml   |  42 +++++
 examples/LanguageTests/build.xml       |  42 +++++
 examples/ListsTest/build.xml           |  42 +++++
 examples/StatesTest/build.xml          |  42 +++++
 examples/StockQuote/build.xml          |  42 +++++
 examples/build.xml                     |   6 -
 examples/build_example.xml             | 255 ++++++++++++++++++++++++++++
 15 files changed, 738 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index dff25eb..a9277a3 100644
--- a/build.xml
+++ b/build.xml
@@ -180,6 +180,20 @@
             unless="AIR_HOME.set"/>
     </target>
     
+    <target name="check-goog-home" unless="GOOG_HOME"
+        description="Check that GOOG_HOME is a directory">
+        
+        <echo message="GOOG_HOME is ${env.GOOG_HOME}"/>
+
+        <available file="${env.GOOG_HOME}" 
+            type="dir" 
+            property="GOOG_HOME"
+            value="${env.GOOG_HOME}" />
+        
+        <fail message="The environment variable GOOG_HOME must be set to the 
Google Closure Library folder containg a 'closure' and 'third_party' folder" 
+            unless="GOOG_HOME"/>
+    </target>
+    
     <target name="check-flex-home" unless="mxmlc.jar.exists"
         description="Check FLEX_HOME for both a directory and an exe file">
 
@@ -342,7 +356,7 @@
     -->
 
     <target name="examples" description="Build the examples"
-        depends="prebuild">
+        depends="prebuild,check-goog-home">
         <ant dir="${basedir}/examples"/>
     </target>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/DataBindingTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/DataBindingTest/build.xml 
b/examples/DataBindingTest/build.xml
index 7b4c336..a37740c 100644
--- a/examples/DataBindingTest/build.xml
+++ b/examples/DataBindingTest/build.xml
@@ -21,13 +21,18 @@
 
 <project name="databindingtest" default="main" basedir=".">
     <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="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="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+    <property name="GOOG_HOME" value="${env.GOOG_HOME}"/>
 
-    <target name="main" depends="clean,compile" description="Clean build of 
FlexJSUI.swc">
+    <include file="${basedir}/../build_example.xml" />
+    
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
     </target>
     
     <target name="clean">
@@ -36,140 +41,6 @@
         <delete dir="${basedir}/bin-release" failonerror="false" />
     </target>
 
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-    
-    <target name="compile" description="Compiles DataBindingTest">
-        <echo message="Compiling DataBindingTest.swc"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-
-        <!-- 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" classpathref="lib.path"/>
-        <!--
-            Link in the classes (and their dependencies) for the MXML tags
-            listed in this project's manifest.xml.
-            Also link the additional classes (and their dependencies)
-            listed in FlexJSUIClasses.as,
-            because these aren't referenced by the manifest classes.
-            Keep the standard metadata when compiling.
-            Include the appropriate CSS files and assets in the SWC.
-            Don't include any resources in the SWC.
-            Write a bundle list of referenced resource bundles
-            into the file bundles.properties in this directory.
-        -->
-        <mxmlc fork="true"
-               file="${basedir}/src/DataBindingTest.mxml"
-               output="${basedir}/bin-debug/DataBindingTest.swf">
-            <jvmarg line="${mxmlc.jvm.args}"/>
-            <arg value="+flexlib=${basedir}/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}" />
-        </mxmlc>
-        
-        <html-wrapper 
-            height="300" 
-            width="400"
-            bgcolor="#ffffff"
-            name="DataBindingTest"
-            versionmajor="11"
-            versionminor="1"
-            versionrevision="0" 
-            output="${basedir}/bin-debug"/> 
- 
-    </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/fdaeaae6/examples/DataGridExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/build.xml 
b/examples/DataGridExample/build.xml
new file mode 100644
index 0000000..e6db422
--- /dev/null
+++ b/examples/DataGridExample/build.xml
@@ -0,0 +1,42 @@
+<?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="datagridexample" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="DataGridExample" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>    
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_HTML5/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_HTML5/build.xml 
b/examples/FlexJSTest_HTML5/build.xml
new file mode 100644
index 0000000..becc1ff
--- /dev/null
+++ b/examples/FlexJSTest_HTML5/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_HTML5" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="FlexJSTest_again" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_Panel/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_Panel/build.xml 
b/examples/FlexJSTest_Panel/build.xml
new file mode 100644
index 0000000..4dd41e2
--- /dev/null
+++ b/examples/FlexJSTest_Panel/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_Panel" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="FlexJSTest_Panel" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_SVG/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_SVG/build.xml 
b/examples/FlexJSTest_SVG/build.xml
new file mode 100644
index 0000000..d478a42
--- /dev/null
+++ b/examples/FlexJSTest_SVG/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_SVG" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="FlexJSTest_again" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_basic/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_basic/build.xml 
b/examples/FlexJSTest_basic/build.xml
new file mode 100644
index 0000000..7675a2c
--- /dev/null
+++ b/examples/FlexJSTest_basic/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_basic" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="FlexJSTest_basic" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of FlexJSUI.swc">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_createjs/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_createjs/build.xml 
b/examples/FlexJSTest_createjs/build.xml
new file mode 100644
index 0000000..88ca6ba
--- /dev/null
+++ b/examples/FlexJSTest_createjs/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_createjs" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="CreateJSExample" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/FlexJSTest_jquery/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_jquery/build.xml 
b/examples/FlexJSTest_jquery/build.xml
new file mode 100644
index 0000000..50ed81b
--- /dev/null
+++ b/examples/FlexJSTest_jquery/build.xml
@@ -0,0 +1,42 @@
+<?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="flexjstest_jquery" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="jQuerySample" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/LanguageTests/build.xml
----------------------------------------------------------------------
diff --git a/examples/LanguageTests/build.xml b/examples/LanguageTests/build.xml
new file mode 100644
index 0000000..50d8d35
--- /dev/null
+++ b/examples/LanguageTests/build.xml
@@ -0,0 +1,42 @@
+<?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="languagetests" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="LanguageTests" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compileas,build_example.compileasjs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/ListsTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/ListsTest/build.xml b/examples/ListsTest/build.xml
new file mode 100644
index 0000000..12a0be6
--- /dev/null
+++ b/examples/ListsTest/build.xml
@@ -0,0 +1,42 @@
+<?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="liststest" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="ListsTests" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/StatesTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/StatesTest/build.xml b/examples/StatesTest/build.xml
new file mode 100644
index 0000000..c8369ff
--- /dev/null
+++ b/examples/StatesTest/build.xml
@@ -0,0 +1,42 @@
+<?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="statestest" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="StatesTest" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/StockQuote/build.xml
----------------------------------------------------------------------
diff --git a/examples/StockQuote/build.xml b/examples/StockQuote/build.xml
new file mode 100644
index 0000000..4624edb
--- /dev/null
+++ b/examples/StockQuote/build.xml
@@ -0,0 +1,42 @@
+<?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="stockquote" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="StockQuote" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
index 0ba6baa..0fd2f7a 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -75,9 +75,7 @@
     
     <target name="compile" description="Compile Examples">
         <ant dir="${basedir}/DataBindingTest"/>
-        <!--
         <ant dir="${basedir}/DataGridExample"/>
-        <ant dir="${basedir}/FlexJSTest_again"/>
         <ant dir="${basedir}/FlexJSTest_basic"/>
         <ant dir="${basedir}/FlexJSTest_createjs"/>
         <ant dir="${basedir}/FlexJSTest_HTML5"/>
@@ -88,7 +86,6 @@
         <ant dir="${basedir}/ListsTest"/>
         <ant dir="${basedir}/StatesTest"/>
         <ant dir="${basedir}/StockQuote"/>
-        -->
     </target>
           
     <!--
@@ -103,9 +100,7 @@
     
     <target name="clean" description="Cleans all SWCs and their resource 
bundles">
         <ant dir="${basedir}/DataBindingTest" target="clean"/>
-        <!--
         <ant dir="${basedir}/DataGridExample" target="clean"/>
-        <ant dir="${basedir}/FlexJSTest_again" target="clean"/>
         <ant dir="${basedir}/FlexJSTest_basic" target="clean"/>
         <ant dir="${basedir}/FlexJSTest_createjs" target="clean"/>
         <ant dir="${basedir}/FlexJSTest_HTML5" target="clean"/>
@@ -116,7 +111,6 @@
         <ant dir="${basedir}/ListsTest" target="clean"/>
         <ant dir="${basedir}/StatesTest" target="clean"/>
         <ant dir="${basedir}/StockQuote" target="clean"/>
-        -->
     </target>
     
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fdaeaae6/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
new file mode 100644
index 0000000..e69c8c6
--- /dev/null
+++ b/examples/build_example.xml
@@ -0,0 +1,255 @@
+<?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=".">
+
+    <path id="lib.path">
+      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+    </path>
+    
+    <target name="compile" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+
+        <!-- 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" classpathref="lib.path"/>
+        <!--
+            Link in the classes (and their dependencies) for the MXML tags
+            listed in this project's manifest.xml.
+            Also link the additional classes (and their dependencies)
+            listed in FlexJSUIClasses.as,
+            because these aren't referenced by the manifest classes.
+            Keep the standard metadata when compiling.
+            Include the appropriate CSS files and assets in the SWC.
+            Don't include any resources in the SWC.
+            Write a bundle list of referenced resource bundles
+            into the file bundles.properties in this directory.
+        -->
+        <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="-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}" />
+        </mxmlc>
+        
+        <html-wrapper 
+            height="300" 
+            width="400"
+            bgcolor="#ffffff"
+            name="${example}"
+            versionmajor="11"
+            versionminor="1"
+            versionrevision="0" 
+            output="${basedir}/bin-debug"/> 
+ 
+    </target>
+    
+    <target name="compileas" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+
+        <!-- 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" classpathref="lib.path"/>
+        <!--
+            Link in the classes (and their dependencies) for the MXML tags
+            listed in this project's manifest.xml.
+            Also link the additional classes (and their dependencies)
+            listed in FlexJSUIClasses.as,
+            because these aren't referenced by the manifest classes.
+            Keep the standard metadata when compiling.
+            Include the appropriate CSS files and assets in the SWC.
+            Don't include any resources in the SWC.
+            Write a bundle list of referenced resource bundles
+            into the file bundles.properties in this directory.
+        -->
+        <mxmlc fork="true"
+               file="${basedir}/src/${example}.as"
+               output="${basedir}/bin-debug/${example}.swf">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <arg value="+flexlib=${basedir}/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}" />
+        </mxmlc>
+        
+        <html-wrapper 
+            height="300" 
+            width="400"
+            bgcolor="#ffffff"
+            name="${example}"
+            versionmajor="11"
+            versionminor="1"
+            versionrevision="0" 
+            output="${basedir}/bin-debug"/> 
+ 
+    </target>
+
+    <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"
+            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="${basedir}/src/${example}.mxml" />      
+        </java>
+        
+    </target>
+
+    <target name="compileasjs" 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"
+            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="${basedir}/src/${example}.as" />      
+        </java>
+        
+    </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>

Reply via email to