flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/2] git commit: [flex-utilities] [refs/heads/develop] - add log file option, and add versionID to ant params
Date Wed, 02 Jul 2014 07:28:36 GMT
add log file option, and add versionID to ant params


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

Branch: refs/heads/develop
Commit: f8cf4eef3b2b07c0f5d844820f37ac5b06fd68b2
Parents: b82a346
Author: Alex Harui <aharui@apache.org>
Authored: Tue Jul 1 23:27:15 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Jul 1 23:27:15 2014 -0700

----------------------------------------------------------------------
 installer/src/InstallApacheFlex.mxml | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f8cf4eef/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml
index 7767b89..1460cda 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -154,6 +154,7 @@ variables are not required because the locations of these pieces are known.
 		private var _useMirror:Boolean = true;
 		private var _latestVersion:String;
 		private var loggedVersion:Boolean;
+        private var logFile:String;
         private var debugMode:Boolean = false;
 		private var logProgressEvents:Boolean = false;
         private var showDevBuilds:Boolean = false;
@@ -373,6 +374,10 @@ variables are not required because the locations of these pieces are
known.
                 if (s.indexOf("-debug") == 0) {
                     debugMode = true;
                 }
+                if (s.indexOf("-log=") == 0) {
+                    debugMode = true;
+                    logFile = s.substring(5);
+                }
 			}
             var so:SharedObject = SharedObject.getLocal("InstallApacheFlex");
             usingDownloadCache = so.data.usingDownloadCache;
@@ -731,6 +736,7 @@ variables are not required because the locations of these pieces are known.
                 			
                 var name:String;
                 var versionString:String;
+                var versionID:String;
                 
                 var languages:XMLList = data.languages.children();
                 for each (var lang:XML in languages)
@@ -746,10 +752,14 @@ variables are not required because the locations of these pieces are
known.
     			for each (var airVersion:XML in airVersionList) {
                     var displayVersion:String = airVersion.@displayVersion.toString();
                     versionString = airVersion.@version.toString();
+                    versionID = null;
+                    if (airVersion.@versionID.length() > 0)
+                        versionID = airVersion.@versionID.toString();
                     airVersions.push(versionString);
                     var airPath:String = airVersion.path.toString();
                     var airFile:String = airVersion.file.toString();
-    				AIR_VERSIONS.addItem({label:"AIR " + displayVersion, version: versionString, path:
airPath, file: airFile});
+    				AIR_VERSIONS.addItem({label:"AIR " + displayVersion, version: versionString, versionID:
versionID, 
+                                            path: airPath, file: airFile});
     			}
     			
     			if (this.airVersion.selectedIndex == -1) {
@@ -779,7 +789,7 @@ variables are not required because the locations of these pieces are known.
                         var nocache:Boolean = productVersion.@nocache.toString() == "true";
                         if (productVersion["@default"].length() == 1)
                             selectedFlexVersion = FLEX_VERSIONS.length;
-                        FLEX_VERSIONS.addItem({shortName: shortName, fileName:fileName,label:label,
version:ver, 
+                        FLEX_VERSIONS.addItem({shortName: shortName, fileName:fileName,label:label,
version:ver,
                             path:path, overlay: isOverlay, prefix: productPrefix, legacy:
legacy, nocache: nocache,
                             needsAIR: needsAIR, needsFlash: needsFlash, devBuild: devBuild,
icon: icon});
                     }
@@ -808,13 +818,16 @@ variables are not required because the locations of these pieces are
known.
     			for each (var flashVersion:XML in flashVersionList) {
                     displayVersion = flashVersion.@displayVersion.toString();
                     versionString = flashVersion.@version.toString();
+                    versionID = null;
+                    if (productVersion.@versionID.length() > 0)
+                        versionID = productVersion.@versionID.toString();
                     flashPlayerVersions.push(versionString);
     				if (!_os.isLinux() || Number(versionString) <= 11.2) {
     					var swfVersion:String = flashVersion.swfversion.toString();
                         var flashPath:String = flashVersion.path.toString();
                         var flashFile:String = flashVersion.file.toString();
     					FLASH_PLAYER_VERSIONS.addItem({label:"Flash Player " + displayVersion, version:versionString,
swfVersion:swfVersion,
-                                                                path: flashPath, file: flashFile});
+                            versionID: versionID, path: flashPath, file: flashFile});
     				}
     			}
     			
@@ -1493,9 +1506,13 @@ variables are not required because the locations of these pieces are
known.
                 context[p] = additionalProps[p];
             
             context["air.sdk.version"] = AIR_VERSION;
+            if (airVersion.selectedItem.versionID)
+                context["air.sdk.versionID"] = airVersion.selectedItem.versionID;
             context["air.sdk.url.path"] = airVersion.selectedItem.path;
             context["air.sdk.url.file"] = airVersion.selectedItem.file;
             context["flash.sdk.version"] = FLASH_PLAYER_VERSION;
+            if (flashPlayerVersion.selectedItem.versionID)
+                context["flash.sdk.versionID"] = flashPlayerVersion.selectedItem.versionID;
             if (debugMode)
                 context["verbose"] = true;
             if (flashPlayerVersion.selectedItem.path)
@@ -2695,6 +2712,14 @@ variables are not required because the locations of these pieces are
known.
 			}
             if (debugMode)
                 trace(text);
+            if (logFile)
+            {
+                var f:File = new File(logFile);
+                var fs:FileStream = new FileStream();
+                fs.open(f, FileMode.APPEND);
+                fs.writeUTFBytes(text + "\n");
+                fs.close();
+            }
 		}
 		
 		private var console:ConsoleWindow;


Mime
View raw message