List:Commits« Previous MessageNext Message »
From:Iggy Galarza Date:November 22 2010 6:28pm
Subject:bzr commit into wex-installer-1.0 branch (iggy:236)
View as plain text  
#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:iggy@stripped

  236 Iggy Galarza	2010-11-22
      - Make sure the UrlBase is handled and specified correctly.
      - Allow multiple attempts to download updated manifest.
      - Fix manfiest download timer.
      - Fix failing upgrade bug.

    modified:
      Setup_Net/config.xml
      Setup_Net/products.xml
      WexInstaller/Controls/InstallWizardControl.cs
      WexInstaller/Controls/RemoveControl.cs
      WexInstaller/Core/Package.cs
      WexInstaller/Core/Product.cs
      WexInstaller/Core/ProductManager.cs
      WexInstaller/InstallWizard/DetailedUpdateCheck.cs
      WexInstaller/InstallWizard/UpdateCheck.cs
      WexInstaller/MainForm.cs
      WexInstaller/RemovePanels/RemoveProgress.cs
=== modified file 'Setup_Net/config.xml'
--- a/Setup_Net/config.xml	2010-11-18 18:39:59 +0000
+++ b/Setup_Net/config.xml	2010-11-22 18:28:54 +0000
@@ -5,7 +5,7 @@
       <URL>http://downloads.mysql.com/reg/products.xml</URL>
     </UpdateURL>
     <UpdateURL>
-      <URL>http://wb.mysql.com/reg/products.xml</URL>
+      <URL>http://wb.mysql.com/installer/products.xml</URL>
     </UpdateURL>
   </UpdateURLs>
   <UpdateTimeoutMilliseconds>7000</UpdateTimeoutMilliseconds>

=== modified file 'Setup_Net/products.xml'
--- a/Setup_Net/products.xml	2010-11-12 23:58:16 +0000
+++ b/Setup_Net/products.xml	2010-11-22 18:28:54 +0000
@@ -56,7 +56,7 @@
             </Packages>
         </Product>
     
-        <Product name="Connector-C" title="Connector/C" description="MySQL Connector for C" default="false" upgradeId="" urlBaseDir="Connector-C">
+        <Product name="Connector-C" title="Connector/C" description="MySQL Connector for C" default="false" upgradeId="" urlBaseDir="">
             <Packages>
                 <Package id="{66F9302D-E145-4375-8C84-54DA2339C483}" type="MSI" arch="X86" filename="mysql-connector-c-6.0.2-win32.msi" thisVersion="6.0.2">
                     <Feature name="ConnectorC" title="MySQL Connector C" default="true" description="The MySQL Connector C client library." display="true" hasComponents="true"/>
@@ -67,7 +67,7 @@
     </ProductCategory>
   
     <ProductCategory name="Documentation" title="Documentation" description="">
-        <Product name="Universal-Docs" title="Documents" description="A collection of popular MySQL Documents" default="false" upgradeId="{D884632C-A8F2-46E6-9944-F784F5C6A10A}" urlBaseDir="http://downloads.mysql.com/reg">
+        <Product name="Universal-Docs" title="MySQL Documentation" description="A collection of popular MySQL Documents" default="false" upgradeId="{D884632C-A8F2-46E6-9944-F784F5C6A10A}" urlBaseDir="http://wb.mysql.com/installer">
             <Packages>
                 <Package id="{C2AF9668-BC9E-412F-B766-D8238A8517B0}" type="MSI" arch="X86" filename="mysql-universal-installer-document-bundle-1.0.0.0.msi" thisVersion="1.0.0">
                     <Feature name="ConnCPPA4" title="MySQL Connector C++ User Guide A4" default="false" description="The MySQL Connector C++ User Guide in A4 format." display="true" hasComponents="true"/>

=== modified file 'WexInstaller/Controls/InstallWizardControl.cs'
--- a/WexInstaller/Controls/InstallWizardControl.cs	2010-09-24 21:01:12 +0000
+++ b/WexInstaller/Controls/InstallWizardControl.cs	2010-11-22 18:28:54 +0000
@@ -181,6 +181,12 @@ namespace WexInstaller
             ShowTab(typeTab, really, 2);
         }
 
+        public void ShowWizard()
+        {
+            wizardPages_SelectedIndexChanged(this, null);
+            this.BringToFront();
+        }
+
         void InstallerPanel_StatusChanged(object sender, EventArgs e)
         {
             InstallerPanel panel = sender as InstallerPanel;

=== modified file 'WexInstaller/Controls/RemoveControl.cs'
--- a/WexInstaller/Controls/RemoveControl.cs	2010-10-11 18:01:04 +0000
+++ b/WexInstaller/Controls/RemoveControl.cs	2010-11-22 18:28:54 +0000
@@ -58,6 +58,12 @@ namespace WexInstaller
             }
         }
 
