flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/15] git commit: [flex-asjs] [refs/heads/core_js_to_as] - tweak build script to use correct conditional flags
Date Mon, 28 Sep 2015 05:46:19 GMT
tweak build script to use correct conditional flags


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

Branch: refs/heads/core_js_to_as
Commit: d56f72a41dda906acb9737850690b80738148f41
Parents: 076fbf8
Author: Alex Harui <aharui@apache.org>
Authored: Thu Sep 17 09:22:50 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Sep 17 09:36:27 2015 -0700

----------------------------------------------------------------------
 .../projects/Core/as/src/CoreJSClasses.as       | 102 +++++++++++++++++++
 frameworks/projects/Core/build.xml              |  57 +++++++----
 frameworks/projects/Core/compile-js-config.xml  |  85 ++++++++++++++++
 3 files changed, 227 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d56f72a4/frameworks/projects/Core/as/src/CoreJSClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/CoreJSClasses.as b/frameworks/projects/Core/as/src/CoreJSClasses.as
new file mode 100644
index 0000000..0d4496a
--- /dev/null
+++ b/frameworks/projects/Core/as/src/CoreJSClasses.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into rpc.swc
+ *  beyond those that are found by dependency analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class CoreJSClasses
+{	
+    /* comment out for now until we get Application and its dependencies to compile
+    import org.apache.flex.core.BeadViewBase; BeadViewBase;
+    import org.apache.flex.core.BrowserWindow; BrowserWindow;
+    import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;  
+	import org.apache.flex.core.FilledRectangle; FilledRectangle;
+    import org.apache.flex.core.IAlertModel; IAlertModel;
+    import org.apache.flex.core.IBead; IBead;
+    import org.apache.flex.core.IBeadController; IBeadController;
+    import org.apache.flex.core.IBeadLayout; IBeadLayout;
+    import org.apache.flex.core.IBeadModel; IBeadModel;
+    import org.apache.flex.core.IBeadView; IBeadView;
+    import org.apache.flex.core.IBorderModel; IBorderModel;
+    import org.apache.flex.core.IChild; IChild;
+    import org.apache.flex.core.IChrome; IChrome;
+    import org.apache.flex.core.IComboBoxModel; IComboBoxModel;
+    import org.apache.flex.core.IContainer; IContainer;
+    import org.apache.flex.core.IContentView; IContentView;
+    import org.apache.flex.core.IDataProviderItemRendererMapper; IDataProviderItemRendererMapper;
+    import org.apache.flex.core.IDocument; IDocument;
+    import org.apache.flex.core.IFormatBead; IFormatBead;
+    import org.apache.flex.core.IImageModel; IImageModel;
+    import org.apache.flex.core.ILayoutChild; ILayoutChild;
+    import org.apache.flex.core.ILayoutParent; ILayoutParent;
+    import org.apache.flex.core.IPanelModel; IPanelModel;
+    import org.apache.flex.core.IParent; IParent;
+    import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
+    import org.apache.flex.core.IPopUp; IPopUp;
+    import org.apache.flex.core.IRollOverModel; IRollOverModel;
+    import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
+    import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
+    import org.apache.flex.core.ISelectionModel; ISelectionModel;
+    import org.apache.flex.core.IStrand; IStrand;
+    import org.apache.flex.core.IStrandWithModel; IStrandWithModel;
+    import org.apache.flex.core.ITextModel; ITextModel;
+    import org.apache.flex.core.ITitleBarModel; ITitleBarModel;
+    import org.apache.flex.core.IToggleButtonModel; IToggleButtonModel;
+    import org.apache.flex.core.IUIBase; IUIBase;
+    import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
+	import org.apache.flex.core.IViewport; IViewport;
+	import org.apache.flex.core.IViewportModel; IViewportModel;
+	import org.apache.flex.core.IViewportScroller; IViewportScroller;
+    import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
+    import org.apache.flex.core.DataBindingBase; DataBindingBase;
+    import org.apache.flex.core.UIBase; UIBase;
+    import org.apache.flex.core.UIButtonBase; UIButtonBase;
+	import org.apache.flex.events.CustomEvent; CustomEvent;
+	import org.apache.flex.events.Event; Event;
+    import org.apache.flex.events.EventDispatcher; EventDispatcher;
+    import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
+	import org.apache.flex.events.MouseEvent; MouseEvent;
+	import org.apache.flex.events.ValueEvent; ValueEvent;
+    import org.apache.flex.events.utils.MouseUtils; MouseUtils;
+    import org.apache.flex.geom.Point; Point;
+    import org.apache.flex.geom.Rectangle; Rectangle;
+    import org.apache.flex.utils.BinaryData; BinaryData;
+    import org.apache.flex.utils.BeadMetrics; BeadMetrics;
+	import org.apache.flex.utils.EffectTimer; EffectTimer;
+    import org.apache.flex.utils.MixinManager; MixinManager;
+    import org.apache.flex.utils.PNGEncoder; PNGEncoder;
+    import org.apache.flex.utils.StringTrimmer; StringTrimmer;
+	import org.apache.flex.utils.Timer; Timer;
+	import org.apache.flex.utils.UIUtils; UIUtils;
+    
+	import org.apache.flex.core.ClassFactory; ClassFactory;
+    import org.apache.flex.states.AddItems; AddItems;
+    import org.apache.flex.states.SetEventHandler; SetEventHandler;
+    import org.apache.flex.states.SetProperty; SetProperty;
+    import org.apache.flex.states.State; State;
+    */
+}
+
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d56f72a4/frameworks/projects/Core/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/build.xml b/frameworks/projects/Core/build.xml
index 5e081cd..b1ccdb8 100644
--- a/frameworks/projects/Core/build.xml
+++ b/frameworks/projects/Core/build.xml
@@ -95,9 +95,11 @@
         <compc fork="true"
                output="${FLEXJS_HOME}/frameworks/libs/Core.swc">
             <jvmarg line="${compc.jvm.args}"/>
