List:Commits« Previous MessageNext Message »
From:Iggy Galarza Date:September 23 2010 12:45am
Subject:bzr commit into wex-installer-1.0 branch (iggy:204)
View as plain text  
#At file:///C:/src/bzr.mysql/wex/mine/installer/ based on revid:iggy@stripped

  204 Iggy Galarza	2010-09-22
      - Make sure to read the proper reg keys when executing on a 64-bit Windows7 environment and installing 32-bit packages.
      - Corrected regex template search for paths with ( and ).
      - Added additional exception checks.
      - Added requested scroll bars.
      - Log detail index starts with 1 not 0.
      - Made RemoveAll consistent with Install.

    modified:
      WexInstaller/Controls/RemoveAllPage.Designer.cs
      WexInstaller/Controls/RemoveAllPage.cs
      WexInstaller/Core/Package.cs
      WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs
      WexInstaller/InstallWizard/InstallProgressPanel.cs
      WexInstaller/InstallWizard/InstallationComplete.Designer.cs
      WexInstaller/InstallWizard/InstallationComplete.cs
      WexInstaller/Panels/ServerConfigPanel2.cs
      WexInstaller/Panels/ServerConfigPanel4.cs
=== modified file 'WexInstaller/Controls/RemoveAllPage.Designer.cs'
--- a/WexInstaller/Controls/RemoveAllPage.Designer.cs	2010-09-08 20:43:51 +0000
+++ b/WexInstaller/Controls/RemoveAllPage.Designer.cs	2010-09-23 00:45:16 +0000
@@ -40,6 +40,7 @@
             this.progressHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.detailedLog = new System.Windows.Forms.TextBox();
             this.sideBarControl1 = new WexInstaller.SideBarControl();
+            this.enableDetails = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
@@ -141,6 +142,7 @@
             this.detailedLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
             this.detailedLog.Size = new System.Drawing.Size(513, 192);
             this.detailedLog.TabIndex = 13;
+            this.detailedLog.Visible = false;
             // 
             // sideBarControl1
             // 
@@ -152,11 +154,24 @@
             this.sideBarControl1.Size = new System.Drawing.Size(220, 562);
             this.sideBarControl1.TabIndex = 8;
             // 
+            // enableDetails
+            // 
+            this.enableDetails.AutoSize = true;
+            this.enableDetails.Location = new System.Drawing.Point(245, 303);
+            this.enableDetails.Name = "enableDetails";
+            this.enableDetails.Size = new System.Drawing.Size(89, 23);
+            this.enableDetails.TabIndex = 14;
+            this.enableDetails.Text = "&Show Details >";
+            this.enableDetails.UseVisualStyleBackColor = true;
+            this.enableDetails.Visible = false;
+            this.enableDetails.Click += new System.EventHandler(this.enableDetails_Click);
+            // 
             // RemoveAllPage
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
+            this.Controls.Add(this.enableDetails);
             this.Controls.Add(this.detailedLog);
             this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.startButton);
@@ -189,5 +204,6 @@
         private System.Windows.Forms.ColumnHeader productHeader;
         private System.Windows.Forms.ColumnHeader progressHeader;
         private System.Windows.Forms.TextBox detailedLog;
+        private System.Windows.Forms.Button enableDetails;
     }
 }

=== modified file 'WexInstaller/Controls/RemoveAllPage.cs'
--- a/WexInstaller/Controls/RemoveAllPage.cs	2010-09-08 20:43:51 +0000
+++ b/WexInstaller/Controls/RemoveAllPage.cs	2010-09-23 00:45:16 +0000
@@ -132,6 +132,7 @@ namespace WexInstaller
 
         private void startButton_Click(object sender, EventArgs e)
         {
+            enableDetails.Visible = true;
 
             if (productList.CheckedItems.Count > 0)
             {
@@ -206,5 +207,12 @@ namespace WexInstaller
             }
         }
 
+        private void enableDetails_Click(object sender, EventArgs e)
+        {
+            enableDetails.Visible = false;
+            detailedLog.Visible = true;
+            detailedLog.BringToFront();
+        }
+
     }
 }

=== modified file 'WexInstaller/Core/Package.cs'
--- a/WexInstaller/Core/Package.cs	2010-08-19 19:33:44 +0000
+++ b/WexInstaller/Core/Package.cs	2010-09-23 00:45:16 +0000
@@ -119,7 +119,22 @@ namespace WexInstaller.Core
 
                     // Open registry and fetch all the keys and their values into a local dictionary.
                     RegistryKey packageKey = Registry.LocalMachine;
