You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2012/12/29 11:27:17 UTC

svn commit: r1426737 - in /incubator/flex/utilities/trunk: common/src/org/apache/flex/utilities/common/Constants.as installer/src/InstallApacheFlex.mxml installer/src/sdk-installer-config-2.0.xml

Author: bigosmallm
Date: Sat Dec 29 10:27:17 2012
New Revision: 1426737

URL: http://svn.apache.org/viewvc?rev=1426737&view=rev
Log:
Added new config file sdk-installer-config-2.0.xml
Added support to inject config xml via command line so that users can specify various combinations of Flash Player and AIR sdks
Added support for Flex SDK 4.9

Added:
    incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml   (with props)
Modified:
    incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as
    incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml

Modified: incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as?rev=1426737&r1=1426736&r2=1426737&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as (original)
+++ incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as Sat Dec 29 10:27:17 2012
@@ -37,7 +37,7 @@ public class Constants
 	public static const APPLICATION_EXTENSION_MAC:String = ".dmg";
 	public static const APPLICATION_EXTENSION_WIN:String = ".exe";
 	
-	public static const CONFIG_XML_NAME:String = "sdk-installer-config.xml";
+	public static const CONFIG_XML_NAME:String = "sdk-installer-config-2.0.xml";
 	public static const DISCLAIMER_PATH:String = "about-binaries.html";
 	
 	

Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1426737&r1=1426736&r2=1426737&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Sat Dec 29 10:27:17 2012
@@ -128,6 +128,7 @@ variables are not required because the l
 		 */
 		private var ADOBE_FB_GLOBALPLAYER_SWC_FILE:String;
 		private var ADOBE_FB_GLOBALPLAYER_SWC_URL:String;