-            <load-config filename="compile-config.xml"/>
-            <arg value="+playerglobal.version=${playerglobal.version}"/>
-            <arg value="+env.AIR_HOME=${env.AIR_HOME}"/>
+            <load-config filename="compile-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::JS,false" />
         </compc>
     </target>
 
@@ -153,20 +155,41 @@
     <target name="compile-asjs">
         <echo message="Cross-compiling Core/asjs"/>
         <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true">
-            <jvmarg value="-Xmx384m"/>
-            <jvmarg value="-Dsun.io.useCanonCaches=false"/>
-            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler"/>
-            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks"/>
-            <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
-            <arg value="-js-output-type=FLEXJS"/>
-            <arg value="-keep-asdoc"/>
-            <!-- allows compiler to see @flexjsignorecoercion annotations -->
-            <arg value="-output=${basedir}/js/out"/>
-            <arg value="-load-config=${basedir}/compile-asjs-config.xml"/>
-            <arg value="+playerglobal.version=${playerglobal.version}"/>
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}"/>
-            <arg value="+env.AIR_HOME=${env.AIR_HOME}"/>
+        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
+            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion
annotations -->
+            <arg value="-output=${basedir}/js/out" />
+            <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::AS3,true" />
+        </java>
+    </target>
+
+    <target name="compile-as-for-js" >
+        <echo message="Cross-compiling Core/as for js"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
+            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion
annotations -->
+            <arg value="-output=${basedir}/js/out" />
+            <arg value="-load-config=${basedir}/compile-js-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::AS3,false" />
+            <arg value="-define=COMPILE::JS,true" />
         </java>
     </target>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d56f72a4/frameworks/projects/Core/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/compile-js-config.xml b/frameworks/projects/Core/compile-js-config.xml
new file mode 100644
index 0000000..52b2a2b
--- /dev/null
+++ b/frameworks/projects/Core/compile-js-config.xml
@@ -0,0 +1,85 @@
+<!--
+
+  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>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+            <path-element>asjs/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+
+    <include-classes>
+        <class>CoreJSClasses</class>
+        <!-- leave out for now until we get Application to compile
+        <class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+		<uri>library://ns.apache.org/flexjs/svg</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>


Mime
View raw message