-                    packageKey = packageKey.OpenSubKey(String.Format("SOFTWARE\\{0}\\{1}", Publisher, DisplayName), false);
+                    packageKey = packageKey.OpenSubKey("SOFTWARE\\");
+                    if (Architecture == PackageArchitecture.X86)
+                    {
+                        // Try to open the 32-bit Subkey.
+                        try
+                        {
+                            RegistryKey tempKey = packageKey.OpenSubKey("Wow6432Node\\");
+                            if (tempKey != null)
+                                packageKey = tempKey;
+                        }
+                        catch
+                        {
+                            // This fails when running on a 32 bit machine or OS version < Vista
+                        }
+                    }
+                    packageKey = packageKey.OpenSubKey(String.Format("{0}\\{1}", Publisher, DisplayName), false);
 
                     if (packageKey != null)
                     {

=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs	2010-09-14 16:57:46 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.Designer.cs	2010-09-23 00:45:16 +0000
@@ -132,6 +132,7 @@
             this.detailsText.Multiline = true;
             this.detailsText.Name = "detailsText";
             this.detailsText.ReadOnly = true;
+            this.detailsText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
             this.detailsText.Size = new System.Drawing.Size(465, 143);
             this.detailsText.TabIndex = 9;
             this.detailsText.Visible = false;

=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.cs	2010-09-20 22:31:15 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.cs	2010-09-23 00:45:16 +0000
@@ -64,7 +64,6 @@ namespace WexInstaller
                     productList.Items.Add(item);
                 }
             }
-            leftToInstall = productList.Items.Count;
 
             if (productList.Items.Count > 0)
                 installingItem = productList.Items[0];
