You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2012/09/13 09:37:56 UTC

svn commit: r1384223 - in /incubator/flex/utilities/trunk: common/src/org/apache/flex/utilities/common/Constants.as installer/build.number installer/src/InstallApacheFlex-app.xml installer/src/InstallApacheFlex.mxml installer/src/sdk-installer-config.xml

Author: erikdebruin
Date: Thu Sep 13 07:37:55 2012
New Revision: 1384223

URL: http://svn.apache.org/viewvc?rev=1384223&view=rev
Log:
Fixed FLEX-33198, updated build number to 3.

Modified:
    incubator/flex/utilities/trunk/common/src/org/apache/flex/utilities/common/Constants.as
    incubator/flex/utilities/trunk/installer/build.number
    incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml
    incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
    incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml

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=1384223&r1=1384222&r2=1384223&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 Thu Sep 13 07:37:55 2012
@@ -31,6 +31,9 @@ public class Constants
 	
 	public static const APACHE_FLEX_URL:String = "http://incubator.apache.org/flex/";
 	
+	public static const ARCHIVE_EXTENSION_MAC:String = ".tar.gz";
+	public static const ARCHIVE_EXTENSION_WIN:String = ".zip";
+	
 	public static const APPLICATION_EXTENSION_MAC:String = ".dmg";
 	public static const APPLICATION_EXTENSION_WIN:String = ".exe";
 	

Modified: incubator/flex/utilities/trunk/installer/build.number
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/build.number?rev=1384223&r1=1384222&r2=1384223&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/build.number (original)
+++ incubator/flex/utilities/trunk/installer/build.number Thu Sep 13 07:37:55 2012
@@ -1,3 +1,3 @@
 #Copyright 2012 The Apache Software Foundation.
-#Wed Sep 12 09:22:50 CEST 2012
-build.number=2
+#Thu Sep 13 09:32:49 CEST 2012
+build.number=3

Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml?rev=1384223&r1=1384222&r2=1384223&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml Thu Sep 13 07:37:55 2012
@@ -45,7 +45,7 @@
 	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
 	Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
 	An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
-	<versionNumber>1.0.2</versionNumber>
+	<versionNumber>1.0.3</versionNumber>
 		         
 	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
 	<!-- <versionLabel></versionLabel> -->

Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1384223&r1=1384222&r2=1384223&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Thu Sep 13 07:37:55 2012
@@ -20,6 +20,7 @@ limitations under the License.
 
 
 <!--
+
 This app should be used to create an Apache Flex SDK that has the
 directory structure that an IDE expects.
 
@@ -103,6 +104,7 @@ variables are not required because the l
 		 */
 		private var APACHE_FLEX_BIN_DISTRO_PATH:String;
 		private var APACHE_FLEX_BIN_DISTRO_FILE:String;
+		private var APACHE_FLEX_BIN_DISTRO_FILE_SHORT:String;
 		private var APACHE_FLEX_BIN_DISTRO_URL:String;
 		
 		/**
@@ -163,7 +165,7 @@ variables are not required because the l
 		private var _flexTemp:String;
 		private var _flexHomeDir:File;
 		private var _flexTempDir:File;
-		private var _apacheFlexSDKZipFile:File;
+		private var _apacheFlexSDKCompressedFile:File;
 		private var _adobeAIRSDKZipFile:File;
 		private var _fbGlobalPlayerDir:File;
 		private var _fbGlobalPlayerFile:File;
@@ -293,9 +295,17 @@ variables are not required because the l
 			
 			_mirrorURLCGI = files.(@name == 'MirrorURLCGI').@file.toString();
 			
-			APACHE_FLEX_BIN_DISTRO_FILE = files.(@name == 'ApacheFlexSDK').@file.toString();
-			APACHE_FLEX_BIN_DISTRO_PATH = files.(@name == 'ApacheFlexSDK').@path.toString();
+			var fileName:String = files.(@name == 'ApacheFlexSDK').@file.toString();
+			/* Tmp solution to remove the file extension if present in the config XML */
+			var winExtension:String = Constants.ARCHIVE_EXTENSION_WIN;
+			if (fileName.indexOf(winExtension) > -1)
+				fileName = fileName.substring(0, fileName.length - winExtension.length);
+			
+			APACHE_FLEX_BIN_DISTRO_FILE_SHORT = fileName;
+			fileName += (_os == MAC_OS) ? Constants.ARCHIVE_EXTENSION_MAC : winExtension;
 			
