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

  225 Iggy Galarza	2010-11-11
      Re-purposed Package.RemotePath to point to the MySQL archive location.
      If mirror list is empty, use archive.

    modified:
      Setup_Net/config.xml
      Setup_Net/products.xml
      WexInstaller/Core/Package.cs
      WexInstaller/Core/Product.cs
=== modified file 'Setup_Net/config.xml'
--- a/Setup_Net/config.xml	2010-09-24 21:01:12 +0000
+++ b/Setup_Net/config.xml	2010-11-11 18:50:20 +0000
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-  <PreferredMirror>http://mysql.mirrors.hoobly.com/</PreferredMirror>
   <UpdateURL>http://downloads.mysql.com/reg/products.xml</UpdateURL>
   <UpdateCheckFrequency>7</UpdateCheckFrequency>
   <ProductCachePath>C:\ProgramData\MySQL\MySQL Universal Installer\Product Cache\</ProductCachePath>

=== modified file 'Setup_Net/products.xml'
--- a/Setup_Net/products.xml	2010-11-03 15:06:04 +0000
+++ b/Setup_Net/products.xml	2010-11-11 18:50:20 +0000
@@ -2,7 +2,7 @@
 
 <ProductCategories>
   <ProductCategory name="Server" title="MySql Servers" description="MySQL Database Servers">
-    <Product name="mysql-server" title="MySQL Server" description="The core MySQL database server" default="true" thisVersion="5.5.5" upgradeId="{49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3}">
+    <Product name="mysql-server" title="MySQL Server" description="The core MySQL database server" default="true" thisVersion="5.5.5" upgradeId="{49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3}" urlBaseDir="mysql-5.5">
       <Feature name="Server" title="MySQL Server" description="Installs the MySQL-server executables." size="0" default="true">
         <Feature name="DataFiles" title="MySQL Server Datafiles" description="The MySQL Server's datafiles" default="true"/>
       </Feature>
@@ -13,49 +13,49 @@
       </Feature>
       <Feature name="DevelopmentFiles" title="C Include Files / Lib Files" description="Installs the C-Header files and necessary lib-files for developing C/C++ applications that communicate with a mysql-server." size="0"/>
       <Packages>
-        <Package id="{7E900C59-ED32-4F0C-804D-4306DF36C6E0}" type="MSI" arch="X86" filename="mysql-5.5.5-m3-win32.msi" urlBaseDir="MySQL-5.5"/>
+        <Package id="{7E900C59-ED32-4F0C-804D-4306DF36C6E0}" type="MSI" arch="X86" filename="mysql-5.5.5-m3-win32.msi"/>
       </Packages>
     </Product>
   </ProductCategory>
 
   <ProductCategory name="Application" title="Applications" description="Applications that work with MySQL">
-    <Product name="Workbench" title="MySQL Workbench" description="The MySQL GUI Developer tool" default="true" thisVersion="5.2.28" upgradeId="{84C668F4-A0C9-4585-A463-AADE0EFC9391}">
+    <Product name="Workbench" title="MySQL Workbench" description="The MySQL GUI Developer tool" default="true" thisVersion="5.2.28" upgradeId="{84C668F4-A0C9-4585-A463-AADE0EFC9391}" urlBaseDir="MySQLGUITools">
       <Feature name="MysqlWorkbenchCore" title="MySQL Workbench Core" description="Core components needed to run MySQL Workbench" size="0"/>
       <Feature name="UpdateWizard" title="Update Feature" description="Built in update feature that connects to MySQL.com" size="0"/>
       <Packages>
-        <Package id="{1BA8864E-AE9C-42AA-8F34-D76B7EE68817}" type="MSI" arch="X86" filename="mysql-workbench-gpl-5.2.28-win32.msi" urlBaseDir="MySQLGUITools" />
+        <Package id="{1BA8864E-AE9C-42AA-8F34-D76B7EE68817}" type="MSI" arch="X86" filename="mysql-workbench-gpl-5.2.28-win32.msi"/>
       </Packages>
     </Product>
   </ProductCategory>
 
   <ProductCategory name="Connector" title="MySQL Connectors" description="Database drivers for programming languages">
