flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/feature/fontawesome] - fix ant build for fontawesome
Date Fri, 06 Jan 2017 23:57:51 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/fontawesome 2b4150a87 -> 4ae4795d0


fix ant build for fontawesome


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

Branch: refs/heads/feature/fontawesome
Commit: 4ae4795d069f73c36bcffee87d6e3fd2d2a2722d
Parents: 2b4150a
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 6 15:57:42 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 6 15:57:48 2017 -0800

----------------------------------------------------------------------
 frameworks/build.xml                            |   5 +
 .../js/FlexJS/projects/FontAwesomeJS/build.xml  | 143 +++++++++++++++++++
 .../src/main/config/compile-js-config.xml       |  86 +++++++++++
 3 files changed, 234 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4ae4795d/frameworks/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 97066c2..5a38893 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -134,6 +134,7 @@
         <ant dir="${basedir}/projects/Effects" target="clean"/>
         <ant dir="${basedir}/projects/Express" target="clean"/>
         <ant dir="${basedir}/projects/Flat" target="clean"/>
+        <ant dir="${basedir}/projects/FontAwesome" target="clean"/>
         <ant dir="${basedir}/projects/Formatters" target="clean"/>
         <ant dir="${basedir}/projects/GoogleMaps" target="clean"/>
         <ant dir="${basedir}/projects/CreateJS" target="clean"/>
@@ -209,6 +210,10 @@
         <ant dir="${basedir}/projects/Flat"/>
     </target>
 
+    <target name="FontAwesome" description="Clean build of FontAwesome.swc">
+        <ant dir="${basedir}/projects/FontAwesome"/>
+    </target>
+    
     <target name="Formatters" description="Clean build of Formatters.swc">
         <ant dir="${basedir}/projects/Formatters"/>
     </target>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4ae4795d/frameworks/js/FlexJS/projects/FontAwesomeJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FontAwesomeJS/build.xml b/frameworks/js/FlexJS/projects/FontAwesomeJS/build.xml
new file mode 100644
index 0000000..7e7735e
--- /dev/null
+++ b/frameworks/js/FlexJS/projects/FontAwesomeJS/build.xml
@@ -0,0 +1,143 @@
+<?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="FontAwesomeJS" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../../.."/>
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    <property name="target.name" value="${ant.project.name}.swc" />
+    <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo>
+    <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1"
flags="m" />
+    <property file="${basedir}/${target.name}.properties"/>
+    <delete file="${basedir}/${target.name}.properties"/>
+    
+    <target name="main" depends="clean,check-compiler,compile-js-swc,compile-asjs" description="Full
build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+    </target>
+    
+    <target name="compile-asjs" depends="check-compiler">
+        <echo message="Cross-compiling ${target.name}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+        <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="-compiler.strict-xml=true" />
+            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion
annotations -->
+            <arg value="-output=${FLEX_HOME}/frameworks/projects/${target.name.nojs}/target/${target.name.nojs}.swc"
/>
+            <arg value="-load-config=${FLEX_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml"
/>
+        </java>
+    </target>
+    
+    <target name="compile-js-swc" description="Compiles .as files into .swc used for cross-compiling
other projects">
+        <echo message="Compiling target/${target.name}"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        <mkdir dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs"/>
+        <mkdir dir="${basedir}/target"/>
+        
+        <compc fork="true"
+            output="${basedir}/target/${target.name}">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="${FLEX_HOME}/frameworks/js-config.xml" />
+            <load-config filename="src/main/config/compile-js-config.xml" />
+            <arg value="-compiler.strict-xml=true" />
+        </compc>
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/js/FlexJS/libs/${target.name}"
/>
+    </target>
+    
+    <target name="copy-js" >
+        <mkdir dir="${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources"/>
+        <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources">
+            <fileset dir="${basedir}/target/generated-sources/flexjs">
+                <include name="**/**" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home, check-falconjx-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing
falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
+    <target name="check-falconjx-home" unless="FALCONJX_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCONJX_HOME is ${env.FALCONJX_HOME}"/>
+        
+        <available file="${env.FALCONJX_HOME}/lib/jsc.jar"
+        type="file"
+        property="FALCONJX_HOME"
+        value="${env.FALCONJX_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar"
+        type="file"
+        property="FALCONJX_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler-jx"/>
+        
+        <fail message="FALCONJX_HOME must be set to a folder with a lib sub-folder containing
jsc.jar such as the compiler-jx folder in flex-falcon repo or the js folder of a FlexJS SDK"
+        unless="FALCONJX_HOME"/>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4ae4795d/frameworks/js/FlexJS/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
b/frameworks/js/FlexJS/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
new file mode 100644
index 0000000..58f08b3
--- /dev/null
+++ b/frameworks/js/FlexJS/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
@@ -0,0 +1,86 @@
+<!--
+
+  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>
+        
+		<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>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>false</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>true</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <!-- overwrite the default library-path setting -->
+        <library-path>
+            <path-element>../../../../../../../../js/libs/GCL.swc</path-element>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+             if these swcs are on the external-library-path then their requires
+             will not be listed -->
+            <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/HTMLJS.swc</path-element>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/fa</uri>
+                <manifest>../../../../../../../projects/FontAwesome/src/main/resources/fa-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../../../../../../../projects/FontAwesome/src/main/flex</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+    </include-file>
+
+    <include-classes>
+        <class>FAClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/fa</uri>
+    </include-namespaces>
+        
+
+</flex-config>


Mime
View raw message