List:Commits« Previous MessageNext Message »
From:Iggy Galarza Date:April 11 2011 8:30pm
Subject:bzr commit into wex-installer-1.0 branch (iggy:432)
View as plain text  
#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:iggy@stripped

  432 Iggy Galarza	2011-04-11
      Determine architecture for installed packages.
      Disallow both x64 and win32 installs.
      Check for old products at upgrade time.

    modified:
      Setup/manifest-base.xml
      WexInstaller.Core/Package.cs
      WexInstaller.Core/Product.cs
      WexInstaller/InstallWizard/DetailedUpdateCheck.cs
=== modified file 'Setup/manifest-base.xml'
--- a/Setup/manifest-base.xml	2011-04-09 02:14:47 +0000
+++ b/Setup/manifest-base.xml	2011-04-11 20:30:50 +0000
@@ -84,23 +84,23 @@
   
   <ProductCategories>
     <ProductCategory name="Server" title="MySql Servers" description="MySQL Database Servers">
-      <Product name="mysql-server-5.5-win32-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.5">
+      <Product name="mysql-server-5.5-win32-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.5"  mutual-exclusive="mysql-server-5.5-winx64-gpl">
         <Packages>
           <Package type="MSI" arch="X86" filename="mysql-5.5.11-win32.msi" id="" thisVersion="" />
         </Packages>
       </Product>
-      <Product name="mysql-server-5.5-winx64-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.5">
+      <Product name="mysql-server-5.5-winx64-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.5" mutual-exclusive="mysql-server-5.5-win32-gpl">
         <Packages>
           <Package type="MSI" arch="X64" filename="mysql-5.5.11-winx64.msi" id="" thisVersion="" />
         </Packages>
       </Product>
-      <Product name="mysql-server-5.1-win32-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.1">
+      <Product name="mysql-server-5.1-win32-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.1"  mutual-exclusive="mysql-server-5.1-winx64-gpl">
         <Packages>
           <Package type="MSI" arch="X86" filename="mysql-essential-5.1.56-win32.msi" id="" thisVersion="">
           </Package>
         </Packages>
       </Product>
-      <Product name="mysql-server-5.1-winx64-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.1">
+      <Product name="mysql-server-5.1-winx64-gpl" title="MySQL Server" description="The core MySQL database server" upgradeId="" urlBaseDir="mysql-5.1"  mutual-exclusive="mysql-server-5.1-win32-gpl">
         <Packages>
           <Package type="MSI" arch="X64" filename="mysql-essential-5.1.56-winx64.msi" id="" thisVersion="">
           </Package>

=== modified file 'WexInstaller.Core/Package.cs'
--- a/WexInstaller.Core/Package.cs	2011-04-09 02:14:47 +0000
+++ b/WexInstaller.Core/Package.cs	2011-04-11 20:30:50 +0000
@@ -163,7 +163,15 @@ namespace WexInstaller.Core
         if (ThisVersion == null)
           ThisVersion = GetMSIProductInfo("VersionString");
         if (FileName == null)
+        {
           FileName = GetMSIProductInfo("PackageName");
+          if (FileName.Contains("winx64"))
+            Architecture = PackageArchitecture.X64;
+          else if (FileName.Contains("win32"))
+            Architecture = PackageArchitecture.X86;
+          else
+            Architecture = PackageArchitecture.Any;
+        }
 
         if (!string.IsNullOrEmpty(DisplayName) && !string.IsNullOrEmpty(Publisher))
         {

=== modified file 'WexInstaller.Core/Product.cs'
--- a/WexInstaller.Core/Product.cs	2011-04-10 18:28:04 +0000
+++ b/WexInstaller.Core/Product.cs	2011-04-11 20:30:50 +0000
@@ -992,15 +992,20 @@ namespace WexInstaller.Core
                       foundUpgradeableProducts = PopulateRelatePackageFeatures(possibleOlderPackage);
                       if (foundUpgradeableProducts)
                       {
-                        possibleOlderPackage.PostInitialize();
-                        possibleOlderPackage.UrlBase = p.UrlBase;
-                        if (!haveNewer)
+                        if (p.Architecture == possibleOlderPackage.Architecture)
                         {
-                          // The machine has a package installed that's newer than our manifest.
-                          // Our manfest's package is outdated so toss it.
-                          Packages.Clear();
+                          possibleOlderPackage.PostInitialize();
+                          possibleOlderPackage.UrlBase = p.UrlBase;
+                          if (!haveNewer)
+                          {
+                            // The machine has a package installed that's newer than our manifest.
+                            // Our manfest's package is outdated so toss it.
+                            Packages.Clear();
+                          }
+                          Packages.Add(possibleOlderPackage);
                         }
-                        Packages.Add(possibleOlderPackage);
+                        else
+                          foundUpgradeableProducts = false;
                       }
                     }
                   }

=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-04-10 18:28:04 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-04-11 20:30:50 +0000
@@ -148,7 +148,7 @@ namespace WexInstaller
       {
         foreach (Product p in pc.Products)
         {
-          if (p.IsUpgrade && p.Installed)
+          if (p.IsUpgrade)
           {
             string detailed = p.GetUpgradeDisplayString();
             ListViewItem item = new ListViewItem(detailed);


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110411203050-oivi4alhgeos8grb.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:432) Iggy Galarza11 Apr