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 2012/12/22 05:46:15 UTC
svn commit: r1425241 - in /incubator/flex/utilities/trunk:
common/src/org/apache/flex/utilities/common/Constants.as
installer/src/InstallApacheFlex.mxml
installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as
Author: aharui
Date: Sat Dec 22 04:46:14 2012
New Revision: 1425241
URL: http://svn.apache.org/viewvc?rev=1425241&view=rev
Log:
Allow use of file:// when testing. The code can then use the same download path for local files.
Modified:
incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as
incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as
Modified: incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as?rev=1425241&r1=1425240&r2=1425241&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as (original)
+++ incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as Sat Dec 22 04:46:14 2012
@@ -44,6 +44,7 @@ public class Constants
public static const SDK_BINARY_FILE_NAME_PREFIX:String = "apache-flex-sdk-";
public static const URL_PREFIX:String = "http://";
+ public static const FILE_PREFIX:String = "file://";
//--------------------------------------------------------------------------
//
Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1425241&r1=1425240&r2=1425241&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Sat Dec 22 04:46:14 2012
@@ -432,8 +432,8 @@ variables are not required because the l
}
else
{
-
- if (APACHE_FLEX_BIN_DISTRO_PATH.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX)
+ if (APACHE_FLEX_BIN_DISTRO_PATH.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX &&
+ APACHE_FLEX_BIN_DISTRO_PATH.substr(0, Constants.FILE_PREFIX.length) != Constants.FILE_PREFIX)
{
APACHE_FLEX_BIN_DISTRO_URL = _mirrorURLUtil.mirrorURL +
APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE;
@@ -1548,6 +1548,10 @@ variables are not required because the l
{
download(url, handlerFunction,errorFunction);
}
+ else if (url.search("file://") == 0)
+ {
+ download(url, handlerFunction,errorFunction);
+ }
else
{
var source:File = new File(url);
Modified: incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as?rev=1425241&r1=1425240&r2=1425241&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as (original)
+++ incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as Sat Dec 22 04:46:14 2012
@@ -220,7 +220,8 @@ public class MD5CompareUtil extends Even
_urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
_urlLoader.addEventListener(Event.COMPLETE, urlLoaderResultHandler);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, urlLoaderResultHandler);
- if (remoteSDKZipPath.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX)
+ if (remoteSDKZipPath.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX &&
+ remoteSDKZipPath.substr(0, Constants.FILE_PREFIX.length) != Constants.FILE_PREFIX)
{
_urlLoader.load(new URLRequest(MD5_DOMAIN + remoteSDKZipPath + MD5_POSTFIX));
}