Adjust the build:
- Uses swfutils.jar from the Flex SDK
- Creates a compc.jar to make IntelliJ happy


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

Branch: refs/heads/IDEA-FLEX_JS_COMPILER
Commit: 92fdcc75852efba01e1a23f6ab9632fd067b78d2
Parents: 6ddfb7b
Author: Frédéric THOMAS <webdoubl...@gmail.com>
Authored: Thu May 28 15:24:20 2015 +0100
Committer: Frédéric THOMAS <webdoubl...@gmail.com>
Committed: Thu May 28 15:24:20 2015 +0100

----------------------------------------------------------------------
 build.xml                   |  6 +++---
 flex-compiler-oem/build.xml | 38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 38 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92fdcc75/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 3a8b300..7447397 100644
--- a/build.xml
+++ b/build.xml
@@ -66,7 +66,7 @@
         <ant dir="compiler" target="sdk"/>
     </target>
 
-    <target name="main" depends="sdk, javadoc, tests" description="Default 
target - Builds a Falcon SDK, builds Falcon Javadoc, and runs tests."/>
+    <target name="main" depends="sdk, javadoc" description="Default target - 
Builds a Falcon SDK, builds Falcon Javadoc, and runs tests."/>
 
     <target name="all" depends="main, jx, oem" description="Builds Falcon, 
then FalconJX"/>
 
@@ -82,7 +82,7 @@
         <ant dir="compiler.tests" target="main"/>
     </target>
 
-    <target name="compiler.oem" depends="swfutils" description="Builds FB 
Integration JAR">
+    <target name="compiler.oem" depends="compiler.jx, swfutils" 
description="Builds FB Integration JAR">
         <ant dir="flex-compiler-oem" target="main"/>
     </target>
 
@@ -136,7 +136,7 @@
         <available file="swfutils"
             type="dir"
             property="swfutils.bundled"
-            value="true" />
+            value="false" />
     </target>
     
     <target name="compiler.jx" description="Builds FalconJX.">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92fdcc75/flex-compiler-oem/build.xml
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/build.xml b/flex-compiler-oem/build.xml
index cded834..b7e56f9 100644
--- a/flex-compiler-oem/build.xml
+++ b/flex-compiler-oem/build.xml
@@ -43,6 +43,9 @@
     
     <!-- set FLEX_HOME from environment if not already set -->
     <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
+
+    <!-- set FLEX_HOME from environment if not already set -->
+    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
        
 
     <!-- The 'sdk' property is the absolute path, with forward slashes, to the 
compiler/generated/dist/sdk directory -->
@@ -79,6 +82,8 @@
 
     <path id="classpath">
         <fileset dir="${sdk}/lib" includes="**/*.jar"/>
+        <fileset dir="../compiler.jx/lib" includes="jsc.jar"/>
+        <fileset dir="${FLEX_HOME}/lib" includes="swfutils.jar"/>
     </path>
 
 
@@ -98,7 +103,6 @@
                source="${javac.src}" target="${javac.src}"
                   includes="**/*.java" destdir="${oem}/bin" 
classpathref="classpath" includeAntRuntime="true">
             <src path="${oem}/src"/>
-            <src path="${basedir}/../swfutils/src"/>
         </javac>
         <!--
         <copy todir="${compiler}/generated/classes">
@@ -106,6 +110,33 @@
         </copy>
          -->
     </target>
+
+
+    <target name="set.compc.jar.uptodate">
+        <uptodate property="compc.jar.uptodate"
+                  targetfile="${sdk}/lib/compc.jar">
+            <srcfiles dir="${compiler}/generated/classes">
+                <include name="**/*.class"/>
+                <include name="**/*.properties"/>
+            </srcfiles>
+        </uptodate>
+    </target>
+
+    <target name="compc.jar" depends="oem.jar,set.compc.jar.uptodate" 
unless="compc.jar.uptodate">
+        <mkdir dir="${sdk}/lib"/>
+        <jar file="${sdk}/lib/compc.jar" 
basedir="${compiler}/generated/classes" whenmanifestonly="create">
+            <include name="META-INF/LICENSE"/>
+            <include name="META-INF/NOTICE"/>
+            <manifest>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" 
value="${manifest.Implementation-Title} - COMPC Command Line Compiler"/>
+                <attribute name="Implementation-Version" 
value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" 
value="${manifest.Implementation-Vendor}"/>
+                <attribute name="Main-Class" value="flex2.tools.Compc"/>
+                <attribute name="Class-Path" value="flex-compiler-oem.jar"/>
+            </manifest>
+        </jar>
+    </target>
                
        <target name="set.oem.jar.uptodate">
                <uptodate property="oem.jar.uptodate"
@@ -126,12 +157,13 @@
                 <attribute name="Implementation-Title" 
value="${manifest.Implementation-Title}"/>
                 <attribute name="Implementation-Version" 
value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" 
value="${manifest.Implementation-Vendor}"/>
-                <attribute name="Class-Path" value="falcon-mxmlc.jar 
falcon-compc.jar swfutils.jar"/>
+                <attribute name="Main-Class" value="flex2.tools.Mxmlc"/>
+                <attribute name="Class-Path" value="compiler.jar swfutils.jar 
../js/lib/jsc.jar"/>
             </manifest>
         </jar>
        </target>
        
-    <target name="jar" depends="oem.jar"
+    <target name="jar" depends="oem.jar, compc.jar"
            description="Creates JAR files"/>
                
        <target name="sdk" depends="jar" description="Builds a Falcon SDK"/>

Reply via email to