flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject [04/15] git commit: [flex-asjs] [refs/heads/feature/amf] - initial module example
Date Sat, 19 Aug 2017 12:42:32 GMT
initial module example


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

Branch: refs/heads/feature/amf
Commit: ba3140beeeb9b66cd8175dae4253821daefc47f6
Parents: 8e7c653
Author: Alex Harui <aharui@apache.org>
Authored: Tue Aug 15 13:19:00 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Aug 15 13:19:34 2017 -0700

----------------------------------------------------------------------
 examples/build.xml                              |  3 +
 examples/flexjs/ModuleExample/MainApp/build.xml | 55 ++++++++++++
 .../src/main/config/compile-app-config.xml      | 24 +++++
 .../MainApp/src/main/flex/MainApp.mxml          | 34 +++++++
 examples/flexjs/ModuleExample/Module/build.xml  | 76 ++++++++++++++++
 .../src/main/config/compile-app-config.xml      | 26 ++++++
 .../Module/src/main/flex/Module.mxml            | 30 +++++++
 examples/flexjs/ModuleExample/build.xml         | 95 ++++++++++++++++++++
 8 files changed, 343 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
index 5913b78..9d7e3cd 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -97,6 +97,7 @@
         <ant dir="${basedir}/flexjs/MobileMap"/>
         <ant dir="${basedir}/flexjs/MobileStocks"/>
         <ant dir="${basedir}/flexjs/MobileTrader"/>
+        <ant dir="${basedir}/flexjs/ModuleExample"/>
         <ant dir="${basedir}/flexjs/ChartExample"/>
         <ant dir="${basedir}/flexjs/StorageExample"/>
         <ant dir="${basedir}/flexjs/StyleExample"/>
@@ -142,6 +143,7 @@
         <ant dir="${basedir}/flexjs/MobileTrader" target="clean"/>
         <ant dir="${basedir}/flexjs/MobileStocks" target="clean"/>
         <ant dir="${basedir}/flexjs/MobileMap" target="clean"/>
+        <ant dir="${basedir}/flexjs/ModuleExample" target="clean"/>
         <ant dir="${basedir}/flexjs/ChartExample" target="clean"/>
         <ant dir="${basedir}/flexjs/StorageExample" target="clean"/>
         <ant dir="${basedir}/flexjs/StyleExample" target="clean"/>
@@ -177,6 +179,7 @@
         <ant dir="${basedir}/flexjs/MobileTrader" target="examine"/>
         <ant dir="${basedir}/flexjs/MobileStocks" target="examine"/>
         <ant dir="${basedir}/flexjs/MobileMap" target="examine"/>
+        <ant dir="${basedir}/flexjs/ModuleExample" target="examine"/>
         <ant dir="${basedir}/flexjs/ChartExample" target="examine"/>
         <ant dir="${basedir}/flexjs/StorageExample" target="examine"/>
         <ant dir="${basedir}/flexjs/StyleExample" target="examine"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/build.xml b/examples/flexjs/ModuleExample/MainApp/build.xml
