Skip to content

Commit

Permalink
MP1-5217: Change On Click default SQL Server
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan authored Apr 29, 2024
1 parent 95d9cc8 commit 78e5db7
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions Tools/MediaPortal.DeployTool/Sections/BaseInstallationTypeDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

using System;

using MediaPortal.DeployTool.InstallationChecks;

namespace MediaPortal.DeployTool.Sections
{
public partial class BaseInstallationTypeDlg : DeployDialog
Expand Down Expand Up @@ -84,10 +86,23 @@ public override void SetProperties()
InstallationProperties.Instance.Set("ConfigureDBMSFirewall", "1");
InstallationProperties.Instance.Set("DBMSPassword", "MediaPortal");
// Default DBMS
InstallationProperties.Instance.Set("DBMSType", "MariaDB");
InstallationProperties.Instance.Set("DBMSDir",
InstallationProperties.Instance["ProgramFiles"] +
"\\MariaDB\\MariaDB 10.0");
IInstallationPackage packageMSSQL = new MSSQLExpressChecker();
CheckResult resultMSSQL = packageMSSQL.CheckStatus();
IInstallationPackage packageMySQL = new MySQLChecker();
CheckResult resultMySQL = packageMySQL.CheckStatus();
IInstallationPackage packageMariaDB = new MariaDBChecker();
CheckResult resultMariaDB = packageMariaDB.CheckStatus();
if (resultMSSQL.state == CheckState.INSTALLED || resultMSSQL.state == CheckState.VERSION_MISMATCH ||
resultMySQL.state == CheckState.INSTALLED || resultMySQL.state == CheckState.VERSION_MISMATCH ||
resultMariaDB.state == CheckState.INSTALLED || resultMariaDB.state == CheckState.VERSION_MISMATCH)
{
InstallationProperties.Instance.Set("DBMSType", "DBAlreadyInstalled");
}
else
{
InstallationProperties.Instance.Set("DBMSType", "MariaDB");
InstallationProperties.Instance.Set("DBMSDir", InstallationProperties.Instance["ProgramFiles"] + "\\MariaDB\\MariaDB 10.0");
}
}
}

Expand Down Expand Up @@ -117,4 +132,4 @@ private void bAdvanced_Click(object sender, EventArgs e)
rbOneClickChecked = false;
}
}
}
}

0 comments on commit 78e5db7

Please sign in to comment.