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/07/31 02:58:39 UTC
svn commit: r1367380 - in /incubator/flex/utilities/InstallApacheFlex:
.actionScriptProperties build.number src/InstallApacheFlex-app.xml
src/InstallApacheFlex.mxml
Author: bigosmallm
Date: Tue Jul 31 00:58:38 2012
New Revision: 1367380
URL: http://svn.apache.org/viewvc?rev=1367380&view=rev
Log:
Fixed version comparison algorithm.
Modified:
incubator/flex/utilities/InstallApacheFlex/.actionScriptProperties
incubator/flex/utilities/InstallApacheFlex/build.number
incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml
incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml
Modified: incubator/flex/utilities/InstallApacheFlex/.actionScriptProperties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/.actionScriptProperties?rev=1367380&r1=1367379&r2=1367380&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/.actionScriptProperties (original)
+++ incubator/flex/utilities/InstallApacheFlex/.actionScriptProperties Tue Jul 31 00:58:38 2012
@@ -18,7 +18,7 @@ limitations under the License.
-->
<actionScriptProperties analytics="false" mainApplicationPath="InstallApacheFlex.mxml" projectUUID="151f0ac8-8811-45cd-b935-d7c2b0949fa3" version="10">
- <compiler additionalCompilerArguments="-define=INSTALLER::buildNumber,0 -define=INSTALLER::releaseVersion,'0.7.0'" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Apache Flex 4.8.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-define=INSTALLER::buildNumber,9 -define=INSTALLER::releaseVersion,'0.7.9'" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Apache Flex 4.8.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
Modified: incubator/flex/utilities/InstallApacheFlex/build.number
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/build.number?rev=1367380&r1=1367379&r2=1367380&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/build.number (original)
+++ incubator/flex/utilities/InstallApacheFlex/build.number Tue Jul 31 00:58:38 2012
@@ -1,3 +1,3 @@
-#Build Number for ANT. Do not edit!
-#Wed Jul 25 15:03:32 EDT 2012
-build.number=9
+#Build Number for ANT. Do not edit!
+#Mon Jul 30 17:41:47 PDT 2012
+build.number=10
Modified: incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml?rev=1367380&r1=1367379&r2=1367380&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex-app.xml Tue Jul 31 00:58:38 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.9</versionNumber>
+ <versionNumber>0.7.10</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=1367380&r1=1367379&r2=1367380&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/InstallApacheFlex/src/InstallApacheFlex.mxml Tue Jul 31 00:58:38 2012
@@ -342,19 +342,33 @@ variables are not required because the l
{
//Version available
var versionXML:XML = XML(e.target.data);
- var newVersion:String = versionXML.version.toString();
+ var availableVersion:String = versionXML.version.toString();
//Current version
var applicationDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var xmlns:Namespace = new Namespace(applicationDescriptor.namespace());
var currentVersion:String = applicationDescriptor.xmlns::versionNumber.toString();
- if(newVersion > currentVersion)
+ if(isNewerVersion(availableVersion,currentVersion))
{
showUpdateDialog(versionXML);
}
}
+ protected function isNewerVersion(available:String, current:String):Boolean
+ {
+ var availBuildNumbers:Array = available.split(".");
+ var currentBuildNumbers:Array = current.split(".");
+ for (var i:int=0; i<currentBuildNumbers.length; i++)
+ {
+ if(parseInt(availBuildNumbers[i]) > parseInt(currentBuildNumbers[i]))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
protected function showUpdateDialog(versionXML:XML):void
{
var updaterDialog:UpdaterDialog = UpdaterDialog(PopUpManager.createPopUp(this,UpdaterDialog,true));