+		private var ADOBE_FB_GLOBALPLAYER_SWC_VERSION:String = "11.1";	//Default to 11.1 if this var is not set by value in sdk-installer-config.xml
 		
 		/**
 		 * 
@@ -184,6 +185,7 @@ variables are not required because the l
 		private var _numOptionalComponentsPermissions:int = 0;
 		
 		private var languageOverride:String;
+		private var configOverride:String="";
 		
 		[Bindable] private var _viewResourceConstants:ViewResourceConstants;
 		[Bindable] private var _installationSteps:ArrayCollection = new ArrayCollection();
@@ -206,6 +208,10 @@ variables are not required because the l
 				{
 					languageOverride = s.substring(10);
 				}
+				if (s.indexOf("-config=") == 0)
+				{
+					configOverride = s.substring(8);
+				}
 			}
 		}
 		
@@ -274,8 +280,16 @@ variables are not required because the l
 		
 		protected function loadXML():void
 		{
-			//var request:URLRequest = new URLRequest(Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
-			var request:URLRequest = new URLRequest(Constants.CONFIG_XML_NAME);
+			var request:URLRequest;
+			
+			if(configOverride != "")
+			{
+				request = new URLRequest(configOverride);
+			}
+			else
+			{
+				request new URLRequest(Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME);
+			}
 			
 			_loader = new URLLoader();
 			
@@ -367,6 +381,7 @@ variables are not required because the l
 			
 			ADOBE_FB_GLOBALPLAYER_SWC_FILE =  files.(@name == 'FlashPlayer').@file.toString();
 			ADOBE_FB_GLOBALPLAYER_SWC_URL = files.(@name == 'FlashPlayer').@path.toString();
+			ADOBE_FB_GLOBALPLAYER_SWC_VERSION = files.(@name == 'FlashPlayer').@version.toString();
 			if (!ADOBE_FB_GLOBALPLAYER_SWC_FILE || !ADOBE_FB_GLOBALPLAYER_SWC_URL)
 			{
 				log(_viewResourceConstants.ERROR_INVALID_FLASH_PLAYER_SWC_URL);
@@ -615,7 +630,6 @@ variables are not required because the l
 			createDirectories();
 		}
 		
-		// TODO Scan for Apache SDKs installed and check if allready modified?
 		protected function browseForSDK(event:MouseEvent):void
 		{
 			var file:File = new File(); 
@@ -645,41 +659,6 @@ variables are not required because the l
 			}
 		}
 		
-		protected function validApacheSDK(flexPath:String):Boolean
-		{
-			var valid:Boolean = true;
-			var descriptionFile:String = flexPath + File.separator + "flex-sdk-description.xml";
-			var file:File = new File(descriptionFile);
-			
-			// Check flex SDK diretory has flex description file
-			if (!file.exists)
-			{
-				valid = false;
-				flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
-			}
-			
-			// TODO Check is Apache not Adobe SDK
-			
-			return valid;
-		}
-		
-		protected function SDKNotPackaged(flexPath:String):Boolean
-		{
-			var unpackaged:Boolean = true;
-			var playerFile:String = flexPath + File.separator + "frameworks" + File.separator + "libs" + File.separator
-				+ "player" + File.separator + "11.1" + File.separator + "playerglobal.swc"; 
-			var file:File = new File(playerFile);
-			
-			// check for existance of  player global
-			if (file.exists)
-			{
-				unpackaged = false;
-				flexSDKTxtInput.errorString = _viewResourceConstants.ERROR_INVALID_FLEX_SDK_DIRECTORY;
-			}
-			
-			return unpackaged;
-		}
-		
 		protected function handleFlexSDXTxtInputChange(event:TextOperationEvent):void
 		{
 			var tempDir:File;
@@ -689,7 +668,7 @@ variables are not required because the l
 			{
 				tempDir = new File(path);
 				
-				if (SDKNotPackaged(path))
+				if(isDirectoryEmpty(tempDir))
 				{
 					flexSDKTxtInput.errorString = "";
 					_flexHome = path;
@@ -980,7 +959,7 @@ variables are not required because the l
 			try
 			{
 				log(_viewResourceConstants.INFO_INSTALLING_PLAYERGLOBAL_SWC + ADOBE_FB_GLOBALPLAYER_SWC_URL);
-				_fbGlobalPlayerDir = createFolder(_flexHome + File.separator + "frameworks" + File.separator + "libs" + File.separator + "player" + File.separator + "11.1");
+				_fbGlobalPlayerDir = createFolder(_flexHome + File.separator + "frameworks" + File.separator + "libs" + File.separator + "player" + File.separator + ADOBE_FB_GLOBALPLAYER_SWC_VERSION);
 				_fbGlobalPlayerFile = File.userDirectory.resolvePath(_fbGlobalPlayerDir.nativePath + File.separator + "playerglobal.swc");
 				copyOrDownload(ADOBE_FB_GLOBALPLAYER_SWC_URL, handlePlayerGlobalDownload, _fbGlobalPlayerFile, handlePlayerGlobalDownloadError);
 			}

Added: incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml?rev=1426737&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml (added)
+++ incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml Sat Dec 29 10:27:17 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+<config>
+	<version>
+		<latest>1.0.9</latest>
+	</version>
+	<files>
+	
+		<!-- SDK Installer App binary distribution
+			 Notes: 
+			 	- use full URL when binaries are NOT released yet, else use 
+			 	  path relative to mirror
+			 	- if path is relative, don't use starting slash -->
+		<file name="SDKInstallerApp" path="http://people.apache.org/~bigosmallm/installapacheflex_RC10/binaries/" file="apache-flex-sdk-installer-1.0.9-incubating-bin" />
+		
+		<!-- Mirror URL CGI -->
+		<file name="MirrorURLCGI" path="" file="single-mirror-url.cgi" />
+		
+		<!-- Apache Flex binary distribution
+			 Notes: 
+			 	- path is relative to mirror URL
+			 	- don't use starting slash 
+			 	- for the second and later releases, remove the extension from the file name -->
+		<file name="ApacheFlexSDK" path="incubator/flex/4.9.0/binaries/" file="apache-flex-sdk-4.9.0-bin" />
+		
+		<!-- Adobe AIR SDK -->
+		<file name="AdobeAIRSDKWin" path="http://airdownload.adobe.com/air/win/download/3.4/" file="AdobeAIRSDK.zip" />
+		<file name="AdobeAIRSDKMac" path="http://airdownload.adobe.com/air/mac/download/3.4/" file="AdobeAIRSDK.tbz2" />
+		
+		<!-- Adobe Flash Player player global swc -->
+		<file name="FlashPlayer" path="http://fpdownload.macromedia.com/get/flashplayer/updaters/11/" file="playerglobal11_3.swc" version="11.3" />	
+
+		<!-- SWFObject.js -->
+		<file name="swfobject" path="http://swfobject.googlecode.com/files/" file="swfobject_2_2.zip" />	
+		
+		<!-- BlazeDS -->
+		<file name="BlazeDS" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="flex-messaging-common.jar" />	
+		
+		<!-- FontSWF -->
+		<file name="afe" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="afe.jar" />
+		<file name="aglj40" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="aglj40.jar" />
+		<file name="flex-fontkit" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="flex-fontkit.jar" />
+		<file name="rideau" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="rideau.jar" />
+			
+		<!-- OSMF -->
+		<file name="OSMF" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/frameworks/libs/" file="osmf.swc" />	
+
+	</files>
+</config>
\ No newline at end of file

Propchange: incubator/flex/utilities/trunk/installer/src/sdk-installer-config-2.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native