Fix config checks.
This commit is contained in:
parent
1bf6c993c2
commit
ef97dcfd38
4 changed files with 103 additions and 103 deletions
|
@ -138,9 +138,9 @@ namespace WebsitePanel.Setup
|
||||||
var licPage = new LicenseAgreementPage();
|
var licPage = new LicenseAgreementPage();
|
||||||
var page1 = new ConfigurationCheckPage();
|
var page1 = new ConfigurationCheckPage();
|
||||||
//
|
//
|
||||||
ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
|
ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement") { SetupVariables = setupVariables };
|
||||||
ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
|
ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement") { SetupVariables = setupVariables };
|
||||||
ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");
|
ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement") { SetupVariables = setupVariables };
|
||||||
//
|
//
|
||||||
page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
|
page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
|
||||||
//
|
//
|
||||||
|
|
|
@ -124,9 +124,9 @@ namespace WebsitePanel.Setup
|
||||||
var introPage = new IntroductionPage();
|
var introPage = new IntroductionPage();
|
||||||
var licPage = new LicenseAgreementPage();
|
var licPage = new LicenseAgreementPage();
|
||||||
var page1 = new ConfigurationCheckPage();
|
var page1 = new ConfigurationCheckPage();
|
||||||
ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
|
ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement") { SetupVariables = setupVariables };
|
||||||
ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
|
ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement") { SetupVariables = setupVariables };
|
||||||
ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");
|
ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement") { SetupVariables = setupVariables };
|
||||||
page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
|
page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
|
||||||
var page2 = new InstallFolderPage();
|
var page2 = new InstallFolderPage();
|
||||||
var page3 = new WebPage();
|
var page3 = new WebPage();
|
||||||
|
|
|
@ -44,107 +44,107 @@ namespace WebsitePanel.Setup
|
||||||
return InstallBase(obj, "1.0.1");
|
return InstallBase(obj, "1.0.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static object InstallBase(object obj, string minimalInstallerVersion)
|
internal static object InstallBase(object obj, string minimalInstallerVersion)
|
||||||
{
|
{
|
||||||
Hashtable args = Utils.GetSetupParameters(obj);
|
Hashtable args = Utils.GetSetupParameters(obj);
|
||||||
|
|
||||||
//check CS version
|
//check CS version
|
||||||
string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
|
string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
|
||||||
var shellMode = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
|
var shellMode = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
|
||||||
Version version = new Version(shellVersion);
|
Version version = new Version(shellVersion);
|
||||||
//
|
//
|
||||||
var setupVariables = new SetupVariables
|
var setupVariables = new SetupVariables
|
||||||
{
|
{
|
||||||
SetupAction = SetupActions.Install,
|
SetupAction = SetupActions.Install,
|
||||||
IISVersion = Global.IISVersion
|
IISVersion = Global.IISVersion
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
InitInstall(args, setupVariables);
|
InitInstall(args, setupVariables);
|
||||||
//Unattended setup
|
//Unattended setup
|
||||||
LoadSetupVariablesFromSetupXml(setupVariables.SetupXml, setupVariables);
|
LoadSetupVariablesFromSetupXml(setupVariables.SetupXml, setupVariables);
|
||||||
//
|
//
|
||||||
var sam = new ServerActionManager(setupVariables);
|
var sam = new ServerActionManager(setupVariables);
|
||||||
// Prepare installation defaults
|
// Prepare installation defaults
|
||||||
sam.PrepareDistributiveDefaults();
|
sam.PrepareDistributiveDefaults();
|
||||||
// Silent Installer Mode
|
// Silent Installer Mode
|
||||||
if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
|
if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (version < new Version(minimalInstallerVersion))
|
if (version < new Version(minimalInstallerVersion))
|
||||||
{
|
{
|
||||||
Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
|
Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
|
||||||
//
|
//
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var success = true;
|
var success = true;
|
||||||
//
|
//
|
||||||
setupVariables.ServerPassword = Utils.GetStringSetupParameter(args, Global.Parameters.ServerPassword);
|
setupVariables.ServerPassword = Utils.GetStringSetupParameter(args, Global.Parameters.ServerPassword);
|
||||||
//
|
//
|
||||||
sam.ActionError += new EventHandler<ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
|
sam.ActionError += new EventHandler<ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
|
||||||
{
|
{
|
||||||
Utils.ShowConsoleErrorMessage(e.ErrorMessage);
|
Utils.ShowConsoleErrorMessage(e.ErrorMessage);
|
||||||
//
|
//
|
||||||
Log.WriteError(e.ErrorMessage);
|
Log.WriteError(e.ErrorMessage);
|
||||||
//
|
//
|
||||||
success = false;
|
success = false;
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
sam.Start();
|
sam.Start();
|
||||||
//
|
//
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.WriteError("Failed to install the component", ex);
|
Log.WriteError("Failed to install the component", ex);
|
||||||
//
|
//
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (version < new Version(minimalInstallerVersion))
|
if (version < new Version(minimalInstallerVersion))
|
||||||
{
|
{
|
||||||
MessageBox.Show(String.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show(String.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
//
|
//
|
||||||
return DialogResult.Cancel;
|
return DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
var form = new InstallerForm();
|
var form = new InstallerForm();
|
||||||
var wizard = form.Wizard;
|
var wizard = form.Wizard;
|
||||||
wizard.SetupVariables = setupVariables;
|
wizard.SetupVariables = setupVariables;
|
||||||
//
|
//
|
||||||
wizard.ActionManager = sam;
|
wizard.ActionManager = sam;
|
||||||
|
|
||||||
//create wizard pages
|
//create wizard pages
|
||||||
var introPage = new IntroductionPage();
|
var introPage = new IntroductionPage();
|
||||||
var licPage = new LicenseAgreementPage();
|
var licPage = new LicenseAgreementPage();
|
||||||
//
|
//
|
||||||
var page1 = new ConfigurationCheckPage();
|
var page1 = new ConfigurationCheckPage();
|
||||||
page1.Checks.AddRange(new ConfigurationCheck[]
|
page1.Checks.AddRange(new ConfigurationCheck[]
|
||||||
{
|
{
|
||||||
new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"),
|
new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"){ SetupVariables = setupVariables },
|
||||||
new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"),
|
new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"){ SetupVariables = setupVariables },
|
||||||
new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement")
|
new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement"){ SetupVariables = setupVariables }
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
var page2 = new InstallFolderPage();
|
var page2 = new InstallFolderPage();
|
||||||
var page3 = new WebPage();
|
var page3 = new WebPage();
|
||||||
var page4 = new UserAccountPage();
|
var page4 = new UserAccountPage();
|
||||||
var page5 = new ServerPasswordPage();
|
var page5 = new ServerPasswordPage();
|
||||||
var page6 = new ExpressInstallPage2();
|
var page6 = new ExpressInstallPage2();
|
||||||
var page7 = new FinishPage();
|
var page7 = new FinishPage();
|
||||||
//
|
//
|
||||||
wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
|
wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
|
||||||
wizard.LinkPages();
|
wizard.LinkPages();
|
||||||
wizard.SelectedPage = introPage;
|
wizard.SelectedPage = introPage;
|
||||||
|
|
||||||
//show wizard
|
//show wizard
|
||||||
IWin32Window owner = args["ParentForm"] as IWin32Window;
|
IWin32Window owner = args["ParentForm"] as IWin32Window;
|
||||||
return form.ShowModal(owner);
|
return form.ShowModal(owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object Uninstall(object obj)
|
public static object Uninstall(object obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -250,9 +250,9 @@ namespace WebsitePanel.Setup
|
||||||
var page2 = new ConfigurationCheckPage();
|
var page2 = new ConfigurationCheckPage();
|
||||||
// Setup prerequisites validation
|
// Setup prerequisites validation
|
||||||
page2.Checks.AddRange(new ConfigurationCheck[] {
|
page2.Checks.AddRange(new ConfigurationCheck[] {
|
||||||
new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"),
|
new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"){ SetupVariables = serverSetup },
|
||||||
new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"),
|
new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"){ SetupVariables = serverSetup },
|
||||||
new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement"),
|
new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement"){ SetupVariables = serverSetup },
|
||||||
// Validate Server installation prerequisites
|
// Validate Server installation prerequisites
|
||||||
new ConfigurationCheck(CheckTypes.WPServer, "WebsitePanel Server Requirement") { SetupVariables = serverSetup },
|
new ConfigurationCheck(CheckTypes.WPServer, "WebsitePanel Server Requirement") { SetupVariables = serverSetup },
|
||||||
// Validate EnterpriseServer installation prerequisites
|
// Validate EnterpriseServer installation prerequisites
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue