flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [10/50] [abbrv] FLEX-34605 make spacing /layout consistent
Date Mon, 27 Oct 2014 06:23:10 GMT
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ed2ba1fb/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml
index b849ae4..09267cc 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -33,20 +33,20 @@ variables are not required because the locations of these pieces are known.
 
 
 <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
-					   xmlns:s="library://ns.adobe.com/flex/spark"
-					   width="800" height="700" maxWidth="800" maxHeight="700" minWidth="800" minHeight="700"
-					   backgroundColor="0xDDDDDD"
-					   preinitialize="getInvoke()"
-					   applicationComplete="handleApplicationComplete(event)" showStatusBar="false"
-					   skinClass="ws.tink.spark.skins.controls.InstallApacheFlexSkin"
-					   xmlns:controls="ws.tink.spark.controls.*"
-					   xmlns:controls1="org.apache.flex.packageflexsdk.view.controls.*"
-					   xmlns:components="org.apache.flex.packageflexsdk.view.components.*"
-					   xmlns:controls2="org.apache.flex.utilities.common.controls.*">
-	
-	<fx:Style source="assets/styles/ApacheFlexToolsStyle.css"/>
-	<fx:Style source="assets/styles/InstallApacheFlexStyle.css"/> 
-	
+                       xmlns:s="library://ns.adobe.com/flex/spark"
+                       width="800" height="700" maxWidth="800" maxHeight="700" minWidth="800" minHeight="700"
+                       backgroundColor="0xDDDDDD"
+                       preinitialize="getInvoke()"
+                       applicationComplete="handleApplicationComplete(event)" showStatusBar="false"
+                       skinClass="ws.tink.spark.skins.controls.InstallApacheFlexSkin"
+                       xmlns:controls="ws.tink.spark.controls.*"
+                       xmlns:controls1="org.apache.flex.packageflexsdk.view.controls.*"
+                       xmlns:components="org.apache.flex.packageflexsdk.view.components.*"
+                       xmlns:controls2="org.apache.flex.utilities.common.controls.*">
+    
+    <fx:Style source="assets/styles/ApacheFlexToolsStyle.css"/>
+    <fx:Style source="assets/styles/InstallApacheFlexStyle.css"/> 
+    
     <fx:Declarations>
         <fx:Component className="CacheDialog" >
             <s:TitleWindow title="Download Cache Configuration" width="400" height="130" 
@@ -98,7 +98,7 @@ variables are not required because the locations of these pieces are known.
             </s:TitleWindow>
         </fx:Component>
     </fx:Declarations>
