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

  343 Iggy Galarza	2011-02-25 [merge]
      Merge.

    modified:
      .bzrignore
      Examples/Examples 5.1.wixproj
      Examples/Examples 5.5.wixproj
      Setup/Setup_Net.wixproj
      Setup/Setup_Web.wixproj
      WexInstaller.Core/InstallerConfiguration.cs
      WexInstaller.Core/ProductManager.cs
      WexInstaller/InstallWizard/DetailedUpdateCheck.Designer.cs
      WexInstaller/InstallWizard/DetailedUpdateCheck.cs
      WexInstaller/MainForm.cs
      WexInstaller/WexInstaller.csproj
      installer-vs2010.sln
=== modified file '.bzrignore'
--- a/.bzrignore	2011-02-07 21:39:59 +0000
+++ b/.bzrignore	2011-02-25 09:16:00 +0000
@@ -4,3 +4,5 @@
 Setup/ProductCache
 *.suo
 **/*.user
+ProductCache
+Setup/products.xml

=== modified file 'Examples/Examples 5.1.wixproj'
--- a/Examples/Examples 5.1.wixproj	2011-02-14 17:48:38 +0000
+++ b/Examples/Examples 5.1.wixproj	2011-02-25 09:16:00 +0000
@@ -13,13 +13,13 @@
     <Name>Examples 5.1</Name>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
+    <OutputPath>..\ProductCache\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
     <DefineConstants>Debug</DefineConstants>
     <SuppressPdbOutput>True</SuppressPdbOutput>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
+    <OutputPath>..\ProductCache\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
   </PropertyGroup>
   <ItemGroup>

=== modified file 'Examples/Examples 5.5.wixproj'
--- a/Examples/Examples 5.5.wixproj	2011-02-15 16:20:37 +0000
+++ b/Examples/Examples 5.5.wixproj	2011-02-25 09:16:00 +0000
@@ -12,13 +12,13 @@
     <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
+    <OutputPath>..\ProductCache\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
     <DefineConstants>Debug</DefineConstants>
     <SuppressPdbOutput>True</SuppressPdbOutput>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
+    <OutputPath>..\ProductCache\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
   </PropertyGroup>
   <ItemGroup>

=== modified file 'Setup/Setup_Net.wixproj'
--- a/Setup/Setup_Net.wixproj	2011-02-25 21:39:47 +0000
+++ b/Setup/Setup_Net.wixproj	2011-02-25 21:45:33 +0000
@@ -10,6 +10,8 @@
     <OutputType>Package</OutputType>
     <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
     <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
+    <IncludeSearchPaths>
+    </IncludeSearchPaths>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     <OutputPath>bin\$(Configuration)\</OutputPath>
@@ -44,6 +46,48 @@
       <Name>WixNetFxExtension</Name>
     </WixExtension>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Examples\Examples 5.1.wixproj">
+      <Name>Examples 5.1</Name>
+      <Project>{13190f97-5d72-4949-a77a-500a57da44bb}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\Examples\Examples 5.5.wixproj">
+      <Name>Examples 5.5</Name>
+      <Project>{d2e2842e-20b1-4167-8fe4-32ccd9d63214}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\StandardPlugins\StandardPlugins.csproj">
+      <Name>StandardPlugins</Name>
+      <Project>{c471dbda-2afa-4ea3-970a-795133f1fe1a}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\WexInstaller.Core\WexInstaller.Core.csproj">
+      <Name>WexInstaller.Core</Name>
+      <Project>{64664a39-d6c5-4842-a879-bdd915dddccf}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\WexInstaller\WexInstaller.csproj">
+      <Name>WexInstaller</Name>
+      <Project>{07b31f5a-9f17-4acf-b3b6-2af9000b1414}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(WixTargetsPath)" />
   <PropertyGroup>
     <PreBuildEvent />

=== modified file 'Setup/Setup_Web.wixproj'
--- a/Setup/Setup_Web.wixproj	2011-02-25 21:39:47 +0000
+++ b/Setup/Setup_Web.wixproj	2011-02-25 21:45:33 +0000
@@ -37,6 +37,48 @@
       <Name>WixNetFxExtension</Name>
     </WixExtension>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Examples\Examples 5.1.wixproj">
+      <Name>Examples 5.1</Name>
+      <Project>{13190f97-5d72-4949-a77a-500a57da44bb}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\Examples\Examples 5.5.wixproj">
+      <Name>Examples 5.5</Name>
+      <Project>{d2e2842e-20b1-4167-8fe4-32ccd9d63214}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\StandardPlugins\StandardPlugins.csproj">
+      <Name>StandardPlugins</Name>
+      <Project>{c471dbda-2afa-4ea3-970a-795133f1fe1a}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\WexInstaller.Core\WexInstaller.Core.csproj">
+      <Name>WexInstaller.Core</Name>
+      <Project>{64664a39-d6c5-4842-a879-bdd915dddccf}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+    <ProjectReference Include="..\WexInstaller\WexInstaller.csproj">
+      <Name>WexInstaller</Name>
+      <Project>{07b31f5a-9f17-4acf-b3b6-2af9000b1414}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
+      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(WixTargetsPath)" />
   <PropertyGroup>
     <PreBuildEvent />

=== modified file 'WexInstaller.Core/InstallerConfiguration.cs'
--- a/WexInstaller.Core/InstallerConfiguration.cs	2011-02-08 21:28:42 +0000
+++ b/WexInstaller.Core/InstallerConfiguration.cs	2011-02-25 15:04:43 +0000
@@ -16,6 +16,9 @@ namespace WexInstaller
         private static InstallerConfigurationData Instance = new InstallerConfigurationData();
         private static WebClient Wc = new WebClient();
 
+        // Indicates if this configuration was loaded from file or is just a default config.
+        private static bool isDefault = true;
+
         #region Properties
 
         public static bool DisplayLicenseAgreement
@@ -100,7 +103,19 @@ namespace WexInstaller
             get { return String.Format("{0}\\new_products.xml", HomeDir);}
         }
 
-#endregion
+        public static bool IsDefault
+        {
+            get { return isDefault;  }
+        }
+
+#if DEBUG
+        public static string DevManifest
+        {
+            get { return @"..\..\..\setup\products.xml"; }
+        }
+#endif
+        
+        #endregion
 
         public static void Save()
         {
@@ -124,15 +139,37 @@ namespace WexInstaller
                 XmlSerializer s = new XmlSerializer(typeof(InstallerConfigurationData));
                 TextReader r = new StreamReader(ConfigFile);
                 Instance = (InstallerConfigurationData)s.Deserialize(r);
-                if (!Instance.ProductCachePath.EndsWith(Path.DirectorySeparatorChar.ToString()))
+                isDefault = false;
+
+                // Keep in mind the installation can be unfinished when we restart, so
+                // some info is not yet set.
+                if (Instance.ProductCachePath != null &&
+                    !Instance.ProductCachePath.EndsWith(Path.DirectorySeparatorChar.ToString()))
                     Instance.ProductCachePath += Path.DirectorySeparatorChar;
-                if (!Instance.InstallationRoot.EndsWith(Path.DirectorySeparatorChar.ToString()))
+                if (Instance.InstallationRoot != null &&
+                    !Instance.InstallationRoot.EndsWith(Path.DirectorySeparatorChar.ToString()))
                     Instance.InstallationRoot += Path.DirectorySeparatorChar;
             }
             else
             {
-                // Create a new Instance and set some defaults maybe?
+                Instance.LicenseAgreement = 1;
             }
+
+            // Consider incomplete/corrupt/non-existing config file.
+            // Set useful defaults for important values.
+            if (Instance.UpdateURLs.Count == 0)
+            {
+                UpdateURL url = new UpdateURL("http://wb.mysql.com/installer/products.xml");
+                Instance.UpdateURLs.Add(url);
+            }
+
+            Instance.UpdateTimeoutMilliseconds = 10000;
+
+            // TODO: check which of the following entries needs some better default value.
+            // Instance.UpdateCheckFrequency
+            // Instance.ProductCachePath
+            // Instance.InstallationRoot
+            // Instance.ProductCode
         }
 
         public static bool IsWow64()
@@ -160,6 +197,15 @@ namespace WexInstaller
 
     public class UpdateURL
     {
+        public UpdateURL()
+        {
+            URL = "";
+        }
+
+        public UpdateURL(string url)
+        {
+            URL = url;
+        }
         public string URL { get; set; }
     }
 

=== modified file 'WexInstaller.Core/ProductManager.cs'
--- a/WexInstaller.Core/ProductManager.cs	2011-02-09 17:35:42 +0000
+++ b/WexInstaller.Core/ProductManager.cs	2011-02-25 15:04:43 +0000
@@ -147,10 +147,30 @@ namespace WexInstaller.Core
             return args[1];   // this should be the default catalog name
         }
 
+        /// <summary>
+        /// Attempts to load a product manifest file. Strategy is:
+        /// - Look for a development version of the file if we running under a debugger. If it exists
+        ///   use it as temporary manifest.
+        /// - See if there is a temporary manifest (either from the first step or a regular one). If one
+        ///   exists and it is younger than the regular manifest then make this the regular one.
+        /// - If a regular manifest exists load it.
+        /// </summary>
         private static void LoadManifestWithCheckForTemp()
         {
-            // first we need to see if there is any temp manifest file to check
-            ProductManifest tempManifest = ObjectifyManifest(InstallerConfiguration.TempProductsManifest);
+            // Use development version of the manifest if we are in debug mode.
+            ProductManifest tempManifest;
+            string tempSourcePath;
+
+#if DEBUG
+            tempManifest = ObjectifyManifest(InstallerConfiguration.DevManifest);
+            tempSourcePath = InstallerConfiguration.DevManifest;
+#endif
+            // First we need to see if there is any temp manifest file to check.
+            if (tempManifest == null)
+            {
+                tempManifest = ObjectifyManifest(InstallerConfiguration.TempProductsManifest);
+                tempSourcePath = InstallerConfiguration.TempProductsManifest;
+            }
             ProductManifest currentManifest = ObjectifyManifest(InstallerConfiguration.ProductsManifest);
 
             if (tempManifest == null)
@@ -161,7 +181,7 @@ namespace WexInstaller.Core
                 {
                     manifest = tempManifest;
                     currentManifest = null;
-                    File.Copy(InstallerConfiguration.TempProductsManifest, InstallerConfiguration.ProductsManifest, true);
+                    File.Copy(tempSourcePath, InstallerConfiguration.ProductsManifest, true);
                 }
                 else
                 {
@@ -266,6 +286,12 @@ namespace WexInstaller.Core
         {
             Logger.LogTrace("ProductManager.DownloadManifest()");
 
+            if (UpdateURLIndex > InstallerConfiguration.UpdateURLs.Count)
+            {
+                Logger.LogWarning("Invalid update URL index. No download URL defined?");
+                return false;
+            }
+
             if (File.Exists(InstallerConfiguration.TempManifest))
             {
                 File.Delete(InstallerConfiguration.TempManifest);

=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.Designer.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.Designer.cs	2011-02-07 21:39:05 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.Designer.cs	2011-02-25 15:04:43 +0000
@@ -51,10 +51,12 @@ namespace WexInstaller
             // 
             // actionLabel
             // 
+            this.actionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
             this.actionLabel.Font = new System.Drawing.Font("Tahoma", 10F);
             this.actionLabel.Location = new System.Drawing.Point(12, 80);
             this.actionLabel.Name = "actionLabel";
-            this.actionLabel.Size = new System.Drawing.Size(387, 49);
+            this.actionLabel.Size = new System.Drawing.Size(483, 57);
             this.actionLabel.TabIndex = 2;
             this.actionLabel.Text = "Before the installation is performed, the Installer will check if there are newer" +
                 " versions of the products you are about to install / already installed are avail" +
@@ -66,9 +68,9 @@ namespace WexInstaller
             this.skipUpdates.Font = new System.Drawing.Font("Tahoma", 8.25F);
             this.skipUpdates.Location = new System.Drawing.Point(15, 423);
             this.skipUpdates.Name = "skipUpdates";
-            this.skipUpdates.Size = new System.Drawing.Size(181, 17);
+            this.skipUpdates.Size = new System.Drawing.Size(250, 17);
             this.skipUpdates.TabIndex = 3;
-            this.skipUpdates.Text = "&Skip the check for new manifest ";
+            this.skipUpdates.Text = "&Skip the check for updates (not recommended)";
             this.skipUpdates.UseVisualStyleBackColor = true;
             this.skipUpdates.CheckedChanged += new System.EventHandler(this.skipUpdates_CheckedChanged);
             // 
@@ -98,7 +100,7 @@ namespace WexInstaller
             this.connectionSuccessIcon.Image = global::WexInstaller.Properties.Resources.ActionDone;
             this.connectionSuccessIcon.Location = new System.Drawing.Point(80, 154);
             this.connectionSuccessIcon.Name = "connectionSuccessIcon";
-            this.connectionSuccessIcon.Size = new System.Drawing.Size(14, 14);
+            this.connectionSuccessIcon.Size = new System.Drawing.Size(16, 16);
             this.connectionSuccessIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.connectionSuccessIcon.TabIndex = 9;
             this.connectionSuccessIcon.TabStop = false;
@@ -109,7 +111,7 @@ namespace WexInstaller
             this.fetchSuccessIcon.Image = global::WexInstaller.Properties.Resources.ActionDone;
             this.fetchSuccessIcon.Location = new System.Drawing.Point(80, 180);
             this.fetchSuccessIcon.Name = "fetchSuccessIcon";
-            this.fetchSuccessIcon.Size = new System.Drawing.Size(14, 14);
+            this.fetchSuccessIcon.Size = new System.Drawing.Size(16, 16);
             this.fetchSuccessIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.fetchSuccessIcon.TabIndex = 10;
             this.fetchSuccessIcon.TabStop = false;
@@ -117,10 +119,10 @@ namespace WexInstaller
             // 
             // connectionEmptyIcon
             // 
-            this.connectionEmptyIcon.Image = Resources.ActionOpen;
+            this.connectionEmptyIcon.Image = global::WexInstaller.Properties.Resources.ActionOpen;
             this.connectionEmptyIcon.Location = new System.Drawing.Point(80, 154);
             this.connectionEmptyIcon.Name = "connectionEmptyIcon";
-            this.connectionEmptyIcon.Size = new System.Drawing.Size(12, 14);
+            this.connectionEmptyIcon.Size = new System.Drawing.Size(16, 16);
             this.connectionEmptyIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.connectionEmptyIcon.TabIndex = 12;
             this.connectionEmptyIcon.TabStop = false;
@@ -130,7 +132,7 @@ namespace WexInstaller
             this.fetchEmptyIcon.Image = global::WexInstaller.Properties.Resources.ActionOpen;
             this.fetchEmptyIcon.Location = new System.Drawing.Point(80, 180);
             this.fetchEmptyIcon.Name = "fetchEmptyIcon";
-            this.fetchEmptyIcon.Size = new System.Drawing.Size(12, 14);
+            this.fetchEmptyIcon.Size = new System.Drawing.Size(16, 16);
             this.fetchEmptyIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.fetchEmptyIcon.TabIndex = 14;
             this.fetchEmptyIcon.TabStop = false;
@@ -140,7 +142,7 @@ namespace WexInstaller
             this.currentActionIcon.Image = global::WexInstaller.Properties.Resources.ActionCurrent;
             this.currentActionIcon.Location = new System.Drawing.Point(80, 153);
             this.currentActionIcon.Name = "currentActionIcon";
-            this.currentActionIcon.Size = new System.Drawing.Size(12, 14);
+            this.currentActionIcon.Size = new System.Drawing.Size(16, 16);
             this.currentActionIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.currentActionIcon.TabIndex = 15;
             this.currentActionIcon.TabStop = false;
@@ -148,6 +150,8 @@ namespace WexInstaller
             // 
             // productList
             // 
+            this.productList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
             this.productList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.productList.CheckBoxes = true;
             this.productList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@@ -156,7 +160,7 @@ namespace WexInstaller
             this.productList.FullRowSelect = true;
             this.productList.Location = new System.Drawing.Point(80, 214);
             this.productList.Name = "productList";
-            this.productList.Size = new System.Drawing.Size(319, 153);
+            this.productList.Size = new System.Drawing.Size(415, 153);
             this.productList.TabIndex = 16;
             this.productList.UseCompatibleStateImageBehavior = false;
             this.productList.View = System.Windows.Forms.View.Details;
@@ -171,7 +175,7 @@ namespace WexInstaller
             this.currentActionFailedIcon.Image = global::WexInstaller.Properties.Resources.ActionError;
             this.currentActionFailedIcon.Location = new System.Drawing.Point(80, 154);
             this.currentActionFailedIcon.Name = "currentActionFailedIcon";
-            this.currentActionFailedIcon.Size = new System.Drawing.Size(12, 14);
+            this.currentActionFailedIcon.Size = new System.Drawing.Size(16, 16);
             this.currentActionFailedIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
             this.currentActionFailedIcon.TabIndex = 17;
             this.currentActionFailedIcon.TabStop = false;

=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-02-07 21:39:59 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-02-25 15:04:43 +0000
@@ -94,6 +94,7 @@ namespace WexInstaller
 
         public override bool Back()
         {
+            ProductManager.CancelDownload();
             if (!executed)
             {
                 NextButton.Text = Properties.Resources.NextButtonDefaultText;

=== modified file 'WexInstaller/MainForm.cs'
--- a/WexInstaller/MainForm.cs	2011-02-14 17:52:06 +0000
+++ b/WexInstaller/MainForm.cs	2011-02-25 15:04:43 +0000
@@ -16,7 +16,16 @@ namespace WexInstaller
         public MainForm()
         {
             InitializeComponent();
-            this.SetDesktopLocation(InstallerConfiguration.Location.X, InstallerConfiguration.Location.Y);
+            if (InstallerConfiguration.IsDefault)
+            {
+                // Set the form to a good default position. We have to compute that manually though
+                // as the StartPosition property has no effect here.
+                Screen currentScreen = Screen.PrimaryScreen;
+                Rectangle workingArea = currentScreen.WorkingArea;
+                Location = new Point((workingArea.Width - Width) / 2, (workingArea.Height - Height) / 2);
+            }
+            else
+                this.SetDesktopLocation(InstallerConfiguration.Location.X, InstallerConfiguration.Location.Y);
         }
 
         public void DoInstall()

=== modified file 'WexInstaller/WexInstaller.csproj'
--- a/WexInstaller/WexInstaller.csproj	2011-02-10 19:36:56 +0000
+++ b/WexInstaller/WexInstaller.csproj	2011-02-25 15:04:43 +0000
@@ -225,57 +225,75 @@
     </Compile>
     <EmbeddedResource Include="Controls\AboutPage.resx">
       <DependentUpon>AboutPage.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\DriveSpaceControl.resx">
       <DependentUpon>DriveSpaceControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\FeatureBox.resx">
       <DependentUpon>FeatureBox.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\RemoveControl.resx">
       <DependentUpon>RemoveControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\ResourcesLink.resx">
       <DependentUpon>ResourcesLink.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\ResourcesPage.resx">
       <DependentUpon>ResourcesPage.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\InstallWizardControl.resx">
       <DependentUpon>InstallWizardControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\InstallWizardSideBarControl.resx">
       <DependentUpon>InstallWizardSideBarControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\CheckRequirements.resx">
       <DependentUpon>CheckRequirements.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\DetailedUpdateCheck.resx">
       <DependentUpon>DetailedUpdateCheck.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\Features.resx">
       <DependentUpon>Features.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\InstallationComplete.resx">
       <DependentUpon>InstallationComplete.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\InstallProgressPanel.resx">
       <DependentUpon>InstallProgressPanel.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\InstallType.resx">
       <DependentUpon>InstallType.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\LicenseAgreement.resx">
       <DependentUpon>LicenseAgreement.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\UpdateCheck.resx">
       <DependentUpon>UpdateCheck.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="MainForm.resx">
       <DependentUpon>MainForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="InstallWizard\AllConfigOverview.resx">
       <DependentUpon>AllConfigOverview.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
@@ -289,12 +307,15 @@
     </Compile>
     <EmbeddedResource Include="Controls\RemoveAllPage.resx">
       <DependentUpon>RemoveAllPage.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\SideBarControl.resx">
       <DependentUpon>SideBarControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Controls\WelcomeControl.resx">
       <DependentUpon>WelcomeControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="RemovePanels\RemoveComplete.resx">
       <DependentUpon>RemoveComplete.cs</DependentUpon>

=== modified file 'installer-vs2010.sln'
--- a/installer-vs2010.sln	2011-02-25 21:39:47 +0000
+++ b/installer-vs2010.sln	2011-02-25 21:45:33 +0000
@@ -20,6 +20,12 @@ EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WexInstaller.Core", "WexInstaller.Core\WexInstaller.Core.csproj", "{64664A39-D6C5-4842-A879-BDD915DDDCCF}"
 EndProject
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup_Net", "Setup\Setup_Net.wixproj", "{FBC6C598-EC89-49E6-8FE4-4140141761CC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{D2E2842E-20B1-4167-8FE4-32CCD9D63214} = {D2E2842E-20B1-4167-8FE4-32CCD9D63214}
+		{64664A39-D6C5-4842-A879-BDD915DDDCCF} = {64664A39-D6C5-4842-A879-BDD915DDDCCF}
+		{07B31F5A-9F17-4ACF-B3B6-2AF9000B1414} = {07B31F5A-9F17-4ACF-B3B6-2AF9000B1414}
+		{13190F97-5D72-4949-A77A-500A57DA44BB} = {13190F97-5D72-4949-A77A-500A57DA44BB}
+	EndProjectSection
 EndProject
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup_Web", "Setup\Setup_Web.wixproj", "{101DB4CD-090C-44CE-9D19-C6EA941D2DCF}"
 EndProject


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110225214533-q2qka7jynbzn10ja.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:343) Iggy Galarza25 Feb