flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - use other command-line tokens to resolve playerglobalhome and airhome tokens
Date Thu, 22 Oct 2015 00:39:33 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 9262e10e4 -> f94011d6c


use other command-line tokens to resolve playerglobalhome and airhome tokens


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

Branch: refs/heads/develop
Commit: f94011d6cbec4da73595f98df1a710d9daaf87f9
Parents: 9262e10
Author: Alex Harui <aharui@apache.org>
Authored: Wed Oct 21 17:41:12 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Oct 21 17:41:12 2015 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/compiler/config/Configuration.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f94011d6/compiler/src/org/apache/flex/compiler/config/Configuration.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/config/Configuration.java b/compiler/src/org/apache/flex/compiler/config/Configuration.java
index 4378e0b..35d2c4a 100644
--- a/compiler/src/org/apache/flex/compiler/config/Configuration.java
+++ b/compiler/src/org/apache/flex/compiler/config/Configuration.java
@@ -3858,7 +3858,7 @@ public class Configuration
         final ImmutableList.Builder<String> resolvedPaths = new ImmutableList.Builder<String>();
         for (String pathElement : pathElements)
         {
-            pathElement = expandRuntimeTokens(pathElement);
+            pathElement = expandRuntimeTokens(pathElement, configurationValue.getBuffer());
 
             String playerExpandedPath = pathElement.replaceAll(TARGET_PLAYER_MAJOR_VERSION_TOKEN_REGEX_ESCAPED,
                     targetPlayerMajorVersion).replaceAll(TARGET_PLAYER_MINOR_VERSION_TOKEN_REGEX_ESCAPED,
@@ -3903,7 +3903,7 @@ public class Configuration
      * to jar file) or environment variables. The property file values have precedence. The
pairs are
      * env.PLAYERGLOBAL_HOME and PLAYERGLOBAL_HOME, and, env.AIR_HOME and AIR_HOME.
      */
-    private String expandRuntimeTokens(String pathElement)
+    private String expandRuntimeTokens(String pathElement, ConfigurationBuffer buffer)
     {
         // Look at property file first, if it exists, and see if the particular property
         // is defined.  If not found, then look for the environment variable.
@@ -3917,12 +3917,16 @@ public class Configuration
                 : System.getenv("PLAYERGLOBAL_HOME");
 
         if (playerglobalHome == null)
+            playerglobalHome = buffer.getToken("env.PLAYERGLOBAL_HOME");
+        if (playerglobalHome == null)
             playerglobalHome = PLAYERGLOBAL_HOME_TOKEN;
 
         String airHome = envProperties != null ? envProperties.getProperty("env.AIR_HOME",
System.getenv("AIR_HOME"))
                 : System.getenv("AIR_HOME");
 
         if (airHome == null)
+            airHome = buffer.getToken("env.AIR_HOME");
+        if (airHome == null)
             airHome = AIR_HOME_TOKEN;
 
         pathElement = pathElement.replace(PLAYERGLOBAL_HOME_TOKEN, playerglobalHome);


Mime
View raw message