Skip to content
Permalink
Browse files
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


git-svn-id: https://svn.apache.org/repos/asf/incubator/flex/utilities/trunk@1426737 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
bigosmallm committed Dec 29, 2012
1 parent 1cb7147 commit 7aceb27c7abfb0cf756818e9e3ff91bfeb7e802e
Showing 3 changed files with 88 additions and 41 deletions.
@@ -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";


@@ -128,6 +128,7 @@ variables are not required because the locations of these pieces are known.
*/
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 locations of these pieces are known.
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 locations of these pieces are known.
{
languageOverride = s.substring(10);
}
if (s.indexOf("-config=") == 0)
{
configOverride = s.substring(8);
}
}
}
@@ -274,8 +280,16 @@ variables are not required because the locations of these pieces are known.
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 locations of these pieces are known.
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 locations of these pieces are known.
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 locations of these pieces are known.
}
}
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 locations of these pieces are known.
{
tempDir = new File(path);
if (SDKNotPackaged(path))
if(isDirectoryEmpty(tempDir))
{
flexSDKTxtInput.errorString = "";
_flexHome = path;
@@ -980,7 +959,7 @@ variables are not required because the locations of these pieces are known.
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);
}
@@ -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>

0 comments on commit 7aceb27

Please sign in to comment.