-    <Product name="Connector-odbc" title="Connector/ODBC" description="MySQL Connector for ODBC" default="false" thisVersion="5.1.6" upgradeId="{FF073FBB-32E2-4052-B6B2-830C5ED4A809}">
+    <Product name="Connector-odbc" title="Connector/ODBC" description="MySQL Connector for ODBC" default="false" thisVersion="5.1.6" upgradeId="{FF073FBB-32E2-4052-B6B2-830C5ED4A809}" urlBaseDir="Connector-ODBC/5.1">
       <Feature name="ODBC_32" title="MySQL Connector/ODBC driver"  default="true" description="Installs the MySQL ODBC 5.1.6 32-bit driver."/>
       <Feature name="Help" title="MySQL Connector/ODBC 5.1.6 Documentation" default="true" description="Installs the MySQL ODBC driver help."/>
       <Packages>
-        <Package id="{29042B1C-0713-4575-B7CA-5C8E7B0899D4}" type="MSI" arch="X86" filename="mysql-connector-odbc-5.1.6-win32.msi" urlBaseDir="Connector-ODBC/5.1"/>
+        <Package id="{29042B1C-0713-4575-B7CA-5C8E7B0899D4}" type="MSI" arch="X86" filename="mysql-connector-odbc-5.1.6-win32.msi"/>
       </Packages>
     </Product>
 
-    <Product name="Connector-cpp" title="Connector/C++" description="MySQL Connector for C++" default="false" thisVersion="1.0.5" upgradeId="{FE990D78-8BB1-4880-930A-0430E707F3CA}">
+    <Product name="Connector-cpp" title="Connector/C++" description="MySQL Connector for C++" default="false" thisVersion="1.0.5" upgradeId="{FE990D78-8BB1-4880-930A-0430E707F3CA}" urlBaseDir="Connector-C++">
       <Feature name="ConnectorCPP" title="MySQL Connector C++" default="true" description="The MySQL Connector C++ client library."/>
       <Feature name="DebugLibraries" title="Debug Libary" default="false" description="Debug library and symbols."/>
       <Packages>
-        <Package id="{C13C9E31-F8D7-464D-A246-5A42AC0AB93E}" type="MSI" arch="X86" filename="mysql-connector-c++-1.0.5-win32.msi" urlBaseDir="Connector-C++"/>
+        <Package id="{C13C9E31-F8D7-464D-A246-5A42AC0AB93E}" type="MSI" arch="X86" filename="mysql-connector-c++-1.0.5-win32.msi"/>
       </Packages>
     </Product>
 
-    <Product name="Connector-C" title="Connector/C" description="MySQL Connector for C" default="false" thisVersion="6.0.2" upgradeId="">
+    <Product name="Connector-C" title="Connector/C" description="MySQL Connector for C" default="false" thisVersion="6.0.2" upgradeId="" urlBaseDir="Connector-C">
       <Feature name="ConnectorC" title="MySQL Connector C" default="true" description="The MySQL Connector C client library."/>
       <Feature name="DebugLibraries" title="Debug Libary" default="false" description="Debug library and symbols."/>
       <Packages>
-        <Package id="{66F9302D-E145-4375-8C84-54DA2339C483}" type="MSI" arch="X86" filename="mysql-connector-c-6.0.2-win32.msi" urlBaseDir="Connector-C"/>
+        <Package id="{66F9302D-E145-4375-8C84-54DA2339C483}" type="MSI" arch="X86" filename="mysql-connector-c-6.0.2-win32.msi"/>
       </Packages>
     </Product>
   </ProductCategory>
 
   <ProductCategory name="Documentation" title="Documentation" description="">
-    <Product name="Universal-Docs" title="Documents" description="A collection of popular MySQL Documents" default="false" thisVersion="0.0.1" upgradeId="{D884632C-A8F2-46E6-9944-F784F5C6A10A}">
+    <Product name="Universal-Docs" title="Documents" description="A collection of popular MySQL Documents" default="false" thisVersion="0.0.1" upgradeId="{D884632C-A8F2-46E6-9944-F784F5C6A10A}" urlBaseDir="http://downloads.mysql.com/reg">
 	  <Feature name="ConnCPPA4" title="MySQL Connector C++ User Guide A4" default="false" description="The MySQL Connector C++ User Guide in A4 format."/>
 	  <Feature name="ConnCPP" title="MySQL Connector C++ User Guide" default="true" description="The MySQL Connector C++ User Guide."/>
 	  <Feature name="ConnNETA4" title="MySQL Connector .NET User Guide A4" default="false" description="The MySQL Connector .NET User Guide in A4 fomat"/>