-	<fx:Script><![CDATA[
+    <fx:Script><![CDATA[
         import flash.globalization.LocaleID;
         import flash.globalization.StringTools;
         
@@ -107,7 +107,7 @@ variables are not required because the locations of these pieces are known.
         import mx.events.FlexEvent;
         import mx.events.PropertyChangeEvent;
         import mx.managers.CursorManager;
-        import mx.managers.PopUpManager;        
+        import mx.managers.PopUpManager;
         import mx.resources.ResourceBundle;
         import mx.rpc.events.FaultEvent;
         import mx.rpc.events.ResultEvent;
@@ -143,20 +143,20 @@ variables are not required because the locations of these pieces are known.
         
         import ws.tink.spark.controls.StepItem;
         import ws.tink.spark.skins.controls.InstallApacheFlexSkin;
-		
+        
         // embed us strings so we can always have them if we can't get to the locale files
         [Embed(source="properties/en_US.properties",mimeType="application/octet-stream")]
         private var en_US_Properties:Class;
         
         private var cleanedUp:Boolean;
         
-		private var _mirrorURLCGI:String;
-		private var _useMirror:Boolean = true;
-		private var _latestVersion:String;
-		private var loggedVersion:Boolean;
+        private var _mirrorURLCGI:String;
+        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 logProgressEvents:Boolean = false;
         private var showDevBuilds:Boolean = false;
         private var usingDownloadCache:Boolean;
         private var downloadCacheFolder:String;
@@ -165,158 +165,158 @@ variables are not required because the locations of these pieces are known.
         private var nocache:Boolean = true;
         private var wasAborted:Boolean;
         
-		public var installerAppPath:String;
-		public var installerAppFileName:String;
-		
+        public var installerAppPath:String;
+        public var installerAppFileName:String;
+        
         // loader needs to be in instance var otherwise it can get GC'd.
         // We only load one thing at a time, so we can all share this
         // var
         private var loader:URLLoader;
         
-		/**
-		 * Utility Singleton Instances
-		 */
-		private var _md5CompareUtil:MD5CompareUtil = MD5CompareUtil.instance;
-		private var _mirrorURLUtil:MirrorURLUtil = MirrorURLUtil.instance;
-		
-		/**
-		 * Apache Flex binary distribution
-		 *
-		 * Values stored in sdk-installer-config.xml edit file to change
-		 *
-		 */
-		private var APACHE_FLEX_BIN_DISTRO_PATH:String;
-		private var APACHE_FLEX_BIN_DISTRO_FILE:String;
+        /**
+         * Utility Singleton Instances
+         */
+        private var _md5CompareUtil:MD5CompareUtil = MD5CompareUtil.instance;
+        private var _mirrorURLUtil:MirrorURLUtil = MirrorURLUtil.instance;
+        
+        /**
+         * Apache Flex binary distribution
+         *
+         * Values stored in sdk-installer-config.xml edit file to change
+         *
+         */
+        private var APACHE_FLEX_BIN_DISTRO_PATH:String;
+        private var APACHE_FLEX_BIN_DISTRO_FILE:String;
         private var APACHE_FLEX_BIN_INSTALLER_FILE:String;
-		private var APACHE_FLEX_BIN_DISTRO_FILE_SHORT:String;
-		private var APACHE_FLEX_BIN_DISTRO_URL:String;
+        private var APACHE_FLEX_BIN_DISTRO_FILE_SHORT:String;
+        private var APACHE_FLEX_BIN_DISTRO_URL:String;
         private var APACHE_FLEX_BIN_INSTALLER_URL:String;
-		[Bindable] private var APACHE_FLEX_BIN_DISTRO_VERSION:String = "";
-		[Bindable] private var APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY:String = "";
-		
-		/**
-		 * Adobe AIR SDK
-		 *
-		 * Values stored in sdk-installer-config.xml edit file to change
-		 *
-		 */
-		[Bindable] private var AIR_VERSIONS:ArrayCollection = new ArrayCollection();
-		private var AIR_VERSION:String = "14.0";
-		private var ADOBE_AIR_SDK_WIN_FILE:String;
-		private var ADOBE_AIR_SDK_WIN_URL:String;
-		private var ADOBE_AIR_SDK_MAC_FILE:String;
-		private var ADOBE_AIR_SDK_MAC_URL:String;
-		private var ADOBE_AIR_SDK_LINUX_FILE:String;
-		private var ADOBE_AIR_SDK_LINUX_URL:String;
-		
-		/**
-		 * Adobe Flash Player
-		 *
-		 * Values stored in sdk-installer-config.xml edit file to change
-		 *
-		 */
-		[Bindable] private var FLASH_PLAYER_VERSIONS:ArrayCollection = new ArrayCollection();
-		private var FLASH_PLAYER_VERSION:String = "11.1";
-		private var FLASH_PLAYER_SWF_VERSION:String = "14";
-		private var ADOBE_FB_GLOBALPLAYER_SWC_FILE:String;
-		private var ADOBE_FB_GLOBALPLAYER_SWC_URL:String;
-		
-		/**
-		 * Apache Flex
-		 *
-		 * Values stored in sdk-installer-config.xml edit file to change
-		 *
-		 */
-		[Bindable] private var FLEX_VERSIONS:ArrayCollection = new ArrayCollection();
-		
-		/**
-		 *
-		 * SwfObject
-		 *
-		 */
-		private var SWF_OBJECT_FILE:String;
-		private var SWF_OBJECT_URL:String;
-		
-		/**
-		 * Optional installs
-		 *
-		 */
-		private var OSMF_SWC_FILE:String;
-		private var OSMF_SWC_URL:String;
-		private var OSMF_SWF_FILE:String = "osmf.swf";
-		
-		private var BLAZEDS_FILE:String;
-		private var BLAZEDS_URL:String;
-		
-		private var AFE_FILE:String;
-		private var AFE_URL:String;
-		private var AGLJ40_FILE:String;
-		private var AGLJ40_URL:String;
-		private var FLEX_FONTKIT_FILE:String;
-		private var FLEX_FONTKIT_URL:String;
-		private var RIDEAU_FILE:String;
-		private var RIDEAU_URL:String;
-		
-		[Bindable]
-		private var _flexHome:String;
-		private var _flexTemp:String;
-		private var _flexHomeDir:File;
-		private var _flexTempDir:File;
-		private var _apacheFlexSDKCompressedFile:File;
-		private var _adobeAIRSDKZipFile:File;
-		private var _fbGlobalPlayerDir:File;
-		private var _fbGlobalPlayerFile:File;
-		private var _blazeDSJarFile:File;
-		private var _afeJarFile:File;
-		private var _aglj40JarFile:File;
-		private var _flexFontKitJarFile:File;
-		private var _rideauJarFile:File;
-		private var _osmfSWCFile:File;
-		private var _osmfSWFFile:File;
-		
-		private var _os:OS = new OS();
-		private var _loader:URLLoader;
-		private var _process:NativeProcess;
-		private var _previousDisplayedPercent:int = 0;
-		private var _fileUnzipErrorFunction:Function;
-		private var _numOptionalComponents:int = 4;
-		private var _numOptionalComponentsPermissions:int = 0;
-		private var _useOSMF2:Boolean = true;
-		
-		private var languageOverride:String;
-		private var configOverride:String = "";
-		private var stepsOverride:String = "";
-		private var installOverride:String = "";
+        [Bindable] private var APACHE_FLEX_BIN_DISTRO_VERSION:String = "";
+        [Bindable] private var APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY:String = "";
+        
+        /**
+         * Adobe AIR SDK
+         *
+         * Values stored in sdk-installer-config.xml edit file to change
+         *
+         */
+        [Bindable] private var AIR_VERSIONS:ArrayCollection = new ArrayCollection();
+        private var AIR_VERSION:String = "14.0";
+        private var ADOBE_AIR_SDK_WIN_FILE:String;
+        private var ADOBE_AIR_SDK_WIN_URL:String;
+        private var ADOBE_AIR_SDK_MAC_FILE:String;
+        private var ADOBE_AIR_SDK_MAC_URL:String;
+        private var ADOBE_AIR_SDK_LINUX_FILE:String;
+        private var ADOBE_AIR_SDK_LINUX_URL:String;
+        
+        /**
+         * Adobe Flash Player
+         *
+         * Values stored in sdk-installer-config.xml edit file to change
+         *
+         */
+        [Bindable] private var FLASH_PLAYER_VERSIONS:ArrayCollection = new ArrayCollection();
+        private var FLASH_PLAYER_VERSION:String = "11.1";
+        private var FLASH_PLAYER_SWF_VERSION:String = "14";
+        private var ADOBE_FB_GLOBALPLAYER_SWC_FILE:String;
+        private var ADOBE_FB_GLOBALPLAYER_SWC_URL:String;
+        
+        /**
+         * Apache Flex
+         *
+         * Values stored in sdk-installer-config.xml edit file to change
+         *
+         */
+        [Bindable] private var FLEX_VERSIONS:ArrayCollection = new ArrayCollection();
+        
+        /**
+         *
+         * SwfObject
+         *
+         */
+        private var SWF_OBJECT_FILE:String;
+        private var SWF_OBJECT_URL:String;
+        
+        /**
+         * Optional installs
+         *
+         */
+        private var OSMF_SWC_FILE:String;
+        private var OSMF_SWC_URL:String;
+        private var OSMF_SWF_FILE:String = "osmf.swf";
+        
+        private var BLAZEDS_FILE:String;
+        private var BLAZEDS_URL:String;
+        
+        private var AFE_FILE:String;
+        private var AFE_URL:String;
+        private var AGLJ40_FILE:String;
+        private var AGLJ40_URL:String;
+        private var FLEX_FONTKIT_FILE:String;
+        private var FLEX_FONTKIT_URL:String;
+        private var RIDEAU_FILE:String;
+        private var RIDEAU_URL:String;
+        
+        [Bindable]
+        private var _flexHome:String;
+        private var _flexTemp:String;
+        private var _flexHomeDir:File;
+        private var _flexTempDir:File;
+        private var _apacheFlexSDKCompressedFile:File;
+        private var _adobeAIRSDKZipFile:File;
+        private var _fbGlobalPlayerDir:File;
+        private var _fbGlobalPlayerFile:File;
+        private var _blazeDSJarFile:File;
+        private var _afeJarFile:File;
+        private var _aglj40JarFile:File;
+        private var _flexFontKitJarFile:File;
+        private var _rideauJarFile:File;
+        private var _osmfSWCFile:File;
+        private var _osmfSWFFile:File;
+        
+        private var _os:OS = new OS();
+        private var _loader:URLLoader;
+        private var _process:NativeProcess;
+        private var _previousDisplayedPercent:int = 0;
+        private var _fileUnzipErrorFunction:Function;
+        private var _numOptionalComponents:int = 4;
+        private var _numOptionalComponentsPermissions:int = 0;
+        private var _useOSMF2:Boolean = true;
+        
+        private var languageOverride:String;
+        private var configOverride:String = "";
+        private var stepsOverride:String = "";
+        private var installOverride:String = "";
         
         private var overlaying:Boolean;
         private var usingXML:Object;
         private var additionalProps:Object = {};
-		private var licensePropertyMap:Object = {};
+        private var licensePropertyMap:Object = {};
         private var progressLabels:XML;
         private var installStepsData:XMLList;
         private var stepIDs:Vector.<String> = new Vector.<String>();
         private var stepLabels:Vector.<String> = new Vector.<String>();
         private var currentStep:int = 0;
         
-		private var customMenuItem1:ContextMenuItem = new ContextMenuItem("Show Dev Builds");
-		private var customMenuItem2:ContextMenuItem = new ContextMenuItem("Configure Download Cache...");
-		private var customMenuItem3:ContextMenuItem = new ContextMenuItem("Enable Verbose Logging");
-		private var customMenuItem4:ContextMenuItem = new ContextMenuItem("Enable Progress Logging");
-		
-		[Bindable]
-		private var _viewResourceConstants:ViewResourceConstants;
+        private var customMenuItem1:ContextMenuItem = new ContextMenuItem("Show Dev Builds");
+        private var customMenuItem2:ContextMenuItem = new ContextMenuItem("Configure Download Cache...");
+        private var customMenuItem3:ContextMenuItem = new ContextMenuItem("Enable Verbose Logging");
+        private var customMenuItem4:ContextMenuItem = new ContextMenuItem("Enable Progress Logging");
+        
+        [Bindable]
+        private var _viewResourceConstants:ViewResourceConstants;
         [Bindable]
         private var supportedLanguages:ArrayCollection = new ArrayCollection();
-		[Bindable]
-		private var _installationSteps:ArrayCollection = new ArrayCollection();
-		[Bindable]
-		private var _installerComponentsDataProvider:ArrayCollection = new ArrayCollection();
-		[Bindable]
-		private var _currentLicenseURL:String;
-		[Bindable]
-		private var _currentLicenseLabel:String;
-		[Bindable]
-		public var _messages:ArrayCollection = new ArrayCollection();
+        [Bindable]
+        private var _installationSteps:ArrayCollection = new ArrayCollection();
+        [Bindable]
+        private var _installerComponentsDataProvider:ArrayCollection = new ArrayCollection();
+        [Bindable]
+        private var _currentLicenseURL:String;
+        [Bindable]
+        private var _currentLicenseLabel:String;
+        [Bindable]
+        public var _messages:ArrayCollection = new ArrayCollection();
         
         private var _lastTag:String;
         private var _lastPublicMessage:String;
@@ -348,37 +348,40 @@ variables are not required because the locations of these pieces are known.
         {
             return _lastPublicMessage;
         }
-		
-		private function getInvoke():void {
-			var nativeApplication:NativeApplication = NativeApplication.nativeApplication;
-			nativeApplication.addEventListener(InvokeEvent.INVOKE, parseArgs);
-		}
-		
-		[Bindable] private var _standardButtonWidth:Number = 88;
-		
-		public function setButtonWidths():void {
-			var calc:CalcButtonWidth = new CalcButtonWidth(hiddenButton);
-			
-			calc.buttonWidth(installLogBtn);
-			calc.buttonWidth(openApacheFlexFolderBtn);
-			
-			_standardButtonWidth = calc.maxButtonWidth([installBtn, browseBtn, closeBtn, nextBtn]);
-		}
-		
-		private function parseArgs(event:InvokeEvent):void {
-			for each (var s:String in event.arguments) {
-				if (s.indexOf("-language=") == 0) {
-					languageOverride = s.substring(10);
-				}
-				if (s.indexOf("-config=") == 0) {
-					configOverride = s.substring(8);
-				}
-				if (s.indexOf("-install=") == 0) {
-					installOverride = s.substring(9);
-				}
-				if (s.indexOf("-steps=") == 0) {
-					stepsOverride = s.substring(7);
-				}
+        
+        private function getInvoke():void
+        {
+            var nativeApplication:NativeApplication = NativeApplication.nativeApplication;
+            nativeApplication.addEventListener(InvokeEvent.INVOKE, parseArgs);
+        }
+        
+        [Bindable] private var _standardButtonWidth:Number = 88;
+        
+        public function setButtonWidths():void
+        {
+            var calc:CalcButtonWidth = new CalcButtonWidth(hiddenButton);
+            
+            calc.buttonWidth(installLogBtn);
+            calc.buttonWidth(openApacheFlexFolderBtn);
+            
+            _standardButtonWidth = calc.maxButtonWidth([installBtn, browseBtn, closeBtn, nextBtn]);
+        }
+        
+        private function parseArgs(event:InvokeEvent):void
+        {
+            for each (var s:String in event.arguments) {
+                if (s.indexOf("-language=") == 0) {
+                    languageOverride = s.substring(10);
+                }
+                if (s.indexOf("-config=") == 0) {
+                    configOverride = s.substring(8);
+                }
+                if (s.indexOf("-install=") == 0) {
+                    installOverride = s.substring(9);
+                }
+                if (s.indexOf("-steps=") == 0) {
+                    stepsOverride = s.substring(7);
+                }
                 if (s.indexOf("-debug") == 0) {
                     debugMode = true;
                 }
@@ -386,91 +389,95 @@ variables are not required because the locations of these pieces are known.
                     debugMode = true;
                     logFile = s.substring(5);
                 }
-			}
+            }
             var so:SharedObject = SharedObject.getLocal("InstallApacheFlex");
             usingDownloadCache = so.data.usingDownloadCache;
             downloadCacheFolder = so.data.downloadCacheFolder;
-		}
-		
-		protected function handleApplicationComplete(event:FlexEvent):void {
+        }
+        
+        protected function handleApplicationComplete(event:FlexEvent):void
+        {
             CursorManager.setBusyCursor();
-			loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);
+            loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);
             addEventListener(Event.CLOSING, closeApplication);
-			updateWindow();
-			var hasInternet:Boolean = false;
-			var networkAdapters:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
-			for each (var networkAdapter:NetworkInterface in networkAdapters)
-			{
-				if (networkAdapter.active)
-				{
-					hasInternet = true;
-					break;
-				}
-			}
-			if (hasInternet)
-			{
-				loadXML();
-			}
+            updateWindow();
+            var hasInternet:Boolean = false;
+            var networkAdapters:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
+            for each (var networkAdapter:NetworkInterface in networkAdapters)
+            {
+                if (networkAdapter.active)
+                {
+                    hasInternet = true;
+                    break;
+                }
+            }
+            if (hasInternet)
+            {
+                loadXML();
+            }
             logVersion();
-			if (!hasInternet)
-			{
-				log("Internet connection unavailable");
-				abortInstallation("Internet connection unavailable.");
-			}
-		}
-		
-		private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
-		{
-			if (currentStep > 0)
-				updateActivityStep(stepLabels[currentStep - 1], StepItem.ERROR);
-			if (event.error is Error)
-			{
-				var error:Error = event.error as Error;
-				log(error.message);
-				log(error.getStackTrace(), -1, false);
-				abortInstallation(error.message + "\n" + error.getStackTrace());
-			}
-			else if (event.error is ErrorEvent)
-			{
-				var errorEvent:ErrorEvent = event.error as ErrorEvent;
-				log(errorEvent.text);
-				abortInstallation(errorEvent.text);
-			}
-			else
-			{
-				// a non-Error, non-ErrorEvent type was thrown and uncaught
-				log(event.toString());
-				abortInstallation(event.toString());
-			}
-		}
-
-		/**
-		 * Define on ResourceManager all keys for translation.
-		 * If some key is not present on any other language selected by user, the default value will be displayed
-		 * on the screen
-		 */
-		private function defineResourceManagerDefaultLanguage():void {
-			selectDefaultLanguage();
-		}
-		
-		private function getIndexOfEnUS():int
-		{
-			for (var i:int = 0; i < _langSelect.dataProvider.length; i++) 
-			{
-				if(_langSelect.dataProvider.getItemAt(i).data == "en_US")
-				{
-					return i;
-				}
-			}
-			return -1;
-		}
-		
-		private function updateWindowTitle():void {
+            if (!hasInternet)
+            {
+                log("Internet connection unavailable");
+                abortInstallation("Internet connection unavailable.");
+            }
+        }
+        
+        private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
+        {
+            if (currentStep > 0)
+                updateActivityStep(stepLabels[currentStep - 1], StepItem.ERROR);
+            if (event.error is Error)
+            {
+                var error:Error = event.error as Error;
+                log(error.message);
+                log(error.getStackTrace(), -1, false);
+                abortInstallation(error.message + "\n" + error.getStackTrace());
+            }
+            else if (event.error is ErrorEvent)
+            {
+                var errorEvent:ErrorEvent = event.error as ErrorEvent;
+                log(errorEvent.text);
+                abortInstallation(errorEvent.text);
+            }
+            else
+            {
+                // a non-Error, non-ErrorEvent type was thrown and uncaught
+                log(event.toString());
+                abortInstallation(event.toString());
+            }
+        }
+        
+        /**
+         * Define on ResourceManager all keys for translation.
+         * If some key is not present on any other language selected by user, the default value will be displayed
+         * on the screen
+         */
+        private function defineResourceManagerDefaultLanguage():void
+        {
+            selectDefaultLanguage();
+        }
+        
+        private function getIndexOfEnUS():int
+        {
+            for (var i:int = 0; i < _langSelect.dataProvider.length; i++) 
+            {
+                if(_langSelect.dataProvider.getItemAt(i).data == "en_US")
+                {
+                    return i;
+                }
+            }
+            return -1;
+        }
+        
+        private function updateWindowTitle():void
+        {
             if (_viewResourceConstants)
-    			this.nativeWindow.title = StringUtil.substitute(_viewResourceConstants.INFO_WINDOW_TITLE, [APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY]);
-		}
-		
-		protected function selectDefaultLanguageInEmergency():void {
+                this.nativeWindow.title = StringUtil.substitute(_viewResourceConstants.INFO_WINDOW_TITLE, [APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY]);
+        }
+        
+        protected function selectDefaultLanguageInEmergency():void
+        {
             loadLanguage("en_US", loadUSInEmergencyComplete);
         }
         
@@ -480,7 +487,8 @@ variables are not required because the locations of these pieces are known.
             _viewResourceConstants.update();
         }
         
-        protected function selectDefaultLanguage():void {
+        protected function selectDefaultLanguage():void
+        {
             loadLanguage("en_US", loadUSComplete);
         }
         private function loadUSComplete():void
@@ -529,7 +537,7 @@ variables are not required because the locations of these pieces are known.
                         languageURL = null;
                         installLanguage(userLocale, loader.data);
                         completeFunction();
-                        });
+                    });
                     loader.load(url);
                     return;
                 }
