#At file:///C:/Users/Reggie/work/wex/installer-updated/ based on revid:iggy@strippedgx4
316 Reggie Burnett 2011-02-08
started Examples plugin in StandardPlugins and changed controller API a bit
added:
StandardPlugins/Examples/
StandardPlugins/Examples/ConfigurationController.cs
StandardPlugins/Server/
renamed:
StandardPlugins/ConfigurationController.cs => StandardPlugins/Server/ConfigurationController.cs
StandardPlugins/IniTemplate.cs => StandardPlugins/Server/IniTemplate.cs
StandardPlugins/MysqlSCM.cs => StandardPlugins/Server/MysqlSCM.cs
StandardPlugins/ServerConfigPanel1.Designer.cs => StandardPlugins/Server/ServerConfigPanel1.Designer.cs
StandardPlugins/ServerConfigPanel1.cs => StandardPlugins/Server/ServerConfigPanel1.cs
StandardPlugins/ServerConfigPanel1.resx => StandardPlugins/Server/ServerConfigPanel1.resx
StandardPlugins/ServerConfigPanel2.Designer.cs => StandardPlugins/Server/ServerConfigPanel2.Designer.cs
StandardPlugins/ServerConfigPanel2.cs => StandardPlugins/Server/ServerConfigPanel2.cs
StandardPlugins/ServerConfigPanel2.resx => StandardPlugins/Server/ServerConfigPanel2.resx
StandardPlugins/ServerConfigPanel3.Designer.cs => StandardPlugins/Server/ServerConfigPanel3.Designer.cs
StandardPlugins/ServerConfigPanel3.cs => StandardPlugins/Server/ServerConfigPanel3.cs
StandardPlugins/ServerConfigPanel3.resx => StandardPlugins/Server/ServerConfigPanel3.resx
StandardPlugins/ServerConfigPanel4.Designer.cs => StandardPlugins/Server/ServerConfigPanel4.Designer.cs
StandardPlugins/ServerConfigPanel4.cs => StandardPlugins/Server/ServerConfigPanel4.cs
StandardPlugins/ServerConfigPanel4.resx => StandardPlugins/Server/ServerConfigPanel4.resx
StandardPlugins/ServerConfigPanel5.Designer.cs => StandardPlugins/Server/ServerConfigPanel5.Designer.cs
StandardPlugins/ServerConfigPanel5.cs => StandardPlugins/Server/ServerConfigPanel5.cs
StandardPlugins/ServerConfigPanel5.resx => StandardPlugins/Server/ServerConfigPanel5.resx
modified:
StandardPlugins/StandardPlugins.csproj
WexInstaller/Core/ProductConfigurationController.cs
WexInstaller/Core/ProductManager.cs
WexInstaller/InstallWizard/AllConfigOverview.cs
WexInstaller/InstallWizard/InstallProgressPanel.cs
WexInstaller/Properties/AssemblyInfo.cs
installer-vs2010.sln
StandardPlugins/Server/ConfigurationController.cs
=== added directory 'StandardPlugins/Examples'
=== added file 'StandardPlugins/Examples/ConfigurationController.cs'
=== added directory 'StandardPlugins/Examples'
=== added file 'StandardPlugins/Examples/ConfigurationController.cs'
--- a/StandardPlugins/Examples/ConfigurationController.cs 1970-01-01 00:00:00 +0000
+++ b/StandardPlugins/Examples/ConfigurationController.cs 2011-02-08 18:41:30 +0000
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Windows.Forms;
+using WexInstaller.Core;
+using MySql.Data;
+using MySql.Data.MySqlClient;
+using System.ComponentModel;
+using System.Threading;
+using System.Diagnostics;
+
+namespace WexInstaller.Plugins
+{
+ [ProductConfiguration("examples", 1)]
+ public class ExamplesConfigurationController : ProductConfigurationController
+ {
+ public override int NumPages
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public override UserControl[] Pages
+ {
+ get { throw new NotImplementedException(); }
+ }
+ }
+}
=== added directory 'StandardPlugins/Server'
=== renamed file 'StandardPlugins/ConfigurationController.cs' => 'StandardPlugins/Server/ConfigurationController.cs'
--- a/StandardPlugins/ConfigurationController.cs 2011-02-07 23:26:42 +0000
+++ b/StandardPlugins/Server/ConfigurationController.cs 2011-02-08 18:41:30 +0000
@@ -41,7 +41,7 @@
{
CurrentState = ConfigState.ConfigurationRequired;
Logger.LogInformation("Product configuration controller created.");
- Initalize();
+ Initialize();
processedTemplate = false;
processedService = false;
@@ -62,6 +62,11 @@
get { return (Reconfigure) ? 1 : 2; }
}
+ public override void PostAction(ConfigurationAction action)
+ {
+ Initialize();
+ }
+
public override void Configure()
{
CurrentState = ConfigState.ConfigurationInProgress;
@@ -211,7 +216,7 @@
private void bgw_DoConfigure(object sender, DoWorkEventArgs e)
{
if (it == null)
- Initalize();
+ Initialize();
Logger.LogInformation("Beginning product configuration.");
if (ProcessTemplate())
@@ -244,7 +249,7 @@
base.OnConfigured(ce);
}
- public override void Initalize()
+ public override void Initialize()
{
Logger.LogInformation("Product configuration controller initialization started.");
=== renamed file 'StandardPlugins/IniTemplate.cs' => 'StandardPlugins/Server/IniTemplate.cs'
=== renamed file 'StandardPlugins/MysqlSCM.cs' => 'StandardPlugins/Server/MysqlSCM.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel1.Designer.cs' => 'StandardPlugins/Server/ServerConfigPanel1.Designer.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel1.cs' => 'StandardPlugins/Server/ServerConfigPanel1.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel1.resx' => 'StandardPlugins/Server/ServerConfigPanel1.resx'
=== renamed file 'StandardPlugins/ServerConfigPanel2.Designer.cs' => 'StandardPlugins/Server/ServerConfigPanel2.Designer.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel2.cs' => 'StandardPlugins/Server/ServerConfigPanel2.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel2.resx' => 'StandardPlugins/Server/ServerConfigPanel2.resx'
=== renamed file 'StandardPlugins/ServerConfigPanel3.Designer.cs' => 'StandardPlugins/Server/ServerConfigPanel3.Designer.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel3.cs' => 'StandardPlugins/Server/ServerConfigPanel3.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel3.resx' => 'StandardPlugins/Server/ServerConfigPanel3.resx'
=== renamed file 'StandardPlugins/ServerConfigPanel4.Designer.cs' => 'StandardPlugins/Server/ServerConfigPanel4.Designer.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel4.cs' => 'StandardPlugins/Server/ServerConfigPanel4.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel4.resx' => 'StandardPlugins/Server/ServerConfigPanel4.resx'
=== renamed file 'StandardPlugins/ServerConfigPanel5.Designer.cs' => 'StandardPlugins/Server/ServerConfigPanel5.Designer.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel5.cs' => 'StandardPlugins/Server/ServerConfigPanel5.cs'
=== renamed file 'StandardPlugins/ServerConfigPanel5.resx' => 'StandardPlugins/Server/ServerConfigPanel5.resx'
=== modified file 'StandardPlugins/StandardPlugins.csproj'
--- a/StandardPlugins/StandardPlugins.csproj 2011-02-07 21:39:05 +0000
+++ b/StandardPlugins/StandardPlugins.csproj 2011-02-08 18:41:30 +0000
@@ -44,45 +44,34 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="ConfigurationController.cs" />
- <Compile Include="IniTemplate.cs" />
- <Compile Include="MysqlSCM.cs">
- <SubType>Component</SubType>
- </Compile>
+ <Compile Include="Examples\ConfigurationController.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
- <Compile Include="ServerConfigPanel1.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ServerConfigPanel1.Designer.cs">
+ <Compile Include="Server\ConfigurationController.cs" />
+ <Compile Include="Server\IniTemplate.cs" />
+ <Compile Include="Server\MysqlSCM.cs" />
+ <Compile Include="Server\ServerConfigPanel1.cs" />
+ <Compile Include="Server\ServerConfigPanel1.Designer.cs">
<DependentUpon>ServerConfigPanel1.cs</DependentUpon>
</Compile>
- <Compile Include="ServerConfigPanel2.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ServerConfigPanel2.Designer.cs">
+ <Compile Include="Server\ServerConfigPanel2.cs" />
+ <Compile Include="Server\ServerConfigPanel2.Designer.cs">
<DependentUpon>ServerConfigPanel2.cs</DependentUpon>
</Compile>
- <Compile Include="ServerConfigPanel3.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ServerConfigPanel3.Designer.cs">
+ <Compile Include="Server\ServerConfigPanel3.cs" />
+ <Compile Include="Server\ServerConfigPanel3.Designer.cs">
<DependentUpon>ServerConfigPanel3.cs</DependentUpon>
</Compile>
- <Compile Include="ServerConfigPanel4.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ServerConfigPanel4.Designer.cs">
+ <Compile Include="Server\ServerConfigPanel4.cs" />
+ <Compile Include="Server\ServerConfigPanel4.Designer.cs">
<DependentUpon>ServerConfigPanel4.cs</DependentUpon>
</Compile>
- <Compile Include="ServerConfigPanel5.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ServerConfigPanel5.Designer.cs">
+ <Compile Include="Server\ServerConfigPanel5.cs" />
+ <Compile Include="Server\ServerConfigPanel5.Designer.cs">
<DependentUpon>ServerConfigPanel5.cs</DependentUpon>
</Compile>
</ItemGroup>
@@ -91,19 +80,19 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
- <EmbeddedResource Include="ServerConfigPanel1.resx">
+ <EmbeddedResource Include="Server\ServerConfigPanel1.resx">
<DependentUpon>ServerConfigPanel1.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ServerConfigPanel2.resx">
+ <EmbeddedResource Include="Server\ServerConfigPanel2.resx">
<DependentUpon>ServerConfigPanel2.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ServerConfigPanel3.resx">
+ <EmbeddedResource Include="Server\ServerConfigPanel3.resx">
<DependentUpon>ServerConfigPanel3.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ServerConfigPanel4.resx">
+ <EmbeddedResource Include="Server\ServerConfigPanel4.resx">
<DependentUpon>ServerConfigPanel4.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ServerConfigPanel5.resx">
+ <EmbeddedResource Include="Server\ServerConfigPanel5.resx">
<DependentUpon>ServerConfigPanel5.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
@@ -155,6 +144,7 @@
<ItemGroup>
<None Include="Resources\warning_sign.png" />
</ItemGroup>
+ <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(TargetPath) $(SolutionDir)\WexInstaller\bin\$(ConfigurationName)\$(TargetFileName)
=== modified file 'WexInstaller/Core/ProductConfigurationController.cs'
--- a/WexInstaller/Core/ProductConfigurationController.cs 2011-02-07 23:26:42 +0000
+++ b/WexInstaller/Core/ProductConfigurationController.cs 2011-02-08 18:41:30 +0000
@@ -20,13 +20,13 @@
public ConfigState CurrentState { get; protected set; }
public Product Owner { get; set; }
- public virtual void Configure()
- {
- }
-
- public virtual void Initalize()
- {
- }
+ /// <summary>
+ /// Virtual methods controllers can override
+ /// </summary>
+ public virtual void Configure() { }
+ public virtual void Initialize() { }
+ public virtual void PreAction(ConfigurationAction action) { }
+ public virtual void PostAction(ConfigurationAction action) { }
public event ConfigurationEventHandler Configured;
protected virtual void OnConfigured(ConfigurationEventArgs args)
@@ -48,6 +48,13 @@
public int Version { get; set; }
}
+ public enum ConfigurationAction
+ {
+ Install,
+ Configure,
+ Uninstall
+ }
+
public enum ConfigurationEventType
{
Info,
=== modified file 'WexInstaller/Core/ProductManager.cs'
--- a/WexInstaller/Core/ProductManager.cs 2011-02-07 21:39:05 +0000
+++ b/WexInstaller/Core/ProductManager.cs 2011-02-08 18:41:30 +0000
@@ -72,8 +72,9 @@
p.PostInitialize(true);
p.SetParent(pc);
- // preload the controller if there are any
- object o = p.Controller;
+ // Initialize the controller if there are any
+ if (p.Controller != null)
+ p.Controller.Initialize();
}
}
=== modified file 'WexInstaller/InstallWizard/AllConfigOverview.cs'
--- a/WexInstaller/InstallWizard/AllConfigOverview.cs 2011-02-08 16:03:18 +0000
+++ b/WexInstaller/InstallWizard/AllConfigOverview.cs 2011-02-08 18:41:30 +0000
@@ -78,7 +78,7 @@
productList.ProgressBar.Value = 0;
configuringItemHandler = new ConfigurationEventHandler(ConfigurationChanged);
- (configuringItem.Tag as Product).Controller.Initalize();
+ (configuringItem.Tag as Product).Controller.PreAction(ConfigurationAction.Configure);
(configuringItem.Tag as Product).Controller.Configured += configuringItemHandler;
(configuringItem.Tag as Product).Controller.Configure();
Application.DoEvents();
@@ -196,7 +196,7 @@
configuringItem = lvihti.Item;
configuringItem.StateImageIndex = 0;
SetLineColor(configuringItem, Color.Black);
- (configuringItem.Tag as Product).Controller.Initalize();
+ (configuringItem.Tag as Product).Controller.PreAction(ConfigurationAction.Configure);
(ParentControl as InstallWizardControl).AddConfigPages(configuringItem.Tag as Product);
NextButton.PerformClick();
}
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-02-07 21:39:59 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-02-08 18:41:30 +0000
@@ -357,7 +357,7 @@
if (p.Controller != null)
{
installedProductsNeedConfig = true;
- p.Controller.Initalize();
+ p.Controller.PostAction(ConfigurationAction.Install);
}
InstallNextPackage();
break;
=== modified file 'WexInstaller/Properties/AssemblyInfo.cs'
--- a/WexInstaller/Properties/AssemblyInfo.cs 2010-12-09 17:26:20 +0000
+++ b/WexInstaller/Properties/AssemblyInfo.cs 2011-02-08 18:41:30 +0000
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.6.0")]
-[assembly: AssemblyFileVersion("1.0.6.0")]
+[assembly: AssemblyVersion("1.0.7.0")]
+[assembly: AssemblyFileVersion("1.0.7.0")]
=== modified file 'installer-vs2010.sln'
--- a/installer-vs2010.sln 2011-02-07 21:39:05 +0000
+++ b/installer-vs2010.sln 2011-02-08 18:41:30 +0000
@@ -20,6 +20,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StandardPlugins", "StandardPlugins\StandardPlugins.csproj", "{C471DBDA-2AFA-4EA3-970A-795133F1FE1A}"
EndProject
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Examples", "Examples\Examples.wixproj", "{13190F97-5D72-4949-A77A-500A57DA44BB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -109,6 +111,18 @@
{C471DBDA-2AFA-4EA3-970A-795133F1FE1A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C471DBDA-2AFA-4EA3-970A-795133F1FE1A}.Release|Win32.ActiveCfg = Release|Any CPU
{C471DBDA-2AFA-4EA3-970A-795133F1FE1A}.Release|x86.ActiveCfg = Release|Any CPU
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|Win32.ActiveCfg = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|x86.ActiveCfg = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Debug|x86.Build.0 = Debug|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|Any CPU.ActiveCfg = Release|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|Mixed Platforms.Build.0 = Release|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|Win32.ActiveCfg = Release|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|x86.ActiveCfg = Release|x86
+ {13190F97-5D72-4949-A77A-500A57DA44BB}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20110208184130-y3mclg04j6qb4wnj.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (reggie.burnett:316) | Reggie Burnett | 8 Feb |