+        public void ShowWizard()
+        {
+            wizardPages_SelectedIndexChanged(this, null);
+            this.BringToFront();
+        }
+
         private void Next_Click(object sender, EventArgs e)
         {
             if (CurrentPanel.Next())

=== modified file 'WexInstaller/Core/Package.cs'
--- a/WexInstaller/Core/Package.cs	2010-11-12 19:56:12 +0000
+++ b/WexInstaller/Core/Package.cs	2010-11-22 18:28:54 +0000
@@ -43,22 +43,25 @@ namespace WexInstaller.Core
 
         [XmlIgnore]
         public string RemotePath 
-        { 
-            get 
+        {
+            get
             {
                 string remoteURL = String.Empty;
-                if (UrlBase.Contains("http:"))
+                if (UrlBase != null && UrlBase != String.Empty)
                 {
-                    remoteURL = String.Format("{0}/{1}", UrlBase, FileName);
-                }
-                else
-                {
-                    remoteURL = String.Format("http://downloads.mysql.com/archives/{0}", UrlBase);
-                    if (!remoteURL.EndsWith("/"))
+                    if (UrlBase.Contains("http:"))
                     {
-                        remoteURL += "/";
+                        remoteURL = String.Format("{0}/{1}", UrlBase, FileName);
+                    }
+                    else
+                    {
+                        remoteURL = String.Format("http://downloads.mysql.com/archives/{0}", UrlBase);
+                        if (!remoteURL.EndsWith("/"))
+                        {
+                            remoteURL += "/";
+                        }
+                        remoteURL += FileName;
                     }
-                    remoteURL += FileName;
                 }
                 return remoteURL;
             } 

=== modified file 'WexInstaller/Core/Product.cs'
--- a/WexInstaller/Core/Product.cs	2010-11-12 23:58:16 +0000
+++ b/WexInstaller/Core/Product.cs	2010-11-22 18:28:54 +0000
@@ -56,7 +56,7 @@ namespace WexInstaller.Core
             InstallActionLog = new StringBuilder();
             wc = new WebClient();
             CurrentState = ProductState.Unknown;
-            useCurrentlyInstalledPacakge = true;
+            useCurrentlyInstalledPacakge = false;
             msiVersion = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\msi.dll");
         }
 

=== modified file 'WexInstaller/Core/ProductManager.cs'
--- a/WexInstaller/Core/ProductManager.cs	2010-11-18 18:39:59 +0000
+++ b/WexInstaller/Core/ProductManager.cs	2010-11-22 18:28:54 +0000
@@ -49,12 +49,6 @@ namespace WexInstaller.Core
         {
             Logger.LogTrace("ProductManager.Load()");
 
-            if (File.Exists(InstallerConfiguration.TempManifest))
-            {
-                File.Delete(InstallerConfiguration.TempManifest);
-                Logger.LogInformation("Removed existing temporary product manifest.");
-            }
-
             ProductCategory[] productArray = ObjectifyManifest(InstallerConfiguration.ProductsManifest);
 
             if (productArray != null)
@@ -99,8 +93,6 @@ namespace WexInstaller.Core
 
         private static void DownloadManifestComplete(object sender, AsyncCompletedEventArgs e)
         {
-            downloadMonitor.Dispose();
-
             if (e.Cancelled == false && e.Error == null)
             {
                 Logger.LogInformation(String.Format("Successfully downloaded new product manifest from {0}.", (string) e.UserState));
@@ -145,6 +137,7 @@ namespace WexInstaller.Core
         private static void DownloadManifestProgress(object sender, DownloadProgressChangedEventArgs e)
         {
             Logger.LogInformation(String.Format("Downloaded {0} of new manifest.", e.ProgressPercentage));
+            downloadMonitor.Dispose();
 
             if (DownloadManifestProgressChanged != null)
             {
@@ -171,6 +164,13 @@ namespace WexInstaller.Core
         public static bool DownloadManifest()
         {
             Logger.LogTrace("ProductManager.DownloadManifest()");
+
+            if (File.Exists(InstallerConfiguration.TempManifest))
+            {
+                File.Delete(InstallerConfiguration.TempManifest);
+                Logger.LogInformation("Removed existing temporary product manifest.");
+            }
+
             wc = new WebClient();
             downloadMonitor = new Timer(downloadMonitorCallback, null, InstallerConfiguration.UpdateTimeoutMilliseconds, Timeout.Infinite);
 

=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2010-11-18 18:39:59 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2010-11-22 18:28:54 +0000
@@ -106,11 +106,28 @@ namespace WexInstaller
 
         public override void Activate()
         {
-            if (!executed)
-            {
-                NextButton.Text = "&Execute";
-                NextButton.Refresh();
-            }
+            executed = false;
+            
+            //Re-set the icon locations. 
+            Point p = connectionEmptyIcon.Location;
+            p.X = currentActionIcon.Location.X;
+            currentActionIcon.Location = p;
+            currentActionFailedIcon.Location = p;
+            currentActionIcon.Visible = false;
+            currentActionFailedIcon.Visible = false;
+
+            connectionSuccessIcon.Visible = false;
+            connectionEmptyIcon.BringToFront();
+            connectionEmptyIcon.Visible = true;
+
+            fetchSuccessIcon.Visible = false;
+            fetchEmptyIcon.BringToFront();
+            fetchEmptyIcon.Visible = true;
+
+            NextButton.Text = "&Execute";
+            NextButton.Enabled = true;
+            NextButton.Refresh();
+            nextOk = true;
 
             UpdateProductList();
 

=== modified file 'WexInstaller/InstallWizard/UpdateCheck.cs'
--- a/WexInstaller/InstallWizard/UpdateCheck.cs	2010-11-18 18:39:59 +0000
+++ b/WexInstaller/InstallWizard/UpdateCheck.cs	2010-11-22 18:28:54 +0000
@@ -103,6 +103,24 @@ namespace WexInstaller
             NextButton.Text = "&Execute";
             NextButton.Refresh();
 
+            skipUpdates.Enabled = true;
+            directionLabel.Visible = false;
+
+            Point p = connectionEmptyIcon.Location;
+            p.X = currentActionIcon.Location.X;
+            currentActionIcon.Location = p;
+            currentActionFailedIcon.Location = p;
+            currentActionIcon.Visible = false;
+            currentActionFailedIcon.Visible = false;
+
+            connectionSuccessIcon.Visible = false;
+            connectionEmptyIcon.BringToFront();
+            connectionEmptyIcon.Visible = true;
+
+            fetchSuccessIcon.Visible = false;
+            fetchEmptyIcon.BringToFront();
+            fetchEmptyIcon.Visible = true;
+
             base.Activate();
         }
 

=== modified file 'WexInstaller/MainForm.cs'
--- a/WexInstaller/MainForm.cs	2010-11-12 23:58:16 +0000
+++ b/WexInstaller/MainForm.cs	2010-11-22 18:28:54 +0000
@@ -24,7 +24,7 @@ namespace WexInstaller
             Logger.LogTrace("MainForm.DoInstall() called.");
 
             last = welcomeControl;
-            installWizardControl.BringToFront();
+            installWizardControl.ShowWizard();
         }
 
         public void DoModify()
@@ -35,7 +35,7 @@ namespace WexInstaller
             {
                 foreach (Product p in pc.Products)
                 {
-                        p.UseCurrentlyInstalledPackage = true;
+                    p.UseCurrentlyInstalledPackage = true;
                 }
             }
 
@@ -54,7 +54,7 @@ namespace WexInstaller
             {
                 foreach (Product p in pc.Products)
                 {
-                        p.UseCurrentlyInstalledPackage = false;
+                    p.UseCurrentlyInstalledPackage = false;
                 }
             }
 
@@ -73,12 +73,12 @@ namespace WexInstaller
             {
                 foreach (Product p in pc.Products)
                 {
-                        p.UseCurrentlyInstalledPackage = true;
+                    p.UseCurrentlyInstalledPackage = true;
                 }
             }
 
             last = welcomeControl;
-            removeControl.BringToFront();
+            removeControl.ShowWizard();
         }
 
         public void GoBack()

=== modified file 'WexInstaller/RemovePanels/RemoveProgress.cs'
--- a/WexInstaller/RemovePanels/RemoveProgress.cs	2010-10-01 13:46:31 +0000
+++ b/WexInstaller/RemovePanels/RemoveProgress.cs	2010-11-22 18:28:54 +0000
@@ -30,26 +30,8 @@ namespace WexInstaller
         {
             InitializeComponent();
 
-            productList.Items.Clear();
-            foreach (ProductCategory pc in ProductManager.ProductCategories)
-            {
-                foreach (Product p in pc.Products)
-                {
-                    if (p.Installed)
-                    {
-                        ListViewItem item = new ListViewItem(p.TitleWithVersion);
-                        item.Name = p.Title;
-                        item.Tag = p;
-                        item.SubItems.Add(String.Empty);
-                        item.SubItems.Add(String.Empty);
-                        item.Checked = true;
-                        productList.Items.Add(item);
-                    }
-                }
-            }
-
             clearedToProceed = new AutoResetEvent(true);
-            nextOk = false;
+            nextOk = true;
             backOk = true;
             executed = false;
         }
@@ -133,6 +115,24 @@ namespace WexInstaller
 
         public override void Activate()
         {
+            productList.Items.Clear();
+            foreach (ProductCategory pc in ProductManager.ProductCategories)
+            {
+                foreach (Product p in pc.Products)
+                {
+                    if (p.Installed)
+                    {
+                        ListViewItem item = new ListViewItem(p.TitleWithVersion);
+                        item.Name = p.Title;
+                        item.Tag = p;
+                        item.SubItems.Add(String.Empty);
+                        item.SubItems.Add(String.Empty);
+                        item.Checked = true;
+                        productList.Items.Add(item);
+                    }
+                }
+            }
+
             if (!executed)
             {
                 NextButton.Text = "&Execute";


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20101122182854-kf14c6qhoo7gwse6.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:236) Iggy Galarza22 Nov