@@ -561,17 +569,18 @@ variables are not required because the locations of these pieces are known.
                 }
             }
             
-            resourceManager.addResourceBundle(resource);                
+            resourceManager.addResourceBundle(resource);
         }
         
         private function languageLoadErrorHandler(event:Event):void
         {
             log("Unable to load language file " + languageURL);
             log(event.toString());
-            abortInstallation("Unable to load language file " + languageURL);            
+            abortInstallation("Unable to load language file " + languageURL);
         }
         
-        private function defaultLanguageLoaded():void {
+        private function defaultLanguageLoaded():void
+        {
             resourceManager.localeChain = [ ViewResourceConstants.DEFAULT_LANGUAGE ];
             
             var userLocale:String = new StringTools(LocaleID.DEFAULT).actualLocaleIDName.replace("-", "_");
@@ -581,24 +590,24 @@ variables are not required because the locations of these pieces are known.
             }
             log("Using Locale: " + userLocale);
             
-			var n:int = supportedLanguages.length;
-			for (var i:int = 0; i < n; i++) {
-				if (supportedLanguages[i].data == userLocale) {
-					_langSelect.selectedIndex = i;
-					
-					resourceManager.localeChain = [ userLocale, "en_US" ];
-					
-					break;
-				}
-			}
+            var n:int = supportedLanguages.length;
+            for (var i:int = 0; i < n; i++) {
+                if (supportedLanguages[i].data == userLocale) {
+                    _langSelect.selectedIndex = i;
+                    
+                    resourceManager.localeChain = [ userLocale, "en_US" ];
+                    
+                    break;
+                }
+            }
             _viewResourceConstants = ViewResourceConstants.instance;
             
-			resourceManager.addEventListener(Event.CHANGE, _viewResourceConstants.update);
-			
-			_viewResourceConstants.update();
-			setButtonWidths();
-			directoryBtn.enabled = true;
-			
+            resourceManager.addEventListener(Event.CHANGE, _viewResourceConstants.update);
+            
+            _viewResourceConstants.update();
+            setButtonWidths();
+            directoryBtn.enabled = true;
+            
             updateWindow();
             
             _mirrorURLUtil.logMessages = new LogMessagesVO(_viewResourceConstants.FETCH_MIRROR_CGI, _viewResourceConstants.FETCH_MIRROR_CGI_DONE,
@@ -607,62 +616,67 @@ variables are not required because the locations of these pieces are known.
             _mirrorURLUtil.getMirrorURL(Constants.APACHE_FLEX_URL + _mirrorURLCGI, getMirrorURLResultHandler);
             CursorManager.removeBusyCursor();
             
-            checkValidOS();            
-		}
-		
-		protected function updateWindow():void {
-			updateWindowTitle();
-			
-			this.nativeWindow.x = Screen.mainScreen.bounds.width / 2 - this.nativeWindow.width / 2;
-			this.nativeWindow.y = Screen.mainScreen.bounds.height / 2 - this.nativeWindow.height / 2;
-		}
-		
-		protected function loadXML():void {
-			var request:URLRequest;
-			
-			if (configOverride != "") {
-				request = new URLRequest(configOverride);
-			} else {
-				request = new URLRequest(Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
-				//request = new URLRequest(Constants.CONFIG_XML_NAME);
-			}
-			
-			_loader = new URLLoader();
-			
-			try {
-				_loader.load(request);
-			} catch (error:Error) {
+            checkValidOS();
+        }
+        
+        protected function updateWindow():void
+        {
+            updateWindowTitle();
+            
+            this.nativeWindow.x = Screen.mainScreen.bounds.width / 2 - this.nativeWindow.width / 2;
+            this.nativeWindow.y = Screen.mainScreen.bounds.height / 2 - this.nativeWindow.height / 2;
+        }
+        
+        protected function loadXML():void
+        {
+            var request:URLRequest;
+            
+            if (configOverride != "") {
+                request = new URLRequest(configOverride);
+            } else {
+                request = new URLRequest(Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
+                //request = new URLRequest(Constants.CONFIG_XML_NAME);
+            }
+            
+            _loader = new URLLoader();
+            
+            try {
+                _loader.load(request);
+            } catch (error:Error) {
                 selectDefaultLanguageInEmergency();
                 log("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
-				log(_viewResourceConstants.ERROR_CONFIG_XML_LOAD + error.errorID + " " + error.message);
-				abortInstallation("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
-			}
-			
-			_loader.addEventListener(IOErrorEvent.IO_ERROR, xmlError, false, 0, true);
-			_loader.addEventListener(Event.COMPLETE, xmlLoaded, false, 0, true);
-		}
-		
-		protected function xmlError(event:IOErrorEvent):void {
+                log(_viewResourceConstants.ERROR_CONFIG_XML_LOAD + error.errorID + " " + error.message);
+                abortInstallation("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
+            }
+            
+            _loader.addEventListener(IOErrorEvent.IO_ERROR, xmlError, false, 0, true);
+            _loader.addEventListener(Event.COMPLETE, xmlLoaded, false, 0, true);
+        }
+        
+        protected function xmlError(event:IOErrorEvent):void
+        {
             selectDefaultLanguageInEmergency();
-			log("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);            
-			log(_viewResourceConstants.ERROR_CONFIG_XML_LOAD + event.errorID);
-			abortInstallation("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME + " " + event.toString());
-		}
-		
-		protected function xmlLoaded(event:Event):void {
-			if (setXMLVariables()) {
+            log("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
+            log(_viewResourceConstants.ERROR_CONFIG_XML_LOAD + event.errorID);
+            abortInstallation("Unable to load " + Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME + " " + event.toString());
+        }
+        
+        protected function xmlLoaded(event:Event):void
+        {
+            if (setXMLVariables()) {
                 _langSelect.dataProvider = supportedLanguages;
                 _langSelect.selectedIndex = getIndexOfEnUS();
-				_langSelect.enabled = true;
-				defineResourceManagerDefaultLanguage();
-			}
-		}
-		
-		protected function checkValidOS():void {
-			if (_os.isOther())
-				log(_viewResourceConstants.ERROR_UNSUPPORTED_OPERATING_SYSTEM);
-		}
-		
+                _langSelect.enabled = true;
+                defineResourceManagerDefaultLanguage();
+            }
+        }
+        
+        protected function checkValidOS():void
+        {
+            if (_os.isOther())
+                log(_viewResourceConstants.ERROR_UNSUPPORTED_OPERATING_SYSTEM);
+        }
+        
         private function devBuildFilterFunction(o:Object):Boolean
         {
             return !o.devBuild;
@@ -671,24 +685,24 @@ variables are not required because the locations of these pieces are known.
         private function debugModeHandler(event:Event):void
         {
             debugMode = true;
-			customMenuItem3.caption = "Verbose Logging Enabled";
+            customMenuItem3.caption = "Verbose Logging Enabled";
+        }
+        
+        private function debugProgressHandler(event:Event):void
+        {
+            logProgressEvents = true;
+            customMenuItem4.caption = "Logging Progress Events";
         }
         
-		private function debugProgressHandler(event:Event):void
-		{
-			logProgressEvents = true;
-			customMenuItem4.caption = "Logging Progress Events";
-		}
-		
         private function devBuildShowHandler(event:Event):void
         {
             var item:Object = flexVersion.selectedItem;
             FLEX_VERSIONS.filterFunction = null;
-            FLEX_VERSIONS.refresh();   
+            FLEX_VERSIONS.refresh();
             flexVersion.selectedItem = item;
-			customMenuItem1.caption = "Showing Dev Builds";
+            customMenuItem1.caption = "Showing Dev Builds";
         }
-
+        
         private function downloadCacheHandler(event:Event):void
         {
             var dlg:CacheDialog = new CacheDialog();
@@ -709,7 +723,8 @@ variables are not required because the locations of these pieces are known.
             so.flush();
         }
         
-		protected function setXMLVariables():Boolean {
+        protected function setXMLVariables():Boolean
+        {
             try 
             {
                 var data:XML = XML(_loader.data);
@@ -724,25 +739,25 @@ variables are not required because the locations of these pieces are known.
             if (firstTime)
             {
                 firstTime = false;
-    			
-    			_latestVersion = data.version.latest.toString();
-    			
-    			installerAppPath = data.installer.(@name == 'SDKInstallerApp').@path.toString();
-    			installerAppFileName = data.installer.(@name == 'SDKInstallerApp').@file.toString();
-    			
-    			_mirrorURLCGI = data.mirror.(@name == 'MirrorURLCGI').@file.toString();
                 
-				customMenuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, devBuildShowHandler);
-				customMenuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, downloadCacheHandler);
-				customMenuItem3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, debugModeHandler);
-				customMenuItem4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, debugProgressHandler);
-				
+                _latestVersion = data.version.latest.toString();
+                
+                installerAppPath = data.installer.(@name == 'SDKInstallerApp').@path.toString();
+                installerAppFileName = data.installer.(@name == 'SDKInstallerApp').@file.toString();
+                
+                _mirrorURLCGI = data.mirror.(@name == 'MirrorURLCGI').@file.toString();
+                
+                customMenuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, devBuildShowHandler);
+                customMenuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, downloadCacheHandler);
+                customMenuItem3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, debugModeHandler);
+                customMenuItem4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, debugProgressHandler);
+                
                 var contextMenuCustomItems:Array = ContextMenu(contextMenu).customItems;
                 contextMenuCustomItems.push(customMenuItem1);
                 contextMenuCustomItems.push(customMenuItem2);
                 contextMenuCustomItems.push(customMenuItem3);
-				contextMenuCustomItems.push(customMenuItem4);
-                			
+                contextMenuCustomItems.push(customMenuItem4);
+                
                 var name:String;
                 var versionString:String;
                 var versionID:String;
@@ -756,9 +771,9 @@ variables are not required because the locations of these pieces are known.
                 
                 var airData:XMLList = data.airsdk[_os.os].versions;
                 var airVersionList:XMLList = airData[0].children();
-    			var airVersions:Array = [];
-    			var selected:String = airData[0]["@default"].toString();
-    			for each (var airVersion:XML in airVersionList) {
+                var airVersions:Array = [];
+                var selected:String = airData[0]["@default"].toString();
+                for each (var airVersion:XML in airVersionList) {
                     var displayVersion:String = airVersion.@displayVersion.toString();
                     versionString = airVersion.@version.toString();
                     versionID = null;
@@ -767,14 +782,14 @@ variables are not required because the locations of these pieces are known.
                     airVersions.push(versionString);
                     var airPath:String = airVersion.path.toString();
                     var airFile:String = airVersion.file.toString();
-    				AIR_VERSIONS.addItem({label:"AIR " + displayVersion, version: versionString, versionID: versionID, 
-                                            path: airPath, file: airFile});
-    			}
-    			
-    			if (this.airVersion.selectedIndex == -1) {
-    				this.airVersion.selectedIndex = airVersions.indexOf(selected);	
-    			}
-    			
+                    AIR_VERSIONS.addItem({label:"AIR " + displayVersion, version: versionString, versionID: versionID, 
+                        path: airPath, file: airFile});
+                }
+                
+                if (this.airVersion.selectedIndex == -1) {
+                    this.airVersion.selectedIndex = airVersions.indexOf(selected);
+                }
+                
                 var flexData:XMLList = data.products.children();
                 var selectedFlexVersion:int;
                 for each (var productData:XML in flexData)
@@ -803,182 +818,184 @@ variables are not required because the locations of these pieces are known.
                             needsAIR: needsAIR, needsFlash: needsFlash, devBuild: devBuild, icon: icon});
                     }
                 }
-    			
+                
                 FLEX_VERSIONS.filterFunction = devBuildFilterFunction;
                 FLEX_VERSIONS.refresh();
                 flexVersion.validateNow();
                 
-    			if (this.flexVersion.selectedIndex == -1) {
-    				this.flexVersion.selectedIndex = selectedFlexVersion;
-    			}
+                if (this.flexVersion.selectedIndex == -1) {
+                    this.flexVersion.selectedIndex = selectedFlexVersion;
+                }
+                
+                var selectedFlexVersionObject:Object = this.flexVersion.selectedItem;
+                updateFlexVersionStrings(selectedFlexVersionObject);
+                
+                if (!APACHE_FLEX_BIN_DISTRO_FILE || !APACHE_FLEX_BIN_DISTRO_PATH) {
+                    log(_viewResourceConstants.ERROR_INVALID_SDK_URL);
+                    keepGoing = false;
+                }
                 
-    			var selectedFlexVersionObject:Object = this.flexVersion.selectedItem;
-    			updateFlexVersionStrings(selectedFlexVersionObject);
-    			
-    			if (!APACHE_FLEX_BIN_DISTRO_FILE || !APACHE_FLEX_BIN_DISTRO_PATH) {
-    				log(_viewResourceConstants.ERROR_INVALID_SDK_URL);
-    				keepGoing = false;
-    			}
-    			
                 var flashData:XMLList = data.flashsdk.versions;
                 var flashVersionList:XMLList = flashData[0].children();
                 var flashPlayerVersions:Array = [];
                 selected = flashData[0]["@default"].toString();
-    			for each (var flashVersion:XML in flashVersionList) {
+                for each (var flashVersion:XML in flashVersionList) {
                     displayVersion = flashVersion.@displayVersion.toString();
                     versionString = flashVersion.@version.toString();
                     versionID = null;
                     if (flashVersion.@versionID.length() > 0)
                         versionID = flashVersion.@versionID.toString();
                     flashPlayerVersions.push(versionString);
-    				if (!_os.isLinux() || Number(versionString) <= 11.2) {
-    					var swfVersion:String = flashVersion.swfversion.toString();
+                    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,
+                        FLASH_PLAYER_VERSIONS.addItem({label:"Flash Player " + displayVersion, version:versionString, swfVersion:swfVersion,
                             versionID: versionID, path: flashPath, file: flashFile});
-    				}
-    			}
-    			
-    			if (this.flashPlayerVersion.selectedIndex == -1) {
-    				this.flashPlayerVersion.selectedIndex = flashPlayerVersions.indexOf(selected);	
-    			}
-            }
-            
-			ADOBE_AIR_SDK_WIN_FILE = data.airsdk.windows.versions.children().(@version==AIR_VERSION).file.toString();
-			ADOBE_AIR_SDK_WIN_URL = data.airsdk.windows.versions.children().(@version==AIR_VERSION).path.toString();
-			if (_os.isWindows() && (!ADOBE_AIR_SDK_WIN_FILE || !ADOBE_AIR_SDK_WIN_URL)) {
-				log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_WINDOWS);
-				keepGoing = false;
-			}
-			ADOBE_AIR_SDK_WIN_URL += ADOBE_AIR_SDK_WIN_FILE;
-			
-			ADOBE_AIR_SDK_MAC_FILE = data.airsdk.mac.versions.children().(@version==AIR_VERSION).file.toString();
-			ADOBE_AIR_SDK_MAC_URL = data.airsdk.mac.versions.children().(@version==AIR_VERSION).path.toString();
-			if (_os.isMac() && (!ADOBE_AIR_SDK_MAC_FILE || !ADOBE_AIR_SDK_MAC_URL)) {
-				log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_MAC);
-				keepGoing = false;
-			}
-			ADOBE_AIR_SDK_MAC_URL += ADOBE_AIR_SDK_MAC_FILE;
-			
-			ADOBE_AIR_SDK_LINUX_FILE = data.airsdk.linux.versions.children().(@version==AIR_VERSION).file.toString();
-			ADOBE_AIR_SDK_LINUX_URL = data.airsdk.linux.versions.children().(@version==AIR_VERSION).path.toString();
-			if (_os.isLinux() && (!ADOBE_AIR_SDK_LINUX_FILE || !ADOBE_AIR_SDK_LINUX_URL)) {
-				log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_LINUX);
-				keepGoing = false;
-			}
-			ADOBE_AIR_SDK_LINUX_URL += ADOBE_AIR_SDK_LINUX_FILE;
-			
-			ADOBE_FB_GLOBALPLAYER_SWC_FILE = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).file.toString();
-			ADOBE_FB_GLOBALPLAYER_SWC_URL = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).path.toString();
-			FLASH_PLAYER_SWF_VERSION = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).swfversion.toString();
-			if (!ADOBE_FB_GLOBALPLAYER_SWC_FILE || !ADOBE_FB_GLOBALPLAYER_SWC_URL) {
-				log(_viewResourceConstants.ERROR_INVALID_FLASH_PLAYER_SWC_URL);
-				keepGoing = false;
-			}
-			ADOBE_FB_GLOBALPLAYER_SWC_URL += ADOBE_FB_GLOBALPLAYER_SWC_FILE;
-			
-			SWF_OBJECT_FILE = data.swfobject.@file.toString();
-			SWF_OBJECT_URL = data.swfobject.@path.toString();
-			
-			//Supporting OSMF 2.0 from 4.11 onwards.  
-			if(APACHE_FLEX_BIN_DISTRO_VERSION == "4.9.1" || APACHE_FLEX_BIN_DISTRO_VERSION == "4.10.0" )
-			{
-				OSMF_SWC_FILE = data.OSMF_SWC.@file.toString();
-				OSMF_SWC_URL = data.OSMF_SWC.@path.toString();
-				_useOSMF2 = false;
-			}
-			else
-			{
-				OSMF_SWC_FILE = data["OSMF_SWC_2.0"].@file.toString();
-				OSMF_SWC_URL = data["OSMF_SWC_2.0"].@path.toString();
-				_useOSMF2 = true;
-			}
-			
-			BLAZEDS_FILE = data.BlazeDS.@file.toString();
-			BLAZEDS_URL = data.BlazeDS.@path.toString();
-			
-			AFE_FILE = data.fontswf.afe.@file.toString();
-			AFE_URL = data.fontswf.afe.@path.toString();
-			
-			AGLJ40_FILE = data.fontswf.aglj40.@file.toString();
-			AGLJ40_URL = data.fontswf.aglj40.@path.toString();
-			
-			FLEX_FONTKIT_FILE = data.fontswf["flex-fontkit"].@file.toString();
-			FLEX_FONTKIT_URL = data.fontswf["flex-fontkit"].@path.toString();
-			
-			RIDEAU_FILE = data.fontswf.rideau.@file.toString();
-			RIDEAU_URL = data.fontswf.rideau.@path.toString();
-			
-			
-			return keepGoing;
-		}
-		
-		protected function updateFlexVersionStrings(selectedFlexVersionObject:Object):void
-		{
-			APACHE_FLEX_BIN_DISTRO_FILE_SHORT = selectedFlexVersionObject.shortName;
-			APACHE_FLEX_BIN_DISTRO_VERSION = selectedFlexVersionObject.version;
-			APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY = selectedFlexVersionObject.label;
-			
-			APACHE_FLEX_BIN_DISTRO_FILE = selectedFlexVersionObject.fileName;
-			APACHE_FLEX_BIN_DISTRO_PATH = selectedFlexVersionObject.path;
-			legacy =  selectedFlexVersionObject.legacy;
+                    }
+                }
+                
+                if (this.flashPlayerVersion.selectedIndex == -1) {
+                    this.flashPlayerVersion.selectedIndex = flashPlayerVersions.indexOf(selected);
+                }
+            }
+            
+            ADOBE_AIR_SDK_WIN_FILE = data.airsdk.windows.versions.children().(@version==AIR_VERSION).file.toString();
+            ADOBE_AIR_SDK_WIN_URL = data.airsdk.windows.versions.children().(@version==AIR_VERSION).path.toString();
+            if (_os.isWindows() && (!ADOBE_AIR_SDK_WIN_FILE || !ADOBE_AIR_SDK_WIN_URL)) {
+                log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_WINDOWS);
+                keepGoing = false;
+            }
+            ADOBE_AIR_SDK_WIN_URL += ADOBE_AIR_SDK_WIN_FILE;
+            
+            ADOBE_AIR_SDK_MAC_FILE = data.airsdk.mac.versions.children().(@version==AIR_VERSION).file.toString();
+            ADOBE_AIR_SDK_MAC_URL = data.airsdk.mac.versions.children().(@version==AIR_VERSION).path.toString();
+            if (_os.isMac() && (!ADOBE_AIR_SDK_MAC_FILE || !ADOBE_AIR_SDK_MAC_URL)) {
+                log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_MAC);
+                keepGoing = false;
+            }
+            ADOBE_AIR_SDK_MAC_URL += ADOBE_AIR_SDK_MAC_FILE;
+            
+            ADOBE_AIR_SDK_LINUX_FILE = data.airsdk.linux.versions.children().(@version==AIR_VERSION).file.toString();
+            ADOBE_AIR_SDK_LINUX_URL = data.airsdk.linux.versions.children().(@version==AIR_VERSION).path.toString();
+            if (_os.isLinux() && (!ADOBE_AIR_SDK_LINUX_FILE || !ADOBE_AIR_SDK_LINUX_URL)) {
+                log(_viewResourceConstants.ERROR_INVALID_AIR_SDK_URL_LINUX);
+                keepGoing = false;
+            }
+            ADOBE_AIR_SDK_LINUX_URL += ADOBE_AIR_SDK_LINUX_FILE;
+            
+            ADOBE_FB_GLOBALPLAYER_SWC_FILE = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).file.toString();
+            ADOBE_FB_GLOBALPLAYER_SWC_URL = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).path.toString();
+            FLASH_PLAYER_SWF_VERSION = data.flashsdk.versions.children().(@version==FLASH_PLAYER_VERSION).swfversion.toString();
+            if (!ADOBE_FB_GLOBALPLAYER_SWC_FILE || !ADOBE_FB_GLOBALPLAYER_SWC_URL) {
+                log(_viewResourceConstants.ERROR_INVALID_FLASH_PLAYER_SWC_URL);
+                keepGoing = false;
+            }
+            ADOBE_FB_GLOBALPLAYER_SWC_URL += ADOBE_FB_GLOBALPLAYER_SWC_FILE;
+            
+            SWF_OBJECT_FILE = data.swfobject.@file.toString();
+            SWF_OBJECT_URL = data.swfobject.@path.toString();
+            
+            //Supporting OSMF 2.0 from 4.11 onwards.  
+            if(APACHE_FLEX_BIN_DISTRO_VERSION == "4.9.1" || APACHE_FLEX_BIN_DISTRO_VERSION == "4.10.0" )
+            {
+                OSMF_SWC_FILE = data.OSMF_SWC.@file.toString();
+                OSMF_SWC_URL = data.OSMF_SWC.@path.toString();
+                _useOSMF2 = false;
+            }
+            else
+            {
+                OSMF_SWC_FILE = data["OSMF_SWC_2.0"].@file.toString();
+                OSMF_SWC_URL = data["OSMF_SWC_2.0"].@path.toString();
+                _useOSMF2 = true;
+            }
+            
+            BLAZEDS_FILE = data.BlazeDS.@file.toString();
+            BLAZEDS_URL = data.BlazeDS.@path.toString();
+            
+            AFE_FILE = data.fontswf.afe.@file.toString();
+            AFE_URL = data.fontswf.afe.@path.toString();
+            
+            AGLJ40_FILE = data.fontswf.aglj40.@file.toString();
+            AGLJ40_URL = data.fontswf.aglj40.@path.toString();
+            
+            FLEX_FONTKIT_FILE = data.fontswf["flex-fontkit"].@file.toString();
+            FLEX_FONTKIT_URL = data.fontswf["flex-fontkit"].@path.toString();
+            
+            RIDEAU_FILE = data.fontswf.rideau.@file.toString();
+            RIDEAU_URL = data.fontswf.rideau.@path.toString();
+            
+            
+            return keepGoing;
+        }
+        
+        protected function updateFlexVersionStrings(selectedFlexVersionObject:Object):void
+        {
+            APACHE_FLEX_BIN_DISTRO_FILE_SHORT = selectedFlexVersionObject.shortName;
+            APACHE_FLEX_BIN_DISTRO_VERSION = selectedFlexVersionObject.version;
+            APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY = selectedFlexVersionObject.label;
+            
+            APACHE_FLEX_BIN_DISTRO_FILE = selectedFlexVersionObject.fileName;
+            APACHE_FLEX_BIN_DISTRO_PATH = selectedFlexVersionObject.path;
+            legacy =  selectedFlexVersionObject.legacy;
             nocache = selectedFlexVersionObject.nocache;
             APACHE_FLEX_BIN_INSTALLER_FILE = selectedFlexVersionObject.prefix + "installer-config.xml";
             
-			// ApacheFlex is full URL so download directly and dont use mirror useful for testing release candidates
-			if (APACHE_FLEX_BIN_DISTRO_PATH.indexOf("http") == 0) {
-				_useMirror = false;
-			}
-			else
-			{
-				_useMirror = true;
-			}
-		}
-		
-		private function useMirrorPath(path:String):String {
-			if (_useMirror) {
-				return path;
-			}
-			
-			return "";
-		}
-		
-		private function getMirrorURLResultHandler():void {
-			var logMessages:ArrayCollection = ILog(_mirrorURLUtil).log;
-			var i:int;
-			var n:int = logMessages.length;
-			for (i = 0; i < n; i++) {
-				log(String(logMessages.getItemAt(i)));
-			}
-			
-			if (_mirrorURLUtil.errorOccurred) {
-				abortInstallation("mirrorURLUtil.errorOccurred");
+            // ApacheFlex is full URL so download directly and dont use mirror useful for testing release candidates
+            if (APACHE_FLEX_BIN_DISTRO_PATH.indexOf("http") == 0) {
+                _useMirror = false;
+            }
+            else
+            {
+                _useMirror = true;
+            }
+        }
+        
+        private function useMirrorPath(path:String):String
+        {
+            if (_useMirror) {
+                return path;
+            }
+            
+            return "";
+        }
+        
+        private function getMirrorURLResultHandler():void
+        {
+            var logMessages:ArrayCollection = ILog(_mirrorURLUtil).log;
+            var i:int;
+            var n:int = logMessages.length;
+            for (i = 0; i < n; i++) {
+                log(String(logMessages.getItemAt(i)));
+            }
+            
+            if (_mirrorURLUtil.errorOccurred) {
+                abortInstallation("mirrorURLUtil.errorOccurred");
                 main();
-			} else {
+            } else {
                 updatePaths();
-			}
-			
-		}
-
+            }
+            
+        }
+        
         protected function updatePaths():void
         {
             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_PATH.substr(0, Constants.HTTPS_PREFIX.length) == Constants.HTTPS_PREFIX) {
                 APACHE_FLEX_BIN_DISTRO_URL = APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE;
-				if (stepsOverride != "") {
-					APACHE_FLEX_BIN_INSTALLER_URL = stepsOverride;
-				} else {
-                	APACHE_FLEX_BIN_INSTALLER_URL = APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_INSTALLER_FILE;
-				}
+                if (stepsOverride != "") {
+                    APACHE_FLEX_BIN_INSTALLER_URL = stepsOverride;
+                } else {
+                    APACHE_FLEX_BIN_INSTALLER_URL = APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_INSTALLER_FILE;
+                }
             } else {
                 APACHE_FLEX_BIN_DISTRO_URL = useMirrorPath(_mirrorURLUtil.mirrorURL) + APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE;
-               	if (stepsOverride != "") {
-					APACHE_FLEX_BIN_INSTALLER_URL = stepsOverride;
-				} else {
-					APACHE_FLEX_BIN_INSTALLER_URL = MD5CompareUtil.MD5_DOMAIN + APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_INSTALLER_FILE;
-				}
+                if (stepsOverride != "") {
+                    APACHE_FLEX_BIN_INSTALLER_URL = stepsOverride;
+                } else {
+                    APACHE_FLEX_BIN_INSTALLER_URL = MD5CompareUtil.MD5_DOMAIN + APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_INSTALLER_FILE;
+                }
             }
             
             if (installerAppPath.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX) {
@@ -988,13 +1005,14 @@ variables are not required because the locations of these pieces are known.
             main();
         }
         
