#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:iggy@stripped
510 Iggy Galarza 2011-06-21 [merge]
Auto-merge.
modified:
WexInstaller.Core/ProductManifest.cs
WexInstaller/InstallWizard/CheckRequirements.cs
WexInstaller/InstallerInfo.cs
=== modified file 'WexInstaller.Core/ProductManifest.cs'
--- a/WexInstaller.Core/ProductManifest.cs 2011-06-09 12:46:14 +0000
+++ b/WexInstaller.Core/ProductManifest.cs 2011-06-20 16:32:22 +0000
@@ -33,7 +33,19 @@ namespace WexInstaller.Core
/// </summary>
public void Cleanup(bool commercial)
{
+ // First remove all catalogs that do not match the release type.
ProductCatalogs.RemoveAll(catalog => catalog.Commercial != commercial);
+
+ // Now collect all remaining products and remove all products from the categories
+ // that are not referenced by any category.
+ List<string> usedProducts = new List<string>();
+ foreach (ProductCatalog catalog in ProductCatalogs)
+ foreach (CatalogProduct product in catalog.Products)
+ if (!usedProducts.Contains(product.ProductId))
+ usedProducts.Add(product.ProductId);
+
+ foreach (ProductCategory category in ProductCategories)
+ category.Products.RemoveAll(product => !usedProducts.Contains(product.Name));
}
}
}
=== modified file 'WexInstaller/InstallWizard/CheckRequirements.cs'
--- a/WexInstaller/InstallWizard/CheckRequirements.cs 2011-06-06 12:33:14 +0000
+++ b/WexInstaller/InstallWizard/CheckRequirements.cs 2011-06-20 16:32:22 +0000
@@ -90,6 +90,9 @@ namespace WexInstaller
if ((product.ProposedInstalled && product.IsUpgrade) || product.HasChanges())
{
foreach (Package package in product.Packages)
+ {
+ if (package.Requirements == null)
+ continue;
foreach (PackageRequirement requirement in package.Requirements)
{
bool stillRequired = false;
@@ -132,7 +135,7 @@ namespace WexInstaller
string tempFile = Path.Combine(InstallerConfiguration.ProductCachePath, Path.GetFileName(requirement.Location));
item.Tag = new RequirementEntry(requirement, product, tempFile);
item.SubItems.Add(product.TitleWithVersion);
-
+
// Add pending requirements at the end of the list, otherwise at the begin.
// Mark the entry to show if it is already ok or not.
if (stillRequired)
@@ -146,7 +149,7 @@ namespace WexInstaller
requirementsList.Items.Insert(0, item);
}
}
-
+ }
}
taskLabel.Text = "";
=== modified file 'WexInstaller/InstallerInfo.cs'
--- a/WexInstaller/InstallerInfo.cs 2011-05-23 09:51:15 +0000
+++ b/WexInstaller/InstallerInfo.cs 2011-06-20 16:42:02 +0000
@@ -187,7 +187,17 @@ namespace WexInstaller
{
protected string GetValue(PropertyDataCollection collection, string name)
{
- PropertyData data = collection[name];
+ PropertyData data = null;
+ try
+ {
+ data = collection[name];
+ }
+ catch (System.Exception)
+ {
+ // We cannot check the collection if it contains a value so we have to
+ // catch any exception to find out.
+ }
+
if (data != null)
return (data.Value == null) ? "0" : data.Value.ToString();
Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110621134118-8z4vgncx41yge6za.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (iggy:510) | Iggy Galarza | 22 Jun |