Author: bigosmallm Date: Sun Dec 16 10:21:43 2012 New Revision: 1422499 URL: http://svn.apache.org/viewvc?rev=1422499&view=rev Log: Preparing installer v.2 Supports Flex 4.9 No longer downloads TLF separately since it is included with the SDK now
Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1422499&r1=1422498&r2=1422499&view=diff ============================================================================== --- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original) +++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Sun Dec 16 10:21:43 2012 @@ -144,9 +144,6 @@ variables are not required because the l private var OSMF_FILE:String; private var OSMF_URL:String; - private var TLF_FILE:String; - private var TLF_URL:String; - private var BLAZEDS_FILE:String; private var BLAZEDS_URL:String; @@ -176,7 +173,6 @@ variables are not required because the l private var _flexFontKitJarFile:File; private var _rideauJarFile:File; private var _osmfFile:File; - private var _tlfFile:File; private var _os:String; private var _loader:URLLoader; @@ -217,10 +213,7 @@ variables are not required because the l { var supportedLanguages:ArrayCollection = ViewResourceConstants.supportedLanguages; - // EdB (2012-10-22): disabling Localisation for 1.0 release - //var userLocale:String = new StringTools(LocaleID.DEFAULT).actualLocaleIDName.replace("-","_"); - var userLocale:String = RuntimeLocale.EN_US; - + var userLocale:String = new StringTools(LocaleID.DEFAULT).actualLocaleIDName.replace("-","_"); var n:int = supportedLanguages.length; for (var i:int = 0; i < n; i++) { @@ -244,8 +237,8 @@ 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 = new URLRequest(Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME); + var request:URLRequest = new URLRequest(Constants.CONFIG_XML_NAME); _loader = new URLLoader(); @@ -350,9 +343,6 @@ variables are not required because the l OSMF_FILE = files.(@name == 'OSMF').@file.toString(); OSMF_URL = files.(@name == 'OSMF').@path.toString(); - TLF_FILE = files.(@name == 'TLF').@file.toString(); - TLF_URL = files.(@name == 'TLF').@path.toString(); - BLAZEDS_FILE = files.(@name == 'BlazeDS').@file.toString(); BLAZEDS_URL = files.(@name == 'BlazeDS').@path.toString(); @@ -405,8 +395,16 @@ variables are not required because the l } else { - APACHE_FLEX_BIN_DISTRO_URL = _mirrorURLUtil.mirrorURL + - APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE; + + if (APACHE_FLEX_BIN_DISTRO_PATH.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX) + { + APACHE_FLEX_BIN_DISTRO_URL = _mirrorURLUtil.mirrorURL + + APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE; + } + else + { + APACHE_FLEX_BIN_DISTRO_URL = APACHE_FLEX_BIN_DISTRO_PATH + APACHE_FLEX_BIN_DISTRO_FILE; + } if (installerAppPath.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX) { @@ -505,7 +503,6 @@ variables are not required because the l _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)); - _installationSteps.addItem(new StepItem(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF)); } protected function resetInstallStepsActivity():void @@ -563,12 +560,6 @@ variables are not required because the l _viewResourceConstants.LICENSE_URL_OSMF, true)); _installerComponentsDataProvider.addItem( - new InstallerComponentVO(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF, - _viewResourceConstants.ASK_TLF, - _viewResourceConstants.LICENSE_TLF, - _viewResourceConstants.LICENSE_URL_TLF, - true)); - _installerComponentsDataProvider.addItem( new InstallerComponentVO(_viewResourceConstants.STEP_OPTIONAL_INSTALL_FONTSWF, _viewResourceConstants.ASK_FONTSWF, _viewResourceConstants.LICENSE_FONTSWF, @@ -1282,7 +1273,7 @@ variables are not required because the l updateOptionalComponentInstallStatus(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF,true); updateOptionalComponentInstallStatusAborted(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF,false); updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_OSMF, StepItem.COMPLETE); - installTLF(); + installNextOptionalComponent(); } catch (e:Error) { @@ -1292,40 +1283,6 @@ variables are not required because the l } } - protected function installTLF():void - { - updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF,StepItem.ACTIVE); - downloadTLFFile(); - } - - protected function downloadTLFFile():void - { - log(StringUtil.substitute(_viewResourceConstants.INFO_DOWNLOADING_FILE_FROM,[TLF_FILE,TLF_URL])); - _tlfFile = File.userDirectory.resolvePath(_flexTemp + File.separator + TLF_FILE); - copyOrDownload(TLF_URL+TLF_FILE,handleTLFFileDownloaded,null,handleTLFInstallError); - } - - protected function handleTLFFileDownloaded(event:Event):void - { - try - { - writeFileToDirectory(_tlfFile, event.target.data); - copyFileToLibDir(_tlfFile); - clearData(URLLoader(event.target)); - - updateOptionalComponentInstallStatus(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF,true); - updateOptionalComponentInstallStatusAborted(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF,false); - updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF, StepItem.COMPLETE); - installNextOptionalComponent(); - } - catch (e:Error) - { - updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF, StepItem.ERROR); - updateOptionalComponentInstallStatusAborted(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF,true); - installNextOptionalComponent(); - } - } - protected function copyFileToOptionalLibDir(file:File):void { //Copy to "${FLEX_HOME}/lib/external/optional" @@ -1361,13 +1318,6 @@ variables are not required because the l installNextOptionalComponent(); } - protected function handleTLFInstallError(event:*=null):void{ - updateActivityStep(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF, StepItem.ERROR); - updateOptionalComponentInstallStatusAborted(_viewResourceConstants.STEP_REQUIRED_INSTALL_TLF,true); - log(StringUtil.substitute(_viewResourceConstants.ERROR_UNABLE_TO_DOWNLOAD_FILE,["TLF"])); - installNextOptionalComponent(); - } - protected function updateOptionalComponentInstallStatus(label:String,isInstalled:Boolean):void { for each (var obj:InstallerComponentVO in _installerComponentsDataProvider) @@ -1895,11 +1845,6 @@ variables are not required because the l <s:layout> <s:BasicLayout /> </s:layout> - - <!-- - EdB (2012-10-22): disabling Localisation for 1.0 release: - - hide language selection label and combobox - --> <s:HGroup left="0" right="0" @@ -1913,13 +1858,13 @@ variables are not required because the l click="{showDisclaimer()}" /> <s:Spacer width="100%" /> - <s:Label id="langLabel" visible="false" + <s:Label id="langLabel" horizontalCenter="0" height="100%" textAlign="right" text="{_viewResourceConstants.INFO_CURRENT_LANGUAGE}" verticalAlign="middle"/> - <s:ComboBox id="_langSelect" visible="false" + <s:ComboBox id="_langSelect" width="184" change="_langSelect_changeHandler(event)"/> </s:HGroup> Modified: incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as?rev=1422499&r1=1422498&r2=1422499&view=diff ============================================================================== --- incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as (original) +++ incubator/flex/utilities/trunk/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as Sun Dec 16 10:21:43 2012 @@ -35,6 +35,8 @@ import flash.net.URLLoaderDataFormat; import flash.net.URLRequest; import flash.utils.ByteArray; +import org.apache.flex.utilities.common.Constants; + [Event(name="progress", type="flash.events.ProgressEvent")] public class MD5CompareUtil extends EventDispatcher @@ -218,7 +220,14 @@ public class MD5CompareUtil extends Even _urlLoader.dataFormat = URLLoaderDataFormat.TEXT; _urlLoader.addEventListener(Event.COMPLETE, urlLoaderResultHandler); _urlLoader.addEventListener(IOErrorEvent.IO_ERROR, urlLoaderResultHandler); - _urlLoader.load(new URLRequest(MD5_DOMAIN + remoteSDKZipPath + MD5_POSTFIX)); + if (remoteSDKZipPath.substr(0, Constants.URL_PREFIX.length) != Constants.URL_PREFIX) + { + _urlLoader.load(new URLRequest(MD5_DOMAIN + remoteSDKZipPath + MD5_POSTFIX)); + } + else + { + _urlLoader.load(new URLRequest(remoteSDKZipPath + MD5_POSTFIX)); + } } } 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=1422499&r1=1422498&r2=1422499&view=diff ============================================================================== --- incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml (original) +++ incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml Sun Dec 16 10:21:43 2012 @@ -40,7 +40,8 @@ limitations under the License. - 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.8.0-incubating/binaries/" file="apache-flex-sdk-4.8.0-incubating-bin.zip" /> +<!-- <file name="ApacheFlexSDK" path="incubator/flex/4.8.0-incubating/binaries/" file="apache-flex-sdk-4.8.0-incubating-bin.zip" /> --> + <file name="ApacheFlexSDK" path="http://people.apache.org/~jmclean/Apache%20Flex%204.9.0%20Release%20Candidate%203/binaries/" file="apache-flex-sdk-4.9.0-incubating-bin" /> <!-- Adobe AIR SDK --> <file name="AdobeAIRSDKWin" path="http://airdownload.adobe.com/air/win/download/3.1/" file="AdobeAIRSDK.zip" /> @@ -63,9 +64,6 @@ limitations under the License. <!-- OSMF --> <file name="OSMF" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/frameworks/libs/" file="osmf.swc" /> - - <!-- TLF --> - <file name="TLF" path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/frameworks/libs/" file="textLayout.swc" /> </files> </config> \ No newline at end of file