You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/06/14 01:04:00 UTC

git commit: [flex-falcon] [refs/heads/develop] - fix issues cross-compiling a more complex swc

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 2948284b5 -> 2ee843330


fix issues cross-compiling a more complex swc


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

Branch: refs/heads/develop
Commit: 2ee84333079b8e3c65522f6d935870d6bf900d84
Parents: 2948284
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jun 13 16:03:49 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jun 13 16:03:49 2014 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/clients/COMPJSC.java   | 13 ++++++-----
 .../config/FlashBuilderConfigurator.java        | 23 +++++++++++++++++++-
 2 files changed, 30 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2ee84333/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
index d30d90f..f0eaa3b 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
@@ -144,10 +144,8 @@ public class COMPJSC extends MXMLJSC
         {
             project.getSourceCompilationUnitFactory().addHandler(asFileHandler);
 
-            if (!setupTargetFile())
-                return false;
-
-            buildArtifact();
+            if (setupTargetFile())
+                buildArtifact();
 
             if (jsTarget != null)
             {
@@ -338,7 +336,9 @@ public class COMPJSC extends MXMLJSC
         ITargetSettings settings = getTargetSettings();
         if (settings != null)
             project.setTargetSettings(settings);
-
+        else
+            return false;
+        
         target = JSSharedData.backend.createTarget(project,
                 getTargetSettings(), null);
 
@@ -350,6 +350,9 @@ public class COMPJSC extends MXMLJSC
         if (targetSettings == null)
             targetSettings = projectConfigurator.getTargetSettings(getTargetType());
 
+        if (targetSettings == null)
+            problems.addAll(projectConfigurator.getConfigurationProblems());
+        
         return targetSettings;
     }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2ee84333/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java b/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
index fce815e..654517b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
+++ b/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
@@ -231,7 +231,14 @@ public class FlashBuilderConfigurator
                     {
                         String[] parts = extras.split(" ");
                         for (String part : parts)
+                        {
+                            if (part.contains("-load-config") && part.contains(".."))
+                            {
+                                String[] pieces = part.split("=");
+                                part = pieces[0] + "=" + contextPath + "/src/" + pieces[1];
+                            }
                             fbArgs.add(part);
+                        }
                     }
                     String srcPath = attributes.getValue("sourceFolderPath");
                     if (srcPath != null && srcPath.length() > 0)
@@ -366,6 +373,16 @@ public class FlashBuilderConfigurator
                 final SAXParser parser = factory.newSAXParser();
                 final InputSource source = new InputSource(reader);
                 parser.parse(source, h);
+                if (h.allClasses)
+                {
+                    // may need to find and list all classes
+                    fbArgs.add("-include-sources=src");
+                }
+                else
+                {
+                    String classes = h.includedClasses.toString();
+                    fbArgs.add("-include-classes=" + classes);
+                }
             }
             catch (SAXConfigurationException e)
             {
@@ -410,8 +427,9 @@ public class FlashBuilderConfigurator
         private final String contextPath;
         private final String rootElement;
         private Locator locator;
+        public boolean allClasses;
     
-        private ArrayList<String> includedClasses = new ArrayList<String>();
+        public ArrayList<String> includedClasses = new ArrayList<String>();
         
         @Override
         public void startElement(final String uri, final String localName, final String qname, final Attributes attributes) throws SAXException
@@ -425,6 +443,9 @@ public class FlashBuilderConfigurator
                             new ConfigurationException.IncorrectElement(rootElement, qname, this.source, locator.getLineNumber()),
                             locator);
                 }                
+                String all = attributes.getValue("includeAllClasses");
+                if ("true".equals(all))
+                    allClasses = true;
                 contextStack.push(qname);
                 return;
             }