@@ -67,7 +67,7 @@
 	  <Feature name="WBA4Feature" title="MySQL Workbench User Guide A4" default="false" description="MySQL Workbench User Guide in A4 format."/>
 	  <Feature name="WBFeature" title="MySQL Workbench User Guide" default="true" description="The MySQL Workbench User Guide."/>
 	  <Packages>
-	    <Package id="{8F14D855-6954-41D1-B81B-B4EC56AD4C2D}" type="MSI" arch="X86" filename="mysql-universal-installer-document-bundle-1.0.0.0.msi" urlBaseDir="http://downloads.mysql.com/reg"/>
+	    <Package id="{8F14D855-6954-41D1-B81B-B4EC56AD4C2D}" type="MSI" arch="X86" filename="mysql-universal-installer-document-bundle-1.0.0.0.msi"/>
 	  </Packages>
     </Product>    
   </ProductCategory>

=== modified file 'WexInstaller/Core/Package.cs'
--- a/WexInstaller/Core/Package.cs	2010-11-06 19:35:48 +0000
+++ b/WexInstaller/Core/Package.cs	2010-11-11 18:50:20 +0000
@@ -29,13 +29,13 @@ namespace WexInstaller.Core
             set { PackageCode = value; UpdateOptionalParameters(); }
         }
 
-        [XmlAttribute("urlBaseDir")]
-        public string UrlBase { get; set; }
-
         [XmlElement("Feature")]
         public List<ProductFeature> Features { get; set; }
 
         [XmlIgnore]
+        public string UrlBase { get; set; }
+
+        [XmlIgnore]
         public string FullPath { get { return InstallerConfiguration.ProductCachePath + FileName; } }
 
         [XmlIgnore]
@@ -50,7 +50,12 @@ namespace WexInstaller.Core
                 }
                 else
                 {
-                    remoteURL = String.Format("http://dev.mysql.com/get/Downloads/{0}/{1}/from/{2}", UrlBase, FileName, InstallerConfiguration.PreferredMirror);
+                    remoteURL = String.Format("http://downloads.mysql.com/archives/{0}", UrlBase);
+                    if (!remoteURL.EndsWith("/"))
+                    {
+                        remoteURL += "/";
+                    }
+                    remoteURL += FileName;
                 }
                 return remoteURL;
             } 

=== modified file 'WexInstaller/Core/Product.cs'
--- a/WexInstaller/Core/Product.cs	2010-11-11 02:43:00 +0000
+++ b/WexInstaller/Core/Product.cs	2010-11-11 18:50:20 +0000
@@ -60,6 +60,7 @@ namespace WexInstaller.Core
         {
             Package p = GetPackage();
             p.PostInitialize();
+            p.UrlBase = UrlBase;
 
             if (p.Id != null && p.Id.Length > 0)  // Valid Package.
             {
@@ -100,6 +101,9 @@ namespace WexInstaller.Core
         [XmlAttribute("upgradeId")]
         public string UpgradeId { get; set; }
 
+        [XmlAttribute("urlBaseDir")]
+        public string UrlBase { get; set; }
+
         [XmlIgnore]
         public bool Installed { get; set; }
 
@@ -406,6 +410,8 @@ namespace WexInstaller.Core
         {
             if (!e.Cancelled && e.Error == null)
             {
+                MirrorList = new Queue<string>();
+
                 string mirrorList = (string)e.Result;
                 mirrorList = Regex.Replace(mirrorList, "<ip", "<IP");
                 mirrorList = Regex.Replace(mirrorList, "ip>", "IP>");
@@ -418,7 +424,6 @@ namespace WexInstaller.Core
                 if (httpMirrors.Length > 0)
                 {
                     Queue<string> altMirrorList = new Queue<string>();
-                    MirrorList = new Queue<string>();
 
                     foreach (Mirror m in httpMirrors[0].Mirrors)
                     {
@@ -438,9 +443,13 @@ namespace WexInstaller.Core
                     {
                         MirrorList.Enqueue(m);
                     }
-
-                    DownloadProduct();
                 }
+                else
+                {
+                    MirrorList.Enqueue(GetPackage().RemotePath);
+                }
+
+                DownloadProduct();
             }
         }
 


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20101111185020-bp5zr7wb39rkbmok.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:225) Iggy Galarza11 Nov