+			APACHE_FLEX_BIN_DISTRO_FILE = fileName;
+			APACHE_FLEX_BIN_DISTRO_PATH = files.(@name == 'ApacheFlexSDK').@path.toString();
 			if (!APACHE_FLEX_BIN_DISTRO_FILE || !APACHE_FLEX_BIN_DISTRO_PATH)
 			{
 				log(_viewResourceConstants.ERROR_INVALID_SDK_URL);
@@ -667,8 +677,8 @@ variables are not required because the l
 			try
 			{
 				log(_viewResourceConstants.INFO_DOWNLOADING_FLEX_SDK + APACHE_FLEX_BIN_DISTRO_URL);
-				_apacheFlexSDKZipFile = File.userDirectory.resolvePath(_flexTemp + File.separator + APACHE_FLEX_BIN_DISTRO_FILE); 
-				copyOrDownload(APACHE_FLEX_BIN_DISTRO_URL, handleApacheFlexSDKDownload, _apacheFlexSDKZipFile, handleApacheFlexSDKDownloadError);
+				_apacheFlexSDKCompressedFile = File.userDirectory.resolvePath(_flexTemp + File.separator + APACHE_FLEX_BIN_DISTRO_FILE); 
+				copyOrDownload(APACHE_FLEX_BIN_DISTRO_URL, handleApacheFlexSDKDownload, _apacheFlexSDKCompressedFile, handleApacheFlexSDKDownloadError);
 			}
 			catch (e:Error)
 			{
@@ -683,7 +693,7 @@ variables are not required because the l
 		{
 			try
 			{
-				writeFileToDirectory(_apacheFlexSDKZipFile, event.target.data);
+				writeFileToDirectory(_apacheFlexSDKCompressedFile, event.target.data);
 			}
 			catch (e:Error)
 			{
@@ -699,9 +709,9 @@ variables are not required because the l
 			
 			_md5CompareUtil.addEventListener(ProgressEvent.PROGRESS, md5VerificationProgressHandler);
 			_md5CompareUtil.verifyMD5(
-				_apacheFlexSDKZipFile, 
+				_apacheFlexSDKCompressedFile, 
 				APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE, 
-				unzipApacheFlexSDK);
+				uncompressApacheFlexSDK);
 		}
 		
 		protected function md5VerificationProgressHandler(event:ProgressEvent):void
@@ -715,7 +725,7 @@ variables are not required because the l
 			abortInstallation();
 		}
 		
-		protected function unzipApacheFlexSDK():void
+		protected function uncompressApacheFlexSDK():void
 		{
 			if (!_md5CompareUtil.fileIsVerified)
 			{
@@ -737,8 +747,12 @@ variables are not required because the l
 			
 			try
 			{
-				log(_viewResourceConstants.INFO_UNZIPPING + _apacheFlexSDKZipFile.nativePath);
-				unzip(_apacheFlexSDKZipFile, handleApacheFlexSDKZipFileUnzipComplete, handleApacheFlexSDKZipFileUnzipError);
+				log(_viewResourceConstants.INFO_UNZIPPING + _apacheFlexSDKCompressedFile.nativePath);
+				
+				if (_os == WINDOWS_OS)
+					unzip(_apacheFlexSDKCompressedFile, handleApacheFlexSDKZipFileUnzipComplete, handleApacheFlexSDKZipFileUnzipError);
+				else 
+					untar(_apacheFlexSDKCompressedFile, _flexTempDir, handleApacheFlexSDKZipFileUnzipComplete, handleApacheFlexSDKZipFileUnzipError);
 			}
 			catch (e:Error)
 			{
@@ -749,7 +763,7 @@ variables are not required because the l
 		
 		protected function handleApacheFlexSDKZipFileUnzipComplete(event:Event):void
 		{
-			log(_viewResourceConstants.INFO_FINISHED_UNZIPPING + _apacheFlexSDKZipFile.nativePath);
+			log(_viewResourceConstants.INFO_FINISHED_UNZIPPING + _apacheFlexSDKCompressedFile.nativePath);
 			updateActivityStep(_viewResourceConstants.STEP_UNZIP_FLEX_SDK, StepItem.COMPLETE);
 			
 			if (_os == WINDOWS_OS)
@@ -758,6 +772,14 @@ variables are not required because the l
 			}
 			else if (_os == MAC_OS)
 			{ 
+				/* Copy all files from the unarchived directory to the root */
+				var directory:File = _flexTempDir.resolvePath(APACHE_FLEX_BIN_DISTRO_FILE_SHORT);
+				var files:Array = directory.getDirectoryListing();
+				for each(var file:File in files)
+				{
+					file.copyTo(_flexHomeDir.resolvePath(file.name));
+				}
+				
 				downloadAIRRuntimeKitForMac();
 			}
 		}
@@ -1661,7 +1683,7 @@ variables are not required because the l
 			_process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, unTarFileProgress,false,0,true);
 			_process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, unTarErrorFunction,false,0,true);
 			_process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, unTarError,false,0,true);
-			_process.addEventListener(NativeProcessExitEvent.EXIT, unTarCompleteFunction,false,0,true);
+			_process.addEventListener(NativeProcessExitEvent.EXIT, unTarCompleteFunction,false,0,true); 
 			_process.addEventListener(NativeProcessExitEvent.EXIT, unTarComplete,false,0,true);
 			_process.start(startupInfo);
 		}

Modified: incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml?rev=1384223&r1=1384222&r2=1384223&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml (original)
+++ incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml Thu Sep 13 07:37:55 2012
@@ -21,7 +21,7 @@ limitations under the License.
 
 <config>
 	<version>
-		<latest>1.0.2</latest>
+		<latest>1.0.3</latest>
 	</version>
 	<files>
 	
@@ -30,7 +30,7 @@ limitations under the License.
 			 	- 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_RC3/binaries/" file="apache-flex-sdk-installer-1.0.2-incubating-bin" />
+		<file name="SDKInstallerApp" path="http://people.apache.org/~bigosmallm/installapacheflex_RC4/binaries/" file="apache-flex-sdk-installer-1.0.3-incubating-bin" />
 		
 		<!-- Mirror URL CGI -->
 		<file name="MirrorURLCGI" path="" file="single-mirror-url.cgi" />
@@ -38,7 +38,8 @@ limitations under the License.
 		<!-- Apache Flex binary distribution
 			 Notes: 
 			 	- path is relative to mirror URL
-			 	- don't use starting slash -->
+			 	- 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.8.0-incubating/binaries/" file="apache-flex-sdk-4.8.0-incubating-bin.zip" />
 		
 		<!-- Adobe AIR SDK -->