#At file:///D:/Work/MySQL/installer/ based on revid:mike.lischke@stripped
438 Mike Lischke 2011-04-18
- Product: state strings without trailing dot (those are no sentences) + clearer description for already installed products with pending changes.
- Product: HasChanges doesn't need to loop over all features as the features will do a depth first iteration.
- Product: Improved setup type determination.
- InstallProgress: in order to support per-feature modifications products must be listed also if only a subfeature changes independant of the installation proposal state of the owning product.
modified:
WexInstaller.Core/Product.cs
WexInstaller/InstallWizard/DetailedUpdateCheck.cs
WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs
WexInstaller/InstallWizard/InstallProgressPanel.cs
WexInstaller/InstallWizard/InstallProgressPanel.resx
=== modified file 'WexInstaller.Core/Product.cs'
=== modified file 'WexInstaller.Core/Product.cs'
--- a/WexInstaller.Core/Product.cs 2011-04-11 20:32:47 +0000
+++ b/WexInstaller.Core/Product.cs 2011-04-18 13:14:52 +0000
@@ -269,67 +269,67 @@
result = String.Empty;
break;
case ProductState.WebRemote:
- result = "To be downloaded.";
+ result = "To be downloaded";
break;
case ProductState.FoundLocal:
- result = "To be installed.";
+ result = "To be installed";
break;
case ProductState.WillPerformUpgrade:
- result = "To be upgraded.";
+ result = "To be upgraded";
break;
case ProductState.CurrentlyInstalled:
- result = "Installed locally.";
+ result = "Changes pending";
break;
case ProductState.DownloadStarted:
- result = "Download started.";
+ result = "Download started";
break;
case ProductState.DownloadInProgress:
- result = "Downloading.";
+ result = "Downloading";
break;
case ProductState.DownloadSuccess:
- result = "Download success.";
+ result = "Download success";
break;
case ProductState.DownloadError:
- result = "Download failed.";
+ result = "Download failed";
break;
case ProductState.DownloadNoMirror:
result = "No Mirror Found";
break;
case ProductState.InstallStarted:
- result = "Install started.";
+ result = "Install started";
break;
case ProductState.InstallInProgress:
- result = "Installing.";
+ result = "Installing";
break;
case ProductState.InstallSuccess:
- result = "Install success.";
+ result = "Install success";
break;
case ProductState.InstallError:
- result = "Install error.";
+ result = "Install error";
break;
case ProductState.RemoveStarted:
- result = "Remove started.";
+ result = "Remove started";
break;
case ProductState.RemoveInProgress:
- result = "Removing.";
+ result = "Removing";
break;
case ProductState.RemoveSuccess:
- result = "Successfully removed.";
+ result = "Successfully removed";
break;
case ProductState.RemoveFailed:
- result = "Failed to remove.";
+ result = "Failed to remove";
break;
case ProductState.UpdateStarted:
- result = "Update started.";
+ result = "Update started";
break;
case ProductState.UpdateInProgress:
- result = "Updating.";
+ result = "Updating";
break;
case ProductState.UpdateSuccess:
- result = "Update success.";
+ result = "Update success";
break;
case ProductState.UpdateFailed:
- result = "Update failed.";
+ result = "Update failed";
break;
case ProductState.DownloadCancelled:
result = "Download canceled";
@@ -398,7 +398,7 @@
{
bool hasChanges;
hasChanges = Installed != ProposedInstalled;
- foreach (ProductFeature feature in GetPackage().AllFeatures)
+ foreach (ProductFeature feature in GetPackage().Features)
hasChanges |= feature.HasChanges();
return hasChanges;
}
@@ -733,21 +733,22 @@
// First check the product as a whole for the change type.
if (Installed || ProposedInstalled)
{
- if (Installed)
- if (ProposedInstalled)
+ if (ProposedInstalled)
+ {
+ // Upgrade only if there is a related product which we actually can upgrade.
+ if (CurrentState == ProductState.WillPerformUpgrade || Installed)
{
- // Upgrade only if there is a related product which we actually can upgrade.
- if (CurrentState == ProductState.WillPerformUpgrade)
- if (string.IsNullOrEmpty(UpgradeId))
- type = ChangeType.InstallFollowingRemove;
- else
- type = ChangeType.Update;
+ if (string.IsNullOrEmpty(UpgradeId))
+ type = ChangeType.InstallFollowingRemove;
+ else
+ type = ChangeType.Update;
}
else
+ type = ChangeType.Installation;
+ }
+ else
+ if (Installed)
type = ChangeType.Removal;
- else
- if (ProposedInstalled)
- type = ChangeType.Installation;
}
// If there was no change for the product as such go through the features to find changes.
@@ -764,7 +765,7 @@
else
type = ChangeType.Removal;
else
- if (ProposedInstalled)
+ if (feature.ProposedInstalled)
type = ChangeType.Installation;
break;
@@ -967,10 +968,11 @@
if (thisMatch.Groups["main"].Value == otherMatch.Groups["main"].Value)
{
// Unfortunately we have to do string comparisons instead just using numbers here
- // as it can happen there are additional letters in a number (<sic>).
+ // as it can happen there are additional letters in a number.
string thisBuild = thisMatch.Groups["build"].Value;
string otherBuild = otherMatch.Groups["build"].Value;
+ // The result is > if thisBuild is greater than otherBuild.
int comparison = Utilities.CompareAsNumbers(thisBuild, otherBuild);
bool haveNewer = false;
if (comparison > 0)
@@ -999,7 +1001,7 @@
if (!haveNewer)
{
// The machine has a package installed that's newer than our manifest.
- // Our manfest's package is outdated so toss it.
+ // Our manifest's package is outdated so toss it.
Packages.Clear();
}
Packages.Add(possibleOlderPackage);
=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.cs 2011-04-18 08:06:38 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.cs 2011-04-18 13:14:52 +0000
@@ -168,7 +168,6 @@
nextOk = (productList.Items.Count > 0);
NextButton.Text = Properties.Resources.NextButtonDefaultText;
NextButton.Enabled = nextOk;
- NextButton.Refresh();
}
else
{
@@ -176,7 +175,6 @@
nextOk = true;
NextButton.Text = Properties.Resources.NextButtonExecuteText;
NextButton.Enabled = true;
- NextButton.Refresh();
}
SignalChange();
}
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs 2011-04-07 14:04:55 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs 2011-04-18 13:14:52 +0000
@@ -50,8 +50,8 @@
//
// subCaptionLabel
//
- this.subCaptionLabel.Size = new System.Drawing.Size(306, 18);
- this.subCaptionLabel.Text = "The following products will be installed.";
+ this.subCaptionLabel.Size = new System.Drawing.Size(324, 14);
+ this.subCaptionLabel.Text = "The following products will be installed or updated.";
//
// stateImages
//
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-04-18 08:06:38 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-04-18 13:14:52 +0000
@@ -72,7 +72,9 @@
{
foreach (Product p in pc.Products)
{
- if ((p.ProposedInstalled == true) && (p.IsUpgrade || p.HasChanges()))
+ // In order to support per-feature changes we must check such changes independently of
+ // the installation proposal for their owning product.
+ if ((p.ProposedInstalled && p.IsUpgrade) || p.HasChanges())
{
if (!p.FoundLocal)
leftToDownload++;
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.resx'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.resx 2011-04-07 14:04:55 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.resx 2011-04-18 13:14:52 +0000
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADy
- EQAAAk1TRnQBSQFMAgEBBQEAAVABAQFQAQEBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
+ EQAAAk1TRnQBSQFMAgEBBQEAAVgBAQFYAQEBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEYBgABGBIAMP+QAAP/AQcBfAGYAQUBdgGSAQUBdgGSAQUBdgGSAQUBdgGSAQUBegGW
AQUBegGWAQUBegGWAQUBdgGSAQUBdgGSAQUBdgGSAQUBdgGSAQUBegGWASkBiAGgA/+QAAEPAZcBtwEL
AbwB4gEGAcMB6AECAbsB5AECAbsB5AECAcEB5QECAYsBpwFGAWQBegE2AawBzwECAbsB5AEBAbQB3AEB
Attachment: [text/bzr-bundle] bzr/mike.lischke@oracle.com-20110418131452-3scqr105q2kfj9y8.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (mike.lischke:438) | Mike Lischke | 18 Apr |