@@ -189,7 +188,7 @@ namespace WexInstaller
         private void AddToDetailsText(int index, string message)
         {
             detailsText.AppendText(String.Format("{0}: {1}{2}", 
-                                                 index, 
+                                                 (index + 1), 
                                                  message, 
                                                  Environment.NewLine
                                                  )
@@ -248,6 +247,8 @@ namespace WexInstaller
 
         private void InstallNextPackage()
         {
+            leftToInstall = productList.Items.Count;
+
             while (leftToInstall > 0)
             {
                 foreach (ListViewItem item in productList.Items)
@@ -255,11 +256,14 @@ namespace WexInstaller
                     Product p = (Product)item.Tag;
                     if (p.CurrentState != ProductState.DownloadSuccess &&
                         p.CurrentState != ProductState.FoundLocal &&
-                        p.CurrentState != ProductState.WillPerformUpgrade) continue;
+                        p.CurrentState != ProductState.WillPerformUpgrade)
+                    {
+                        leftToInstall--;
+                        continue;
+                    }
                     installingItem = item;
                     p.ProductInstallationProgressChanged += new ProductInstationActionEventHandler(ProductInstallationProgressChanged);
                     p.MakeChanges();
-                    leftToInstall--;
                     return;
                 }
                 Application.DoEvents();

=== modified file 'WexInstaller/InstallWizard/InstallationComplete.Designer.cs'
--- a/WexInstaller/InstallWizard/InstallationComplete.Designer.cs	2010-09-07 21:23:40 +0000
+++ b/WexInstaller/InstallWizard/InstallationComplete.Designer.cs	2010-09-23 00:45:16 +0000
@@ -38,7 +38,7 @@
             // 
             this.actionLabel.AutoSize = true;
             this.actionLabel.Font = new System.Drawing.Font("Tahoma", 10F);
-            this.actionLabel.Location = new System.Drawing.Point(14, 86);
+            this.actionLabel.Location = new System.Drawing.Point(12, 80);
             this.actionLabel.Name = "actionLabel";
             this.actionLabel.Size = new System.Drawing.Size(295, 17);
             this.actionLabel.TabIndex = 2;
@@ -48,9 +48,9 @@
             // 
             this.copyClipboard.AutoSize = true;
             this.copyClipboard.Font = new System.Drawing.Font("Tahoma", 8.25F);
-            this.copyClipboard.Location = new System.Drawing.Point(15, 129);
+            this.copyClipboard.Location = new System.Drawing.Point(13, 120);
             this.copyClipboard.Name = "copyClipboard";
-            this.copyClipboard.Size = new System.Drawing.Size(164, 28);
+            this.copyClipboard.Size = new System.Drawing.Size(141, 26);
             this.copyClipboard.TabIndex = 3;
             this.copyClipboard.Text = "C&opy Log to Clipboard";
             this.copyClipboard.UseVisualStyleBackColor = true;
@@ -60,9 +60,9 @@
             // 
             this.copyEmail.AutoSize = true;
             this.copyEmail.Font = new System.Drawing.Font("Tahoma", 8.25F);
-            this.copyEmail.Location = new System.Drawing.Point(228, 131);
+            this.copyEmail.Location = new System.Drawing.Point(195, 122);
             this.copyEmail.Name = "copyEmail";
-            this.copyEmail.Size = new System.Drawing.Size(143, 26);
+            this.copyEmail.Size = new System.Drawing.Size(123, 24);
             this.copyEmail.TabIndex = 4;
             this.copyEmail.Text = "S&end Log to Oracle";
             this.copyEmail.UseVisualStyleBackColor = true;
@@ -73,7 +73,7 @@
             // 
             this.startWorkbench.AutoSize = true;
             this.startWorkbench.Font = new System.Drawing.Font("Tahoma", 8.25F);
-            this.startWorkbench.Location = new System.Drawing.Point(15, 292);
+            this.startWorkbench.Location = new System.Drawing.Point(13, 271);
             this.startWorkbench.Name = "startWorkbench";
             this.startWorkbench.Size = new System.Drawing.Size(201, 17);
             this.startWorkbench.TabIndex = 5;
@@ -82,7 +82,7 @@
             // 
             // InstallationComplete
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.startWorkbench);
             this.Controls.Add(this.copyClipboard);
@@ -90,7 +90,7 @@
             this.Controls.Add(this.copyEmail);
             this.DoubleBuffered = true;
             this.Name = "InstallationComplete";
-            this.Size = new System.Drawing.Size(653, 537);
+            this.Size = new System.Drawing.Size(560, 499);
             this.Load += new System.EventHandler(this.InstallationComplete_Load);
             this.Controls.SetChildIndex(this.copyEmail, 0);
             this.Controls.SetChildIndex(this.actionLabel, 0);

=== modified file 'WexInstaller/InstallWizard/InstallationComplete.cs'
--- a/WexInstaller/InstallWizard/InstallationComplete.cs	2010-09-09 17:49:17 +0000
+++ b/WexInstaller/InstallWizard/InstallationComplete.cs	2010-09-23 00:45:16 +0000
@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
 using System.Data;
+using System.IO;
 using System.Text;
 using System.Windows.Forms;
 using WexInstaller.Core;
@@ -29,12 +30,25 @@ namespace WexInstaller
             if (startWorkbench.Checked == true)
             {
                 // Launch the Workbench process.
-                string WBPath = String.Format("{0}\\MySQL Workbench 5.1 OSS\\MySQLWorkbench.exe", InstallerConfiguration.ProposedInstallationPath);
+                string workbenchFullPath = String.Empty;
+                foreach (ProductCategory c in ProductManager.ProductCategories)
+                {
+                    foreach (Product p in c.Products)
+                    {
+                        if (p.Name == "Workbench")
+                        {
+                            Package pack = p.GetPackage();
+                            pack.RegistryEntries.TryGetValue("Location", out workbenchFullPath);
+                        }
+                    }
+                }
+                workbenchFullPath += "MySQLWorkbench.exe";
+
                 try
                 {
-                    Process.Start(WBPath);
+                    Process.Start(workbenchFullPath);
                 }
-                finally
+                catch
                 {
                 }
             }

=== modified file 'WexInstaller/Panels/ServerConfigPanel2.cs'
--- a/WexInstaller/Panels/ServerConfigPanel2.cs	2010-09-20 20:50:09 +0000
+++ b/WexInstaller/Panels/ServerConfigPanel2.cs	2010-09-23 00:45:16 +0000
@@ -184,7 +184,7 @@ namespace WexInstaller.Panels
             if (Controller.ServiceName != null && Controller.ServiceName.Length > 0)
                 defaultServiceName = Controller.ServiceName;
 
-            if (!Controller.it.Reconfiguring && defaultServiceName != String.Empty)
+            if (Controller.it != null && !Controller.it.Reconfiguring && defaultServiceName != String.Empty)
             {
                 int i = 0;
                 while (ServiceNameAvailable(defaultServiceName) == false)

=== modified file 'WexInstaller/Panels/ServerConfigPanel4.cs'
--- a/WexInstaller/Panels/ServerConfigPanel4.cs	2010-09-07 17:31:56 +0000
+++ b/WexInstaller/Panels/ServerConfigPanel4.cs	2010-09-23 00:45:16 +0000
@@ -58,6 +58,7 @@ namespace WexInstaller.Panels
             {
                 nextOk = false;
                 backOk = false;
+                SignalChange();
 
                 NextButton.Text = "&Next >";
                 NextButton.Refresh();


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20100923004516-8p99t302xzksoz22.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:204) Iggy Galarza23 Sep