new file mode 100644
index 0000000..a69e99f
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/build.xml
@@ -0,0 +1,55 @@
+<?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="MainApp" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../.."/>
+    <property name="example" value="MainApp" />
+    
+    <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" />
+
+    <!-- MainApp must be build before Module to generate variable and property maps -->
+    <target name="main" depends="clean,build_example.compile" 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" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure label appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
b/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..cb6846f
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
@@ -0,0 +1,24 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+    <js-compiler-option>
+        <option>--variable_map_output_file gccvars.txt</option>
+        <option>--property_map_output_file gccprops.txt</option>
+    </js-compiler-option>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml b/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
new file mode 100644
index 0000000..9e101bb
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" >
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View>
+            <js:beads>
+                <js:VerticalLayout />
+            </js:beads>
+        	<js:Label text="Module Should Appear Below" />
+            <js:UIModuleLoader modulePath="modules" moduleName="Module" />
+        </js:View>
+    </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/build.xml b/examples/flexjs/ModuleExample/Module/build.xml
new file mode 100644
index 0000000..b9e5a18
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/build.xml
@@ -0,0 +1,76 @@
+<?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="Module" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../.."/>
+    <property name="example" value="Module" />
+    
+    <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" description="Clean build
of ${example}">
+        <mkdir dir="${basedir}/../MainApp/bin-debug/modules" />
+        <mkdir dir="${basedir}/../MainApp/bin/js-debug/modules" />
+        <mkdir dir="${basedir}/../MainApp/bin/js-release/modules" />
+        <replace file="${basedir}/bin/js-debug/Module__deps.js"
+            token="/Module.js"
+            value="/modules/Module.js" />
+        <copy file="${basedir}/bin-debug/Module.swf" todir="${basedir}/../MainApp/bin-debug/modules"
failonerror="false" />
+        <copy todir="${basedir}/../MainApp/bin/js-debug/modules" failonerror="false">
+            <fileset dir="${basedir}/bin/js-debug">
+                <include name="*"/>
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/../MainApp/bin/js-debug/org" failonerror="false">
+            <fileset dir="${basedir}/bin/js-debug/org">
+                <include name="**/**"/>
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/../MainApp/bin/js-release/modules" failonerror="false">
+            <fileset dir="${basedir}/bin/js-release">
+                <include name="**/**"/>
+            </fileset>
+        </copy>
+    </target>
+    
+    <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}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure label appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml b/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..f9aa67e
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+    <js-compiler-option>
+        <option>--variable_map_input_file ../../../MainApp/bin/js-release/gccvars.txt</option>
+        <option>--property_map_input_file ../../../MainApp/bin/js-release/gccprops.txt</option>
+        <option>--variable_map_output_file modgccvars.txt</option>
+        <option>--property_map_output_file modgccprops.txt</option>
+    </js-compiler-option>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml b/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
new file mode 100644
index 0000000..949d445
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<js:UIModule xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" >
+    <js:beads>
+        <js:VerticalLayout />
+    </js:beads>
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+	<js:Label text="This Label is in the module" />
+    <js:TextInput id="ti" text="This TextInput is also in the module" />
+</js:UIModule>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/build.xml b/examples/flexjs/ModuleExample/build.xml
new file mode 100644
index 0000000..508ee87
--- /dev/null
+++ b/examples/flexjs/ModuleExample/build.xml
@@ -0,0 +1,95 @@
+<?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.
+
+-->
+
+<!-- Note:
+    If you modify this file you may have to make the same change in build_framework.xml.
+    build_framework.xml is renamed to build.xml when it is packaged.
+    It is used to build the frameworks directory from the zip file. 
+-->
+<project name="ModuleExample" default="main" basedir=".">
+
+    <property name="FLEXJS_HOME" location=".."/>
+
+    <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+    <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+    <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
+    <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>
+
+    <!-- Property for the platform.  -->
+    <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>  
+ 
+    <target name="main" depends="check-compile-env,clean,prepare,compile" 
+        description="Clean build of all examples"/>
+
+    <target name="check-compile-env" description="Check for the required environment variables">
+    </target>
+
+    
+    <target name="prepare" depends="thirdparty-downloads"/>
+            
+    <target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads
all the required thirdparty code.">
+        <!--<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>-->
+    </target>
+    
+    <target name="compile" description="Compile Examples" >
+        <ant dir="${basedir}/MainApp/" inheritall="false"/>
+        <ant dir="${basedir}/Module" inheritall="false"/>
+    </target>
+    
+    <!--
+		Cleanup
+	-->
+
+    <target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything
including thirdparty downloads."/>
+	
+    <target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes
all thirdparty downloads.">
+        <!--<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>-->
+    </target>
+    
+    <target name="clean" description="Cleans all SWCs and their resource bundles">
+        <ant dir="${basedir}/MainApp" target="clean"/>
+        <ant dir="${basedir}/Module" target="clean"/>
+    </target>
+
+    <target name="examine" description="Cleans all SWCs and their resource bundles">
+        <ant dir="${basedir}/MainApp" target="examine"/>
+    </target>
+
+</project>


Mime
View raw message