Updated more installer logic

This commit is contained in:
Shannon
2014-03-04 16:21:45 +11:00
parent 0497771750
commit 71a9fb4f68
22 changed files with 192 additions and 105 deletions

View File

@@ -13,7 +13,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("DatabaseConfigure", "database", 3, "Configuring your database connection")]
[InstallSetupStep("DatabaseConfigure", "database", 10, "Configuring your database connection")]
internal class DatabaseConfigureStep : InstallSetupStep<DatabaseModel>
{
private readonly ApplicationContext _applicationContext;

View File

@@ -8,7 +8,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("DatabaseInstall", 4, "Installing database tables and default system data")]
[InstallSetupStep("DatabaseInstall", 11, "Installing database tables and default system data")]
internal class DatabaseInstallStep : InstallSetupStep<object>
{
private readonly ApplicationContext _applicationContext;

View File

@@ -7,7 +7,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("DatabaseUpgrade", 5, "Upgrading your database to the latest version")]
[InstallSetupStep("DatabaseUpgrade", 12, "Upgrading your database to the latest version")]
internal class DatabaseUpgradeStep : InstallSetupStep<object>
{
private readonly ApplicationContext _applicationContext;
@@ -23,13 +23,13 @@ namespace Umbraco.Web.Install.InstallSteps
{
if (_status == InstallStatusType.NewInstall) return null;
var installSteps = InstallStatusTracker.GetStatus();
var installSteps = InstallStatusTracker.GetStatus().ToArray();
//this step relies on the preious one completed - because it has stored some information we need
if (installSteps.Any(x => x.Key == "DatabaseConfigure") == false)
if (installSteps.Any(x => x.Name == "DatabaseConfigure") == false)
{
throw new InvalidOperationException("Could not find previous step: DatabaseConfigure of the installation, package install cannot continue");
}
var previousStep = installSteps["DatabaseConfigure"];
var previousStep = installSteps.Single(x => x.Name == "DatabaseConfigure");
var upgrade = previousStep.AdditionalData.ContainsKey("upgrade");
if (upgrade)

View File

@@ -83,7 +83,7 @@ namespace Umbraco.Web.Install.InstallSteps
if (permissionsOk == false)
{
throw new InstallException("Permission check failed", new { view = "permissionsReport", errors = report });
throw new InstallException("Permission check failed", "permissionsReport", new { errors = report });
}
return null;

View File

@@ -9,7 +9,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("MajorVersion7UpgradeReport", 2, "Checking for compatibility issues with upgrade")]
[InstallSetupStep("MajorVersion7UpgradeReport", 1, "Checking for compatibility issues with upgrade")]
internal class MajorVersion7UpgradeReport : InstallSetupStep<object>
{
private readonly ApplicationContext _applicationContext;

View File

@@ -10,7 +10,7 @@ using GlobalSettings = umbraco.GlobalSettings;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("UmbracoVersion", 9, "Wrapping up the system configuration")]
[InstallSetupStep("UmbracoVersion", 50, "Wrapping up the system configuration")]
internal class SetUmbracoVersionStep : InstallSetupStep<object>
{
private readonly ApplicationContext _applicationContext;

View File

@@ -7,7 +7,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("StarterKitCleanup", 8, "Cleaning up temporary files")]
[InstallSetupStep("StarterKitCleanup", 32, "Cleaning up temporary files")]
internal class StarterKitCleanupStep : InstallSetupStep<object>
{
private readonly InstallStatusType _status;
@@ -21,13 +21,13 @@ namespace Umbraco.Web.Install.InstallSteps
{
if (_status != InstallStatusType.NewInstall) return null;
var installSteps = InstallStatusTracker.GetStatus();
var installSteps = InstallStatusTracker.GetStatus().ToArray();
//this step relies on the preious one completed - because it has stored some information we need
if (installSteps.Any(x => x.Key == "StarterKitDownload") == false)
if (installSteps.Any(x => x.Name == "StarterKitDownload") == false)
{
throw new InvalidOperationException("Could not find previous step: StarterKitDownload of the installation, package install cannot continue");
}
var previousStep = installSteps["StarterKitDownload"];
var previousStep = installSteps.Single(x => x.Name == "StarterKitDownload");
var manifestId = Convert.ToInt32(previousStep.AdditionalData["manifestId"]);
var packageFile = (string)previousStep.AdditionalData["packageFile"];

View File

@@ -6,7 +6,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("StarterKitDownload", "starterKit", 6, "Downloading a starter website from our.umbraco.org, hold tight, this could take a little while")]
[InstallSetupStep("StarterKitDownload", "starterKit", 30, "Downloading a starter website from our.umbraco.org, hold tight, this could take a little while")]
internal class StarterKitDownloadStep : InstallSetupStep<Guid>
{
private readonly InstallStatusType _status;

View File

@@ -7,7 +7,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("StarterKitInstall", 7, "Installing a starter website to help you get off to a great start")]
[InstallSetupStep("StarterKitInstall", 31, "Installing a starter website to help you get off to a great start")]
internal class StarterKitInstallStep : InstallSetupStep<object>
{
private readonly InstallStatusType _status;
@@ -26,13 +26,13 @@ namespace Umbraco.Web.Install.InstallSteps
{
if (_status != InstallStatusType.NewInstall) return null;
var installSteps = InstallStatusTracker.GetStatus();
var installSteps = InstallStatusTracker.GetStatus().ToArray();
//this step relies on the preious one completed - because it has stored some information we need
if (installSteps.Any(x => x.Key == "StarterKitDownload") == false)
if (installSteps.Any(x => x.Name == "StarterKitDownload") == false)
{
throw new InvalidOperationException("Could not find previous step: StarterKitDownload of the installation, package install cannot continue");
}
var previousStep = installSteps["StarterKitDownload"];
var previousStep = installSteps.Single(x => x.Name == "StarterKitDownload");
var manifestId = Convert.ToInt32(previousStep.AdditionalData["manifestId"]);
var packageFile = (string)previousStep.AdditionalData["packageFile"];

View File

@@ -8,7 +8,7 @@ using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep("User", "user", 4, "Saving your user credentials")]
[InstallSetupStep("User", "user", 20, "Saving your user credentials")]
internal class UserStep : InstallSetupStep<UserModel>
{
private readonly ApplicationContext _applicationContext;