-		protected function main():void {
-			
-			if (shouldUpdate()) {
-				doUpdate();
-			}
-		}
-
+        protected function main():void
+        {
+            
+            if (shouldUpdate()) {
+                doUpdate();
+            }
+        }
+        
         private function logVersion():void
         {
             if (!loggedVersion)
@@ -1003,90 +1021,96 @@ variables are not required because the locations of these pieces are known.
                 var applicationDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
                 var xmlns:Namespace = new Namespace(applicationDescriptor.namespace());
                 var currentVersion:String = applicationDescriptor.xmlns::versionNumber.toString();
-
+                
                 // Log the Installer version to help with any support issues that arise.
                 log("Installer version " + currentVersion + " (" + _os.os + ")", 0);
                 loggedVersion = true;
             }
         }
         
-		protected function shouldUpdate():Boolean {
-			var shouldUpdate:Boolean = false;
-			//Current version
-			var applicationDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
-			var xmlns:Namespace = new Namespace(applicationDescriptor.namespace());
-			var currentVersion:String = applicationDescriptor.xmlns::versionNumber.toString();
-			
+        protected function shouldUpdate():Boolean
+        {
+            var shouldUpdate:Boolean = false;
+            //Current version
+            var applicationDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
+            var xmlns:Namespace = new Namespace(applicationDescriptor.namespace());
+            var currentVersion:String = applicationDescriptor.xmlns::versionNumber.toString();
+            
             logVersion();
             
-			var availBuildNumbers:Array = _latestVersion.split(".");
-			var currentBuildNumbers:Array = currentVersion.split(".");
-			
-			if (parseInt(availBuildNumbers[0]) > parseInt(currentBuildNumbers[0])) {
-				return true;
-			} else if (parseInt(availBuildNumbers[0]) == parseInt(currentBuildNumbers[0])) {
-				if (parseInt(availBuildNumbers[1]) > parseInt(currentBuildNumbers[1])) {
-					return true;
-				} else if (parseInt(availBuildNumbers[1]) == parseInt(currentBuildNumbers[1])) {
-					if (parseInt(availBuildNumbers[2]) > parseInt(currentBuildNumbers[2])) {
-						return true;
-					}
-				}
-			}
-			return false;
-			
-		}
-		
-		protected function doUpdate():void {
-			var updaterDialog:UpdaterDialog = UpdaterDialog(PopUpManager.createPopUp(this, UpdaterDialog, true));
-			updaterDialog.addEventListener("close", handleUpdaterDialogClose);
-			updaterDialog.latestVersion = _latestVersion;
-			PopUpManager.centerPopUp(updaterDialog);
-		}
-		
-		protected function handleUpdaterDialogClose(event:Event):void {
-			PopUpManager.removePopUp(IFlexDisplayObject(event.target));
-		}
-		
-		protected function handleInstallBtnClick(event:MouseEvent):void {
-			if (flexSDKTxtInput.text == "") {
-				log(_viewResourceConstants.INFO_ENTER_VALID_FLEX_SDK_PATH);
-			} else {
-				_langSelect.enabled = false;
-				_flexHome = flexSDKTxtInput.text;
-				resetInstallStepsActivity();
-				addOptionalComponentsToInstallSteps();
-				this.currentState = "installState";
-    			install();
-			}
-		}
-		
-		protected function handleZeroStepNextBtnClick(event:MouseEvent):void {	
-			directoryBtn.enabled = false;
-			
-			AIR_VERSION = airVersion.selectedItem.version;
-			var airVersionID:String = airVersion.selectedItem.versionID;
-			FLASH_PLAYER_VERSION = flashPlayerVersion.selectedItem.version;
-			var flashVersionID:String = flashPlayerVersion.selectedItem.versionID;
-			
-			setXMLVariables(); // as AIR and Flash version may of changed
-			
-			log("SDK version " + APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY);
-			
-			if (flexVersion.selectedItem.needsAIR) {
-				if (airVersionID)
-					log("AIR version " + airVersionID);
-				else
-					log("AIR version " + AIR_VERSION);
-			}
-			
-			if (flexVersion.selectedItem.needsFlash) {
-				if (flashVersionID)
-					log("Flash Player version " + flashVersionID);
-				else
-					log("Flash Player version " + FLASH_PLAYER_VERSION);
-			}
-			
+            var availBuildNumbers:Array = _latestVersion.split(".");
+            var currentBuildNumbers:Array = currentVersion.split(".");
+            
+            if (parseInt(availBuildNumbers[0]) > parseInt(currentBuildNumbers[0])) {
+                return true;
+            } else if (parseInt(availBuildNumbers[0]) == parseInt(currentBuildNumbers[0])) {
+                if (parseInt(availBuildNumbers[1]) > parseInt(currentBuildNumbers[1])) {
+                    return true;
+                } else if (parseInt(availBuildNumbers[1]) == parseInt(currentBuildNumbers[1])) {
+                    if (parseInt(availBuildNumbers[2]) > parseInt(currentBuildNumbers[2])) {
+                        return true;
+                    }
+                }
+            }
+            return false;
+            
+        }
+        
+        protected function doUpdate():void
+        {
+            var updaterDialog:UpdaterDialog = UpdaterDialog(PopUpManager.createPopUp(this, UpdaterDialog, true));
+            updaterDialog.addEventListener("close", handleUpdaterDialogClose);
+            updaterDialog.latestVersion = _latestVersion;
+            PopUpManager.centerPopUp(updaterDialog);
+        }
+        
+        protected function handleUpdaterDialogClose(event:Event):void
+        {
+            PopUpManager.removePopUp(IFlexDisplayObject(event.target));
+        }
+        
+        protected function handleInstallBtnClick(event:MouseEvent):void
+        {
+            if (flexSDKTxtInput.text == "") {
+                log(_viewResourceConstants.INFO_ENTER_VALID_FLEX_SDK_PATH);
+            } else {
+                _langSelect.enabled = false;
+                _flexHome = flexSDKTxtInput.text;
+                resetInstallStepsActivity();
+                addOptionalComponentsToInstallSteps();
+                this.currentState = "installState";
+                install();
+            }
+        }
+        
+        protected function handleZeroStepNextBtnClick(event:MouseEvent):void
+        {
+            directoryBtn.enabled = false;
+            
+            AIR_VERSION = airVersion.selectedItem.version;
+            var airVersionID:String = airVersion.selectedItem.versionID;
+            FLASH_PLAYER_VERSION = flashPlayerVersion.selectedItem.version;
+            var flashVersionID:String = flashPlayerVersion.selectedItem.versionID;
+            
+            setXMLVariables(); // as AIR and Flash version may of changed
+            
+            log("SDK version " + APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY);
+            
+            if (flexVersion.selectedItem.needsAIR) {
+            
+                if (airVersionID)
+                    log("AIR version " + airVersionID);
+                else
+                    log("AIR version " + AIR_VERSION);
+            }
+            
+            if (flexVersion.selectedItem.needsFlash) {
+                if (flashVersionID)
+                    log("Flash Player version " + flashVersionID);
+                else
+                    log("Flash Player version " + FLASH_PLAYER_VERSION);
+            }
+            
             if (!legacy)
             {
                 var req:URLRequest = new URLRequest(APACHE_FLEX_BIN_INSTALLER_URL);
@@ -1120,7 +1144,8 @@ variables are not required because the locations of these pieces are known.
             showOptionsState();
         }
         
-        protected function handleInstallerXMLLoaded(event:Event):void {
+        protected function handleInstallerXMLLoaded(event:Event):void
+        {
             var data:XML = XML(event.target.data);
             var localeList:Array = resourceManager.localeChain;
             _installerComponentsDataProvider = new ArrayCollection();
@@ -1184,7 +1209,8 @@ variables are not required because the locations of these pieces are known.
             return "";
         }
         
-        protected function handleInstallerXMLError(event:Event):void {
+        protected function handleInstallerXMLError(event:Event):void
+        {
             log("Unable to load " + APACHE_FLEX_BIN_INSTALLER_URL);
             abortInstallation("Unable to load " + APACHE_FLEX_BIN_INSTALLER_URL);
         }
@@ -1197,41 +1223,45 @@ variables are not required because the locations of these pieces are known.
             currentState = "directoryState";
         }
         
-        protected function showOptionsState():void {
-			currentState = "optionsState";
-		}
-		
-		protected function initiateInstallStepsActivity():void {
-			_installationSteps = new ArrayCollection();
-			
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_CREATE_DIRECTORIES));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_VERIFY_FLEX_SDK));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_UNZIP_FLEX_SDK));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_UNZIP_AIR_RUNTIME_KIT));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_INSTALL_CONFIG_FILES));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_SWFOBJECT));
-			_installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF));
-		}
-		
-		protected function resetInstallStepsActivity():void {
-			for each(var step:StepItem in _installationSteps) {
-				step.status = StepItem.NORMAL;
-			}
-		}
-		
-		protected function addOptionalComponentsToInstallSteps():void {
+        protected function showOptionsState():void
+        {
+            currentState = "optionsState";
+        }
+        
+        protected function initiateInstallStepsActivity():void
+        {
+            _installationSteps = new ArrayCollection();
+            
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_CREATE_DIRECTORIES));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_VERIFY_FLEX_SDK));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_UNZIP_FLEX_SDK));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_UNZIP_AIR_RUNTIME_KIT));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_INSTALL_CONFIG_FILES));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_SWFOBJECT));
+            _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF));
+        }
+        
+        protected function resetInstallStepsActivity():void
+        {
+            for each(var step:StepItem in _installationSteps) {
+                step.status = StepItem.NORMAL;
+            }
+        }
+        
+        protected function addOptionalComponentsToInstallSteps():void
+        {
             if (usingXML)
             {
                 _installationSteps = new ArrayCollection();
-
+                
                 _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_CREATE_DIRECTORIES));
                 _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK));
                 _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_VERIFY_FLEX_SDK));
                 _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_UNZIP_FLEX_SDK));
