Return-Path: X-Original-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB2DBC93C for ; Fri, 18 May 2012 14:45:44 +0000 (UTC) Received: (qmail 50358 invoked by uid 500); 18 May 2012 14:45:44 -0000 Delivered-To: apmail-incubator-flex-commits-archive@incubator.apache.org Received: (qmail 50312 invoked by uid 500); 18 May 2012 14:45:43 -0000 Mailing-List: contact flex-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-commits@incubator.apache.org Received: (qmail 50295 invoked by uid 99); 18 May 2012 14:45:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 14:45:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 14:45:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9B8472388978; Fri, 18 May 2012 14:45:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1340109 - in /incubator/flex/trunk: ./ bin/ frameworks/ frameworks/projects/advancedgrids/ frameworks/projects/airframework/ frameworks/projects/airspark/ frameworks/projects/authoringsupport/ frameworks/projects/automation/ frameworks/pro... Date: Fri, 18 May 2012 14:45:17 -0000 To: flex-commits@incubator.apache.org From: cframpton@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120518144519.9B8472388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cframpton Date: Fri May 18 14:45:15 2012 New Revision: 1340109 URL: http://svn.apache.org/viewvc?rev=1340109&view=rev Log: Finish support for env.properties so that scripts and ant tasks such as work correctly if properties are being used. Note change of precedence - env.properties has precedence over environment variables. The compiler will replace {playerglobalHome}/{airHome} tag in the configuration file with env.PLAYERGLOBAL_HOME/env.AIR_HOME property if defined, else PLAYERGLOBAL_HOME/AIR_HOME environment variable if defined, else it leaves the token unaltered. Leaving the unexpanded token rather than replacing it with a space makes it easier to diagnose the error since the bad path is show in the "unable to open file" error. jira: Fixes FLEX-58 and FLEX-59. Modified: incubator/flex/trunk/bin/aasdoc incubator/flex/trunk/bin/aasdoc.bat incubator/flex/trunk/bin/acompc incubator/flex/trunk/bin/acompc.bat incubator/flex/trunk/bin/amxmlc incubator/flex/trunk/bin/amxmlc.bat incubator/flex/trunk/bin/asdoc incubator/flex/trunk/bin/asdoc.bat incubator/flex/trunk/bin/compc incubator/flex/trunk/bin/compc.bat incubator/flex/trunk/bin/mxmlc incubator/flex/trunk/bin/mxmlc.bat incubator/flex/trunk/build.xml incubator/flex/trunk/frameworks/build.xml incubator/flex/trunk/frameworks/projects/advancedgrids/build.xml incubator/flex/trunk/frameworks/projects/airframework/build.xml incubator/flex/trunk/frameworks/projects/airspark/build.xml incubator/flex/trunk/frameworks/projects/authoringsupport/build.xml incubator/flex/trunk/frameworks/projects/automation/build.xml incubator/flex/trunk/frameworks/projects/automation_air/build.xml incubator/flex/trunk/frameworks/projects/automation_airspark/build.xml incubator/flex/trunk/frameworks/projects/automation_dmv/build.xml incubator/flex/trunk/frameworks/projects/automation_flashflexkit/build.xml incubator/flex/trunk/frameworks/projects/automation_spark/build.xml incubator/flex/trunk/frameworks/projects/charts/build.xml incubator/flex/trunk/frameworks/projects/core/build.xml incubator/flex/trunk/frameworks/projects/flash-integration/build.xml incubator/flex/trunk/frameworks/projects/framework/build.xml incubator/flex/trunk/frameworks/projects/halo/build.xml incubator/flex/trunk/frameworks/projects/mobilecomponents/build.xml incubator/flex/trunk/frameworks/projects/mobiletheme/build.xml incubator/flex/trunk/frameworks/projects/mx/build.xml incubator/flex/trunk/frameworks/projects/playerglobal/build.xml incubator/flex/trunk/frameworks/projects/rpc/build.xml incubator/flex/trunk/frameworks/projects/spark/build.xml incubator/flex/trunk/frameworks/projects/spark_dmv/build.xml incubator/flex/trunk/frameworks/projects/sparkskins/build.xml incubator/flex/trunk/frameworks/projects/textLayout/build.xml incubator/flex/trunk/frameworks/projects/wireframe/build.xml incubator/flex/trunk/modules/compiler/build.xml incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java incubator/flex/trunk/mustella/build.xml incubator/flex/trunk/mustella/java/src/build.xml Modified: incubator/flex/trunk/bin/aasdoc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/aasdoc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/aasdoc (original) +++ incubator/flex/trunk/bin/aasdoc Fri May 18 14:45:15 2012 @@ -25,5 +25,11 @@ # asdoc use air-config.xml rather than flex-config.xml. # On Windows, aasdoc.bat is used instead. +# +# Either the AIR_HOME environment variable must be set or +# or the env.AIR_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + asdoc=`dirname "$0"`/asdoc "$asdoc" +configname=air "$@" Modified: incubator/flex/trunk/bin/aasdoc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/aasdoc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/aasdoc.bat (original) +++ incubator/flex/trunk/bin/aasdoc.bat Fri May 18 14:45:15 2012 @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. - rem rem aasdoc.bat script for Windows. rem This simply executes asdoc.jar in the same directory, @@ -23,13 +22,12 @@ rem asdoc use air-config.xml instead of rem On Unix, aasdoc is used instead. rem -if "%AIR_HOME%"=="" goto NO_AIR_HOME +rem +rem Either the AIR_HOME environment variable must be set or +rem or the env.AIR_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. java -Xmx1024m -Dsun.io.useCanonCaches=false -Xbootclasspath/p:"%FLEX_HOME%\lib\xalan.jar" -classpath "%FLEX_HOME%\lib\asdoc.jar" flex2.tools.ASDoc +configname=air +flexlib="%FLEX_HOME%\frameworks" %* -goto END - -:NO_AIR_HOME -echo error: AIR_HOME not set - -:END \ No newline at end of file Modified: incubator/flex/trunk/bin/acompc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/acompc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/acompc (original) +++ incubator/flex/trunk/bin/acompc Fri May 18 14:45:15 2012 @@ -25,5 +25,11 @@ # compc use air-config.xml rather than flex-config.xml. # On Windows, acompc.bat is used instead. +# +# Either the AIR_HOME environment variable must be set or +# or the env.AIR_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + compc=`dirname "$0"`/compc "$compc" +configname=air "$@" Modified: incubator/flex/trunk/bin/acompc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/acompc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/acompc.bat (original) +++ incubator/flex/trunk/bin/acompc.bat Fri May 18 14:45:15 2012 @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. - rem rem acompc.bat script for Windows. rem This simply executes compc.jar in the same directory, @@ -23,13 +22,12 @@ rem compc use air-config.xml instead of rem On Unix, acompc is used instead. rem -if "%AIR_HOME%"=="" goto NO_AIR_HOME +rem +rem Either the AIR_HOME environment variable must be set or +rem or the env.AIR_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. java -Xmx384m -Dsun.io.useCanonCaches=false -jar "%FLEX_HOME%\lib\compc.jar" +configname=air +flexlib="%FLEX_HOME%\frameworks" %* -goto END - -:NO_AIR_HOME -echo error: AIR_HOME not set - -:END \ No newline at end of file Modified: incubator/flex/trunk/bin/amxmlc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/amxmlc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/amxmlc (original) +++ incubator/flex/trunk/bin/amxmlc Fri May 18 14:45:15 2012 @@ -25,5 +25,11 @@ # mxmlc use air-config.xml rather than flex-config.xml. # On Windows, amxmlc.bat is used instead. +# +# Either the AIR_HOME environment variable must be set or +# or the env.AIR_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + mxmlc=`dirname "$0"`/mxmlc "$mxmlc" +configname=air "$@" Modified: incubator/flex/trunk/bin/amxmlc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/amxmlc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/amxmlc.bat (original) +++ incubator/flex/trunk/bin/amxmlc.bat Fri May 18 14:45:15 2012 @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. - rem rem amxmlc.bat script for Windows. rem This simply executes mxmlc.jar in the same directory, @@ -23,13 +22,12 @@ rem mxmlc use air-config.xml instead of rem On Unix, amxmlc is used instead. rem -if "%AIR_HOME%"=="" goto NO_AIR_HOME +rem +rem Either the AIR_HOME environment variable must be set or +rem or the env.AIR_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. java -Xmx384m -Dsun.io.useCanonCaches=false -jar "%FLEX_HOME%\lib\mxmlc.jar" +configname=air +flexlib="%FLEX_HOME%\frameworks" %* -goto END - -:NO_AIR_HOME -echo error: AIR_HOME not set - -:END \ No newline at end of file Modified: incubator/flex/trunk/bin/asdoc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/asdoc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/asdoc (original) +++ incubator/flex/trunk/bin/asdoc Fri May 18 14:45:15 2012 @@ -24,6 +24,12 @@ # java settings are managed in jvm.config in this directory. # +# +# Either the AIR_HOME environment variable must be set or +# or the env.AIR_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + case `uname` in CYGWIN*) OS="Windows" Modified: incubator/flex/trunk/bin/asdoc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/asdoc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/asdoc.bat (original) +++ incubator/flex/trunk/bin/asdoc.bat Fri May 18 14:45:15 2012 @@ -14,5 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. +rem +rem Either the AIR_HOME environment variable must be set or +rem or the env.AIR_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. + java -Xmx1024m -Dsun.io.useCanonCaches=false -Xbootclasspath/p:"%FLEX_HOME%\lib\xalan.jar" -classpath "%FLEX_HOME%\lib\asdoc.jar" flex2.tools.ASDoc +flexlib="%FLEX_HOME%\frameworks" %* \ No newline at end of file Modified: incubator/flex/trunk/bin/compc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/compc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/compc (original) +++ incubator/flex/trunk/bin/compc Fri May 18 14:45:15 2012 @@ -24,6 +24,12 @@ # java settings are managed in jvm.config in this directory. # +# +# Either the PLAYERGLOBAL_HOME environment variable must be set or +# or the env.PLAYERGLOBAL_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + case `uname` in CYGWIN*) OS="Windows" Modified: incubator/flex/trunk/bin/compc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/compc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/compc.bat (original) +++ incubator/flex/trunk/bin/compc.bat Fri May 18 14:45:15 2012 @@ -14,13 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. -if "%PLAYERGLOBAL_HOME%"=="" goto NO_PLAYERGLOBAL_HOME +rem +rem Either the PLAYERGLOBAL_HOME environment variable must be set or +rem or the env.PLAYERGLOBAL_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. java -Xmx384m -Dsun.io.useCanonCaches=false -jar "%FLEX_HOME%\lib\compc.jar" +flexlib="%FLEX_HOME%\frameworks" %* -goto END - -:NO_PLAYERGLOBAL_HOME -echo error: PLAYERGLOBAL_HOME not set - -:END \ No newline at end of file Modified: incubator/flex/trunk/bin/mxmlc URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/mxmlc?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/mxmlc (original) +++ incubator/flex/trunk/bin/mxmlc Fri May 18 14:45:15 2012 @@ -24,6 +24,12 @@ # java settings are managed in jvm.config in this directory. # +# +# Either the PLAYERGLOBAL_HOME environment variable must be set or +# or the env.PLAYERGLOBAL_HOME property must be set in %FLEX_HOME%/env.properties. +# If both are set the property takes precedence. +# + case `uname` in CYGWIN*) OS="Windows" Modified: incubator/flex/trunk/bin/mxmlc.bat URL: http://svn.apache.org/viewvc/incubator/flex/trunk/bin/mxmlc.bat?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/bin/mxmlc.bat (original) +++ incubator/flex/trunk/bin/mxmlc.bat Fri May 18 14:45:15 2012 @@ -14,13 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF rem See the License for the specific language governing permissions and rem limitations under the License. -if "%PLAYERGLOBAL_HOME%"=="" goto NO_PLAYERGLOBAL_HOME +rem +rem Either the PLAYERGLOBAL_HOME environment variable must be set or +rem or the env.PLAYERGLOBAL_HOME property must be set in %FLEX_HOME%\env.properties. +rem If both are set the property takes precedence. +rem + if "%FLEX_HOME%"=="" set FLEX_HOME=%~dp0\.. java -Xmx384m -Dsun.io.useCanonCaches=false -jar "%FLEX_HOME%\lib\mxmlc.jar" +flexlib="%FLEX_HOME%\frameworks" %* -goto END - -:NO_PLAYERGLOBAL_HOME -echo error: PLAYERGLOBAL_HOME not set - -:END \ No newline at end of file Modified: incubator/flex/trunk/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/build.xml (original) +++ incubator/flex/trunk/build.xml Fri May 18 14:45:15 2012 @@ -31,8 +31,8 @@ - + @@ -103,9 +103,11 @@ - + + @@ -113,9 +115,11 @@ unless="PLAYERGLOBAL_HOME.set"/> - + + @@ -381,8 +385,8 @@ - - + + @@ -669,7 +673,7 @@ - + Modified: incubator/flex/trunk/frameworks/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/build.xml (original) +++ incubator/flex/trunk/frameworks/build.xml Fri May 18 14:45:15 2012 @@ -44,8 +44,8 @@ - + - + Modified: incubator/flex/trunk/frameworks/projects/airframework/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/airframework/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/airframework/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/airframework/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/airspark/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/airspark/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/airspark/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/airspark/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/authoringsupport/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/authoringsupport/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/authoringsupport/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/authoringsupport/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation_air/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation_air/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation_air/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation_air/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation_airspark/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation_airspark/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation_airspark/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation_airspark/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation_dmv/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation_dmv/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation_dmv/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation_dmv/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation_flashflexkit/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation_flashflexkit/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation_flashflexkit/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation_flashflexkit/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/automation_spark/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/automation_spark/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/automation_spark/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/automation_spark/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/charts/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/charts/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/charts/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/charts/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/core/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/core/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/core/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/core/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/flash-integration/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/flash-integration/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/flash-integration/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/flash-integration/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/framework/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/framework/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/framework/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/framework/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/halo/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/halo/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/halo/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/halo/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/mobilecomponents/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/mobilecomponents/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/mobilecomponents/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/mobilecomponents/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/mobiletheme/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/mobiletheme/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/mobiletheme/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/mobiletheme/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/mx/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/mx/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/mx/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/mx/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/playerglobal/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/playerglobal/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/playerglobal/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/playerglobal/build.xml Fri May 18 14:45:15 2012 @@ -21,8 +21,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/rpc/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/rpc/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/rpc/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/rpc/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/spark/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/spark/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/spark/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/spark/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/spark_dmv/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/spark_dmv/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/spark_dmv/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/spark_dmv/build.xml Fri May 18 14:45:15 2012 @@ -22,8 +22,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/sparkskins/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/sparkskins/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/sparkskins/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/sparkskins/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/textLayout/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/textLayout/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/textLayout/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/textLayout/build.xml Fri May 18 14:45:15 2012 @@ -20,8 +20,8 @@ - + Modified: incubator/flex/trunk/frameworks/projects/wireframe/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/wireframe/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/frameworks/projects/wireframe/build.xml (original) +++ incubator/flex/trunk/frameworks/projects/wireframe/build.xml Fri May 18 14:45:15 2012 @@ -23,8 +23,8 @@ - + Modified: incubator/flex/trunk/modules/compiler/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/compiler/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/modules/compiler/build.xml (original) +++ incubator/flex/trunk/modules/compiler/build.xml Fri May 18 14:45:15 2012 @@ -39,11 +39,14 @@ + + + - + Modified: incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java (original) +++ incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java Fri May 18 14:45:15 2012 @@ -36,6 +36,7 @@ import macromedia.asc.embedding.ConfigVa import macromedia.asc.util.ObjectList; import java.io.File; +import java.io.InputStream; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; @@ -46,6 +47,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; /** @@ -64,6 +66,8 @@ public class CompilerConfiguration imple public static final String LOCALE_TOKEN = "{locale}"; public static final String TARGET_PLAYER_MAJOR_VERSION_TOKEN = "{targetPlayerMajorVersion}"; public static final String TARGET_PLAYER_MINOR_VERSION_TOKEN = "{targetPlayerMinorVersion}"; + + // Special Case for Apache. These are not currently exposed with command line options. public static final String PLAYERGLOBAL_HOME_TOKEN = "{playerglobalHome}"; public static final String AIR_HOME_TOKEN = "{airHome}"; @@ -128,15 +132,12 @@ public class CompilerConfiguration imple public VirtualFile[] expandTokens(String[] pathlist, String[] locales, ConfigurationValue cv) throws ConfigurationException { + // {playerglobalHome} and {airHome} + pathlist = expandRuntimeTokens(pathlist); + // {targetPlayerMajorVersion}, {targetPlayerMinorVersion} pathlist = expandTargetPlayerToken(pathlist, parentConfiguration); - // {playerglobalHome} - pathlist = expandPlayerglobalHomeToken(pathlist); - - // {airHome} - pathlist = expandAirHomeToken(pathlist); - // {locale} return expandLocaleToken(pathlist, locales, cv); } @@ -166,48 +167,73 @@ public class CompilerConfiguration imple return processed; } - + /** - * Replaces instances of {playerglobalHome} with the environment variable - * PLAYERGLOBAL. Doesn't turn the paths into VirtualFiles (yet, - * @see expandLocaleToken()). - */ - private static String[] expandPlayerglobalHomeToken(String[] pathlist) - { - final String[] processed = new String[pathlist.length]; - - String playerglobalHome = System.getenv("PLAYERGLOBAL_HOME"); - if (playerglobalHome == null) - playerglobalHome = ""; - - for (int i = 0; i < pathlist.length; i++) + * Load the env.properties file from the classpath. + + * @return null if env.properties does not exist in classpath or could not be loaded + */ + private Properties loadEnvPropertyFile() + { + Properties properties = null; + InputStream in = null; + + try + { + in = getClass().getClassLoader().getResourceAsStream("env.properties"); + if (in == null) + return null; + + properties = new Properties(); + properties.load(in); + in.close(); + } + catch (Exception e) { - processed[i] = StringUtils.substitute(pathlist[i], - PLAYERGLOBAL_HOME_TOKEN, playerglobalHome); } - - return processed; + + return properties; } /** - * Replaces instances of {airHome} with the environment variable - * AIR_HOME. Doesn't turn the paths into VirtualFiles (yet, - * @see expandLocaleToken()). + * Replaces instances of {playerglobalHome} and {airHome}. + * Values can come from either ../env.properties (relative 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 static String[] expandAirHomeToken(String[] pathlist) + private String[] expandRuntimeTokens(String[] pathlist) { final String[] processed = new String[pathlist.length]; + + // Look at property file first and then environment variable. + // If there is neither leave the token in place since it is easier to + // diagnose the problem with a token in the error message path then it is with + // a "" in the path. + Properties envProperties = loadEnvPropertyFile(); - String airHome = System.getenv("AIR_HOME"); - if (airHome == null) - airHome = ""; + String playerglobalHome = envProperties != null ? + envProperties.getProperty("env.PLAYERGLOBAL_HOME") : + System.getenv("PLAYERGLOBAL_HOME"); + + if (playerglobalHome == null) + playerglobalHome = PLAYERGLOBAL_HOME_TOKEN; + + String airHome = envProperties != null ? + envProperties.getProperty("env.AIR_HOME") : + System.getenv("AIR_HOME"); + if (airHome == null) + airHome = AIR_HOME_TOKEN; + for (int i = 0; i < pathlist.length; i++) { processed[i] = StringUtils.substitute(pathlist[i], - AIR_HOME_TOKEN, airHome); + PLAYERGLOBAL_HOME_TOKEN, playerglobalHome); + processed[i] = StringUtils.substitute(processed[i], + AIR_HOME_TOKEN, airHome); } - + return processed; } Modified: incubator/flex/trunk/mustella/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/mustella/build.xml (original) +++ incubator/flex/trunk/mustella/build.xml Fri May 18 14:45:15 2012 @@ -20,8 +20,8 @@ - + Modified: incubator/flex/trunk/mustella/java/src/build.xml URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/java/src/build.xml?rev=1340109&r1=1340108&r2=1340109&view=diff ============================================================================== --- incubator/flex/trunk/mustella/java/src/build.xml (original) +++ incubator/flex/trunk/mustella/java/src/build.xml Fri May 18 14:45:15 2012 @@ -18,10 +18,9 @@ --> - - +