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/08/12 08:48:46 UTC
svn commit: r1372050 - in /incubator/flex/utilities/InstallApacheFlex: ./
src/ src/assets/styles/ src/org/apache/flex/packageflexsdk/view/
src/ws/tink/spark/controls/ src/ws/tink/spark/skins/controls/
Author: bigosmallm
Date: Sun Aug 12 06:48:45 2012
New Revision: 1372050
URL: http://svn.apache.org/viewvc?rev=1372050&view=rev
Log:
Fixed mirror url parsing
Code cleanup
Update build.number
Added:
incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml
Modified:
incubator/flex/utilities/InstallApacheFlex/build.number
incubator/flex/utilities/InstallApacheFlex/build.properties
incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml
incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml
incubator/flex/utilities/InstallApacheFlex/src/assets/styles/styles.css
incubator/flex/utilities/InstallApacheFlex/src/org/apache/flex/packageflexsdk/view/UpdaterDialog.mxml
incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/ProgressBar.as
incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml
Modified: incubator/flex/utilities/InstallApacheFlex/build.number
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/build.number?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/build.number (original)
+++ incubator/flex/utilities/InstallApacheFlex/build.number Sun Aug 12 06:48:45 2012
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Tue Jul 31 01:29:27 PDT 2012
-build.number=13
+#Sat Aug 11 23:37:41 PDT 2012
+build.number=3
Modified: incubator/flex/utilities/InstallApacheFlex/build.properties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/build.properties?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/build.properties (original)
+++ incubator/flex/utilities/InstallApacheFlex/build.properties Sun Aug 12 06:48:45 2012
@@ -19,7 +19,7 @@
-->
#nano version number is added by build script
-release.version=0.7
+release.version=0.8
#The URLs for the IDE Installer Apps
installer.url.win=http://people.apache.org/~bigosmallm/installapacheflex/InstallApacheFlex.exe
Modified: incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml Sun Aug 12 06:48:45 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>0.7.13</versionNumber>
+ <versionNumber>0.8.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/InstallApacheFlex/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml Sun Aug 12 06:48:45 2012
@@ -34,7 +34,7 @@ variables are not required because the l
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
- width="800" height="600" maxWidth="800" maxHeight="550" minWidth="800" minHeight="550"
+ width="800" height="550" maxWidth="800" maxHeight="550" minWidth="800" minHeight="550"
backgroundColor="0xDDDDDD" title="Package Apache Flex SDK for use in an IDE"
applicationComplete="handleApplicationComplete(event)" showStatusBar="false"
skinClass="ws.tink.spark.skins.controls.InstallApacheFlexSkin"
@@ -281,15 +281,6 @@ variables are not required because the l
APACHE_FLEX_BIN_DISTRO_FILE = files.(@name == 'ApacheFlexSDK').@file.toString();
APACHE_FLEX_BIN_DISTRO_PATH = files.(@name == 'ApacheFlexSDK').@path.toString();
- /*
- Tempory parsing while waiting for updated (patched) config XML.
-
- Assume the domain part of the path is:
- http://mirror.metrocast.net/apache/ (as was the case on 2012-08-02)
- */
- if (APACHE_FLEX_BIN_DISTRO_PATH.substr(0, TMP_URL.length) == TMP_URL)
- APACHE_FLEX_BIN_DISTRO_PATH = APACHE_FLEX_BIN_DISTRO_PATH.substr(TMP_URL.length);
-
if (!APACHE_FLEX_BIN_DISTRO_FILE || !APACHE_FLEX_BIN_DISTRO_PATH)
{
log(_constants.ERROR_INVALID_SDK_URL);
@@ -1451,6 +1442,7 @@ variables are not required because the l
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, handlerFunction,false,0,true);
loader.addEventListener(Event.COMPLETE, handleDownloadComplete,false,0,true);
+ progressBar.percent = 0;
if (errorFunction != null)
{
@@ -1468,16 +1460,7 @@ variables are not required because the l
var bytesLoaded:int = event.bytesLoaded;
var percentLoaded:int = Math.round(bytesLoaded*100/bytesTotal);
- // show count in command line progress bar in gui
- if (currentState == "commandLineState" && percentLoaded % 10 == 0 && percentLoaded != _previousDisplayedPercent)
- {
- log(_constants.INFO_DOWNLOADED + percentLoaded + "%");
- _previousDisplayedPercent = percentLoaded;
- }
- else
- {
- progressBar.percent = percentLoaded;
- }
+ progressBar.percent = percentLoaded;
}
private function handleDownloadComplete(event:Event):void
@@ -1710,7 +1693,7 @@ variables are not required because the l
]]>
</fx:Script>
<fx:Declarations>
- <s:Elastic id="ease" />
+ <s:Sine id="ease" />
<s:BlurFilter id="blur"/>
<s:RadioButtonGroup id="installPermissionRbtnGrp" change="handleInstallPermissionChange(event)" />
</fx:Declarations>
@@ -1933,6 +1916,9 @@ variables are not required because the l
label="{_constants.INSTALL_LOG_BTN_LABEL}"
click="showConsole(event)" />
<s:Spacer width="100%" />
+ <!--<s:Button label="Update" click="{showUpdateDialog(new XML())}" />-->
+ <s:Spacer width="100%" />
+
<s:Button id="closeBtn"
styleName="genericBtnStyle"
width="88"
Modified: incubator/flex/utilities/InstallApacheFlex/src/assets/styles/styles.css
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/assets/styles/styles.css?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/assets/styles/styles.css (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/assets/styles/styles.css Sun Aug 12 06:48:45 2012
@@ -77,6 +77,11 @@ s|Button
chromeColor: #679d13;
}
+.negativeBtnStyle
+{
+ chromeColor: #B20E13;
+}
+
.genericBtnStyle
{
chromeColor: #7b7b7b;
Modified: incubator/flex/utilities/InstallApacheFlex/src/org/apache/flex/packageflexsdk/view/UpdaterDialog.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/org/apache/flex/packageflexsdk/view/UpdaterDialog.mxml?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/org/apache/flex/packageflexsdk/view/UpdaterDialog.mxml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/org/apache/flex/packageflexsdk/view/UpdaterDialog.mxml Sun Aug 12 06:48:45 2012
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" xmlns:controls="ws.tink.spark.controls.*">
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="600" height="412"
+ title="Update available"
+ xmlns:controls="ws.tink.spark.controls.*"
+ skinClass="ws.tink.spark.skins.controls.UpdaterDialogSkin">
<fx:Script>
<![CDATA[
import air.update.events.DownloadErrorEvent;
@@ -24,6 +28,7 @@
protected function handleYesBtnClick(event:MouseEvent):void
{
+ currentState = "downloading";
downloadUpdater();
}
@@ -118,9 +123,16 @@
public function set versionXML(versionXML:XML):void
{
- _urlWindows = versionXML.urlWindows.toString();
- _urlMac = versionXML.urlMac.toString();
- _newVersion = versionXML.version.toString();
+ try
+ {
+ _urlWindows = versionXML.urlWindows.toString();
+ _urlMac = versionXML.urlMac.toString();
+ _newVersion = versionXML.version.toString();
+ }
+ catch(e:Error)
+ {
+ trace("Invalid version XML");
+ }
}
private function writeFileToDirectory(file:File,data:ByteArray):void
@@ -138,16 +150,38 @@
]]>
</fx:Script>
- <s:HGroup verticalCenter="0" horizontalCenter="0" verticalAlign="top">
- <s:VGroup width="100%" horizontalAlign="center">
- <s:Label text="New version ({_newVersion}) is available." />
- <s:Label text="Do you want to download it and install?" />
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="downloading" />
+ </s:states>
+
+ <s:HGroup width="100%"
+ top="210"
+ horizontalCenter="0"
+ verticalAlign="top">
+ <s:VGroup width="100%"
+ horizontalAlign="center">
+ <s:Label text="New version ({_newVersion}) is available."
+ fontSize="14"/>
+ <s:Label text="Do you want to download and install it?"
+ fontSize="14"/>
<controls:ProgressBar id="progressBar"
- width="60%"
+ width="80%"
height="21" />
+ <s:Spacer height="20" />
<s:HGroup>
- <s:Button id="btnYes" label="Yes" click="handleYesBtnClick(event)" />
- <s:Button id="btnNo" label="No" click="handleNoBtnClick(event)" />
+ <s:Button id="btnYes"
+ height="30"
+ styleName="mainBtnStyle"
+ label="UPDATE"
+ click="handleYesBtnClick(event)"
+ enabled.downloading="false" />
+ <s:Button id="btnNo"
+ height="30"
+ styleName="negativeBtnStyle"
+ label="DON'T UPDATE"
+ click="handleNoBtnClick(event)"
+ enabled.downloading="false" />
</s:HGroup>
</s:VGroup>
</s:HGroup>
Modified: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/ProgressBar.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/ProgressBar.as?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/ProgressBar.as (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/ProgressBar.as Sun Aug 12 06:48:45 2012
@@ -104,7 +104,7 @@ package ws.tink.spark.controls
*/
public function set percent(value:Number):void
{
- if( _percent == value ) return;
+// if( _percent == value ) return;
_percent = value;
if( percentLayout ) percentLayout.percent = percent;
Modified: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml?rev=1372050&r1=1372049&r2=1372050&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml Sun Aug 12 06:48:45 2012
@@ -83,7 +83,6 @@ limitations under the License.
<!-- layer 1: background fill -->
<s:BitmapImage source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" scaleMode="stretch" />
- <!--<s:Image source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" useHandCursor="true" buttonMode="true" sca />-->
<!-- layer 2: content + status bar -->
<s:Group left="0" right="0" top="0" bottom="0" minHeight="24" minWidth="0" >
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml?rev=1372050&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml Sun Aug 12 06:48:45 2012
@@ -0,0 +1,211 @@
+<?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.
+
+-->
+
+
+<!--- The default skin class for a Spark TitleWindow container.
+
+ @see spark.skins.spark.TitleWindowCloseButtonSkin
+ @see spark.components.TitleWindow
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+ minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TitleWindow")]
+ ]]>
+ </fx:Metadata>
+
+ <!--
+ NOTE: this skin file contains sub-parts that may continue to react to
+ Style code. To remove this behavior create new copies of those skins
+ and remove the styles.
+ -->
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="inactive" stateGroups="inactiveGroup" />
+ <s:State name="disabled" />
+ <s:State name="normalWithControlBar" stateGroups="withControls" />
+ <s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+ <s:State name="disabledWithControlBar" stateGroups="withControls" />
+ </s:states>
+
+ <!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+ <s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32"
+ alpha.inactiveGroup="0.22" distance="11" distance.inactiveGroup="7"
+ angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+
+ <!--- drop shadow can't be hittable so all other graphics go in this group -->
+ <s:Group left="0" right="0" top="0" bottom="0">
+
+ <!--- top group mask @private-->
+ <s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+ <!--- @private-->
+ <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!--- bottom group mask @private-->
+ <s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask"
+ includeIn="withControls">
+ <!--- @private-->
+ <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!--- layer 1: border @private -->
+ <s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+ <s:stroke>
+ <!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+ <s:SolidColorStroke id="borderStroke" weight="1" />
+ </s:stroke>
+ </s:Rect>
+
+
+ <s:BitmapImage source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" scaleMode="stretch" />
+
+ <!-- layer 3: contents -->
+ <!--- Contains the vertical stack of title bar content and control bar. -->
+ <s:Group left="1" right="1" top="1" bottom="1" id="contents">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="justify" />
+ </s:layout>
+ <!--- @private -->
+ <s:Group id="topGroup" mask="{topGroupMask}">
+
+ <!--- layer 0: title bar fill @private -->
+ <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xD2D2D2"
+ color.inactiveGroup="0xEAEAEA"/>
+ <s:GradientEntry color="0x9A9A9A"
+ color.inactiveGroup="0xCECECE"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!--- layer 1: title bar highlight @private -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0xE6E6E6" />
+ <s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+ </s:LinearGradientStroke>
+ </s:stroke>
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+ <s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+ <s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!--- layer 2: title bar divider @private -->
+ <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="0x000000" alpha="0.75" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <!--- @copy spark.components.Panel#titleDisplay -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1"
+ left="9" right="36" top="1" bottom="0" minHeight="30"
+ verticalAlign="middle" fontWeight="bold" />
+
+ <!-- layer 4: moveArea -->
+ <!--- @copy spark.components.TitleWindow#moveArea -->
+ <s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+
+ <!--- @copy spark.components.TitleWindow#closeButton -->
+ <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
+ width="15" height="15" right="7" top="7" />
+ </s:Group>
+
+ <!--
+ Note: setting the minimum size to 0 here so that changes to the host component's
+ size will not be thwarted by this skin part's minimum size. This is a compromise,
+ more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+ -->
+ <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+ <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+ </s:Group>
+
+ <!--- @private -->
+ <s:Group id="bottomGroup" minWidth="0" minHeight="0"
+ includeIn="withControls">
+
+ <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+ <!-- layer 0: control bar divider line -->
+ <s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+ <s:fill>
+ <s:SolidColor color="0x000000" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar highlight -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0xFFFFFF" />
+ <s:GradientEntry color="0xD8D8D8" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- layer 2: control bar fill -->
+ <s:Rect left="1" right="1" top="2" bottom="1">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xEDEDED"/>
+ <s:GradientEntry color="0xCDCDCD"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!--- @copy spark.components.Panel#controlBarGroup -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+ </s:layout>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+</s:SparkSkin>