-
+                
                 for each (var stepData:XML in installStepsData) {
                     var propName:String = stepData.@property.toString();
                     if (!propName || InstallerComponentVO(licensePropertyMap[propName]).selected)
@@ -1244,90 +1274,96 @@ variables are not required because the locations of these pieces are known.
                 }
                 return;
             }
-			for each (var obj:InstallerComponentVO in _installerComponentsDataProvider) {
-				if (!obj.required && obj.selected) {
-					_installationSteps.addItem(new StepItem(obj.label));
-				}
-			}
-		}
-		
-		protected function initializeInstallerComponentsDataProvider():void {
-			_installerComponentsDataProvider = new ArrayCollection();
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK,
-				_viewResourceConstants.ASK_APACHE_FLEX, _viewResourceConstants.LICENSE_APACHE_V2,
-				_viewResourceConstants.LICENSE_URL_APACHE_V2,
-				"STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK", true));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK,
-				_viewResourceConstants.ASK_ADOBE_AIR_SDK,
-				_viewResourceConstants.LICENSE_ADOBE_AIR_SDK,
-				_viewResourceConstants.LICENSE_URL_ADOBE_AIR_SDK,
-				"STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK", true));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC,
-				_viewResourceConstants.ASK_ADOBE_FLASH_PLAYER_GLOBAL_SWC,
-				_viewResourceConstants.LICENSE_ADOBE_SDK,
-				_viewResourceConstants.LICENSE_URL_ADOBE_SDK,
-				"STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC", true));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_SWFOBJECT,
-				_viewResourceConstants.ASK_SWFOBJECT, _viewResourceConstants.LICENSE_SWFOBJECT,
-				_viewResourceConstants.LICENSE_URL_SWFOBJECT, "STEP_REQUIRED_INSTALL_SWFOBJECT",
-				true));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF,
-				_viewResourceConstants.ASK_OSMF, _viewResourceConstants.LICENSE_OSMF,
-				_viewResourceConstants.LICENSE_URL_OSMF, "STEP_REQUIRED_INSTALL_OSMF", true));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_OPTIONAL_INSTALL_FONTSWF,
-				_viewResourceConstants.ASK_FONTSWF, _viewResourceConstants.LICENSE_FONTSWF,
-				_viewResourceConstants.LICENSE_URL_FONTSWF, "STEP_OPTIONAL_INSTALL_FONTSWF",
-				false));
-			_installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_OPTIONAL_INSTALL_BLAZEDS,
-				_viewResourceConstants.ASK_BLAZEDS, _viewResourceConstants.LICENSE_BLAZEDS,
-				_viewResourceConstants.LICENSE_URL_BLAZEDS, "STEP_OPTIONAL_INSTALL_BLAZEDS",
-				false));
-		}
-		
-		protected function install():void {
-			createDirectories();
-		}
-		
-		protected function handleAirVersionChange(event:Event):void {
-			AIR_VERSION = airVersion.selectedItem.version;
-			
-			// Match AIR and Flash versions
-			if (flashPlayerVersion.selectedIndex != airVersion.selectedIndex) {
-				flashPlayerVersion.selectedIndex = airVersion.selectedIndex;
-				FLASH_PLAYER_VERSION = FLASH_PLAYER_VERSIONS[airVersion.selectedIndex].version;
-			}
-		}
-		
-		protected function handleFlashPlayerVersionChange(event:Event):void {
-			FLASH_PLAYER_VERSION = flashPlayerVersion.selectedItem.version;
-			
-			// Match AIR and Flash versions
-			if (airVersion.selectedIndex != flashPlayerVersion.selectedIndex) {
-				airVersion.selectedIndex = flashPlayerVersion.selectedIndex;
-				AIR_VERSION = AIR_VERSIONS[flashPlayerVersion.selectedIndex].version;
-			}
-		}
-		
-		protected function handleFlexVersionChange(event:Event):void {
-			/*APACHE_FLEX_BIN_DISTRO_VERSION =  flexVersion.selectedItem.version;
-			APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY = flexVersion.selectedItem.label;*/
-            var item:Object = flexVersion.selectedItem;
-            airVersion.enabled = item.needsAIR;
-            flashPlayerVersion.enabled = item.needsFlash;
-			updateFlexVersionStrings(item);
-			updatePaths();
-			updateWindowTitle();
-            InstallApacheFlexSkin(skin).textIcon.source = item.icon;
-		}
-		
-		protected function browseForSDK(event:MouseEvent):void {
-			var file:File = new File();
-			
-			file.addEventListener(Event.SELECT, flexSDKDirSelected, false, 0, true);
-			file.browseForDirectory(_viewResourceConstants.INFO_SELECT_DIRECTORY);
-		}
-        
-        protected function checkDirWritable(file:File):void
+            for each (var obj:InstallerComponentVO in _installerComponentsDataProvider) {
+                if (!obj.required && obj.selected) {
+                    _installationSteps.addItem(new StepItem(obj.label));
+                }
+            }
+        }
+        
+        protected function initializeInstallerComponentsDataProvider():void
+        {
+            _installerComponentsDataProvider = new ArrayCollection();
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK,
+                _viewResourceConstants.ASK_APACHE_FLEX, _viewResourceConstants.LICENSE_APACHE_V2,
+                _viewResourceConstants.LICENSE_URL_APACHE_V2,
+                "STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK", true));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK,
+                _viewResourceConstants.ASK_ADOBE_AIR_SDK,
+                _viewResourceConstants.LICENSE_ADOBE_AIR_SDK,
+                _viewResourceConstants.LICENSE_URL_ADOBE_AIR_SDK,
+                "STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK", true));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC,
+                _viewResourceConstants.ASK_ADOBE_FLASH_PLAYER_GLOBAL_SWC,
+                _viewResourceConstants.LICENSE_ADOBE_SDK,
+                _viewResourceConstants.LICENSE_URL_ADOBE_SDK,
+                "STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC", true));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_SWFOBJECT,
+                _viewResourceConstants.ASK_SWFOBJECT, _viewResourceConstants.LICENSE_SWFOBJECT,
+                _viewResourceConstants.LICENSE_URL_SWFOBJECT, "STEP_REQUIRED_INSTALL_SWFOBJECT",
+                true));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF,
+                _viewResourceConstants.ASK_OSMF, _viewResourceConstants.LICENSE_OSMF,
+                _viewResourceConstants.LICENSE_URL_OSMF, "STEP_REQUIRED_INSTALL_OSMF", true));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_OPTIONAL_INSTALL_FONTSWF,
+                _viewResourceConstants.ASK_FONTSWF, _viewResourceConstants.LICENSE_FONTSWF,
+                _viewResourceConstants.LICENSE_URL_FONTSWF, "STEP_OPTIONAL_INSTALL_FONTSWF",
+                false));
+            _installerComponentsDataProvider.addItem(new InstallerComponentVO(_viewResourceConstants.STEP_OPTIONAL_INSTALL_BLAZEDS,
+                _viewResourceConstants.ASK_BLAZEDS, _viewResourceConstants.LICENSE_BLAZEDS,
+                _viewResourceConstants.LICENSE_URL_BLAZEDS, "STEP_OPTIONAL_INSTALL_BLAZEDS",
+                false));
+        }
+        
+        protected function install():void
+        {
+            createDirectories();
+        }
+        
+        protected function handleAirVersionChange(event:Event):void
+        {
+            AIR_VERSION = airVersion.selectedItem.version;
+            
+            // Match AIR and Flash versions
+            if (flashPlayerVersion.selectedIndex != airVersion.selectedIndex) {
+                flashPlayerVersion.selectedIndex = airVersion.selectedIndex;
+                FLASH_PLAYER_VERSION = FLASH_PLAYER_VERSIONS[airVersion.selectedIndex].version;
+            }
+        }
+        
+        protected function handleFlashPlayerVersionChange(event:Event):void
+        {
+            FLASH_PLAYER_VERSION = flashPlayerVersion.selectedItem.version;
+            
+            // Match AIR and Flash versions
+            if (airVersion.selectedIndex != flashPlayerVersion.selectedIndex) {
+                airVersion.selectedIndex = flashPlayerVersion.selectedIndex;
+                AIR_VERSION = AIR_VERSIONS[flashPlayerVersion.selectedIndex].version;
+            }
+        }
+        
+        protected function handleFlexVersionChange(event:Event):void
+        {
+            /*APACHE_FLEX_BIN_DISTRO_VERSION =  flexVersion.selectedItem.version;
+            APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY = flexVersion.selectedItem.label;*/
+            var item:Object = flexVersion.selectedItem;
+            airVersion.enabled = item.needsAIR;
+            flashPlayerVersion.enabled = item.needsFlash;
+            updateFlexVersionStrings(item);
+            updatePaths();
+            updateWindowTitle();
+            InstallApacheFlexSkin(skin).textIcon.source = item.icon;
+        }
+        
+        protected function browseForSDK(event:MouseEvent):void
+        {
+            var file:File = new File();
+            
+            file.addEventListener(Event.SELECT, flexSDKDirSelected, false, 0, true);
+            file.browseForDirectory(_viewResourceConstants.INFO_SELECT_DIRECTORY);
+        }
+        
+        protected function checkDirWritable(file:File):void
         {
             var ba:ByteArray = new ByteArray();
             ba.writeUTFBytes("1");
@@ -1337,10 +1373,10 @@ variables are not required because the locations of these pieces are known.
         
         protected function flexSDKDirSelected(event:Event):void
         {
-        	var selectedDir:File = File(event.target);
-			var overlay:Boolean = flexVersion.selectedItem.overlay;
+            var selectedDir:File = File(event.target);
+            var overlay:Boolean = flexVersion.selectedItem.overlay;
             
-			// Quick check to see if the selected directory is writable
+            // Quick check to see if the selected directory is writable
             try {
                 var f:File = new File(selectedDir.nativePath + File.separator + "flex.txt");
                 checkDirWritable(f);
@@ -1355,21 +1391,21 @@ variables are not required because the locations of these pieces are known.
             }
            
             overlaying = overlay;
-			if (!overlay)
+            if (!overlay)
             {
                 if (isDirectoryEmpty(selectedDir)) {
-    				_flexHome = selectedDir.nativePath;
-    				flexSDKTxtInput.text = _flexHome;
-    				nextBtn.enabled = true;
-    				_langSelect.enabled = true;
-    				flexSDKTxtInput.errorString = "";
-    				flexSDKTxtInput.prompt = _viewResourceConstants.SELECT_PATH_PROMPT;
-    			} else {
-    				nextBtn.enabled = false;
+                    _flexHome = selectedDir.nativePath;
+                    flexSDKTxtInput.text = _flexHome;
+                    nextBtn.enabled = true;
+                    _langSelect.enabled = true;
+                    flexSDKTxtInput.errorString = "";
+                    flexSDKTxtInput.prompt = _viewResourceConstants.SELECT_PATH_PROMPT;
+                } else {
+                    nextBtn.enabled = false;
                     flexSDKTxtInput.text = selectedDir.nativePath;
                     flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_DIR_NOT_EMPTY + " : " + selectedDir.nativePath;
-    				flexSDKTxtInput.prompt = _viewResourceConstants.ERROR_DIR_NOT_EMPTY;
-    			}
+                    flexSDKTxtInput.prompt = _viewResourceConstants.ERROR_DIR_NOT_EMPTY;
+                }
             }
             else
             {
@@ -1378,196 +1414,205 @@ variables are not required because the locations of these pieces are known.
                 nextBtn.enabled = true;
                 _langSelect.enabled = true;
                 flexSDKTxtInput.errorString = "";
-                flexSDKTxtInput.prompt = _viewResourceConstants.SELECT_PATH_PROMPT;                
-            }
-		}
-		
-		protected function handleFlexSDXTxtInputChange(event:TextOperationEvent):void {
-			var tempDir:File;
-			var path:String = flexSDKTxtInput.text;
-			
-			try {
-				tempDir = new File(path);
-				
-				if (isDirectoryEmpty(tempDir)) {
-					flexSDKTxtInput.errorString = "";
-					_flexHome = path;
-					nextBtn.enabled = true;
-					_langSelect.enabled = true;
-				} else {
-					flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
-					nextBtn.enabled = false;
-				}
-			} catch (e:Error) {
-				flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
-				nextBtn.enabled = false;
-			}
-		}
-		
-		protected function createDirectories():void {
-			updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.ACTIVE);
-			
-			try {
+                flexSDKTxtInput.prompt = _viewResourceConstants.SELECT_PATH_PROMPT;
+            }
+        }
+        
+        protected function handleFlexSDXTxtInputChange(event:TextOperationEvent):void
+        {
+            var tempDir:File;
+            var path:String = flexSDKTxtInput.text;
+            
+            try {
+                tempDir = new File(path);
+                
+                if (isDirectoryEmpty(tempDir)) {
+                    flexSDKTxtInput.errorString = "";
+                    _flexHome = path;
+                    nextBtn.enabled = true;
+                    _langSelect.enabled = true;
+                } else {
+                    flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
+                    nextBtn.enabled = false;
+                }
+            } catch (e:Error) {
+                flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
+                nextBtn.enabled = false;
+            }
+        }
+        
+        protected function createDirectories():void
+        {
+            updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.ACTIVE);
+            
+            try {
                 if (!overlaying)
-    				log(_viewResourceConstants.INFO_CREATING_FLEX_HOME);
+                    log(_viewResourceConstants.INFO_CREATING_FLEX_HOME);
                 _flexHomeDir = createFolder(_flexHome);
-				log(_viewResourceConstants.INFO_CREATING_TEMP_DIR);
-				_flexTemp = _flexHome + File.separator + "temp";
-				_flexTempDir = createFolder(_flexTemp);
-				updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.COMPLETE);
-				downloadApacheFlexSDK();
-			} catch (e:Error) {
-				updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.ERROR);
-				log(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY);
-				abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY);
-			}
-		}
-		
-		protected function downloadApacheFlexSDK():void {
-			updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ACTIVE);
-			
-			try {
-				log(_viewResourceConstants.INFO_DOWNLOADING_FLEX_SDK + APACHE_FLEX_BIN_DISTRO_URL);
-				_apacheFlexSDKCompressedFile = File.userDirectory.resolvePath(_flexTemp + File.separator + APACHE_FLEX_BIN_DISTRO_FILE);
-				copyOrDownload(APACHE_FLEX_BIN_DISTRO_URL, handleApacheFlexSDKDownload, _apacheFlexSDKCompressedFile, handleApacheFlexSDKDownloadError, nocache);
-			} catch (e:Error) {
-				updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
-				log(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY + "(error: " + e.message);
-				abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY + "(error: " + e.message);
-			}
-			
-		}
-		
-		protected function handleApacheFlexSDKDownload(event:Event):void {
-			try {
-				writeFileToDirectory(_apacheFlexSDKCompressedFile, event.target.data);
-			} catch (e:Error) {
-				updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
-				abortInstallation("handleApacheFlexSDKDownload " + e.message);
-			}
-			
-			updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.COMPLETE);
-			
-			updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.ACTIVE);
-			
-			log(_viewResourceConstants.STEP_VERIFY_FLEX_SDK);
-			
-			_md5CompareUtil.addEventListener(ProgressEvent.PROGRESS, md5VerificationProgressHandler);
-			_md5CompareUtil.verifyMD5(_apacheFlexSDKCompressedFile, APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE, uncompressApacheFlexSDK);
-		}
-		
-		protected function md5VerificationProgressHandler(event:ProgressEvent):void {
+                log(_viewResourceConstants.INFO_CREATING_TEMP_DIR);
+                _flexTemp = _flexHome + File.separator + "temp";
+                _flexTempDir = createFolder(_flexTemp);
+                updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.COMPLETE);
+                downloadApacheFlexSDK();
+            } catch (e:Error) {
+                updateActivityStep(_viewResourceConstants.STEP_CREATE_DIRECTORIES, StepItem.ERROR);
+                log(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY);
+                abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY);
+            }
+        }
+        
+        protected function downloadApacheFlexSDK():void
+        {
+            updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ACTIVE);
+            
+            try {
+                log(_viewResourceConstants.INFO_DOWNLOADING_FLEX_SDK + APACHE_FLEX_BIN_DISTRO_URL);
+                _apacheFlexSDKCompressedFile = File.userDirectory.resolvePath(_flexTemp + File.separator + APACHE_FLEX_BIN_DISTRO_FILE);
+                copyOrDownload(APACHE_FLEX_BIN_DISTRO_URL, handleApacheFlexSDKDownload, _apacheFlexSDKCompressedFile, handleApacheFlexSDKDownloadError, nocache);
+            } catch (e:Error) {
+                updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
+                log(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY + "(error: " + e.message);
+                abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_CREATE_TEMP_DIRECTORY + "(error: " + e.message);
+            }
+            
+        }
+        
+        protected function handleApacheFlexSDKDownload(event:Event):void
+        {
+            try {
+                writeFileToDirectory(_apacheFlexSDKCompressedFile, event.target.data);
+            } catch (e:Error) {
+                updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
+                abortInstallation("handleApacheFlexSDKDownload " + e.message);
+            }
+            
+            updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.COMPLETE);
+            
+            updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.ACTIVE);
+            
+            log(_viewResourceConstants.STEP_VERIFY_FLEX_SDK);
+            
+            _md5CompareUtil.addEventListener(ProgressEvent.PROGRESS, md5VerificationProgressHandler);
+            _md5CompareUtil.verifyMD5(_apacheFlexSDKCompressedFile, APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE, uncompressApacheFlexSDK);
+        }
+        
+        protected function md5VerificationProgressHandler(event:ProgressEvent):void
+        {
             if (logProgressEvents)
                 log("md5 progress " + event.bytesLoaded + "  " + event.bytesTotal, -1, false);
             if (event.bytesTotal > 0)
-    			progressBar.percent = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
-		}
-		
-		protected function handleApacheFlexSDKDownloadError(event:* = null):void {
-			updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
-			log(_viewResourceConstants.ERROR_UNABLE_TO_DOWNLOAD_FLEX_SDK);
-			abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_DOWNLOAD_FLEX_SDK);
-		}
-		
-		protected function uncompressApacheFlexSDK():void {
-			if (!_md5CompareUtil.fileIsVerified) {
-				updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.ERROR);
-				
-				log(_viewResourceConstants.ERROR_VERIFY_FLEX_SDK);
-				
-				abortInstallation(_viewResourceConstants.ERROR_VERIFY_FLEX_SDK);
-				return;
-			} else {
-				updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.COMPLETE);
-				
-				log(_viewResourceConstants.INFO_VERIFY_FLEX_SDK_DONE);
-			}
-			
-			updateActivityStep(_viewResourceConstants.STEP_UNZIP_FLEX_SDK, StepItem.ACTIVE);
-			
-			try {
-				log(_viewResourceConstants.INFO_UNZIPPING + _apacheFlexSDKCompressedFile.nativePath);
-				
-				if (_os.isWindows()) {
-					unzip(_apacheFlexSDKCompressedFile, handleApacheFlexSDKZipFileUnzipComplete, handleApacheFlexSDKZipFileUnzipError);
-				} else {
-					untar(_apacheFlexSDKCompressedFile, _flexTempDir, handleApacheFlexSDKZipFileUnzipComplete, handleApacheFlexSDKZipFileUnzipError);
-				}
-			} catch (e:Error) {
-				updateActivityStep(_viewResourceConstants.STEP_UNZIP_FLEX_SDK, StepItem.ERROR);
-				abortInstallation(_viewResourceConstants.STEP_UNZIP_FLEX_SDK + " " + e.message);
-			}
-		}
-		
-		protected function handleApacheFlexSDKZipFileUnzipComplete(event:Event):void {
-			log(_viewResourceConstants.INFO_FINISHED_UNZIPPING + _apacheFlexSDKCompressedFile.nativePath);
-			updateActivityStep(_viewResourceConstants.STEP_UNZIP_FLEX_SDK, StepItem.COMPLETE);
-			
-			if (_os.isWindows()) {
+                progressBar.percent = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
+        }
+        
+        protected function handleApacheFlexSDKDownloadError(event:* = null):void
+        {
+            updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK, StepItem.ERROR);
+            log(_viewResourceConstants.ERROR_UNABLE_TO_DOWNLOAD_FLEX_SDK);
+            abortInstallation(_viewResourceConstants.ERROR_UNABLE_TO_DOWNLOAD_FLEX_SDK);
+        }
+        
+        protected function uncompressApacheFlexSDK():void
+        {
+            if (!_md5CompareUtil.fileIsVerified) {
+                updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.ERROR);
+                
+                log(_viewResourceConstants.ERROR_VERIFY_FLEX_SDK);
+                
+                abortInstallation(_viewResourceConstants.ERROR_VERIFY_FLEX_SDK);
+                return;
+            } else {
+                updateActivityStep(_viewResourceConstants.STEP_VERIFY_FLEX_SDK, StepItem.COMPLETE);
+                
+                log(_viewResourceConstants.INFO_VERIFY_FLEX_SDK_DONE);
+            }
+            


<TRUNCATED>

Mime
View raw message