From 5b0787c86d34dca603c71c32023e3dbb89a4c9a7 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Thu, 7 Mar 2024 15:01:32 -0500 Subject: [PATCH 1/2] target net8, bump version --- SPTInstaller/SPTInstaller.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index f1ea53e..b43f8d1 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -1,7 +1,7 @@  WinExe - net6.0 + net8.0 true enable true @@ -9,8 +9,8 @@ icon.ico Assets\icon.ico Debug;Release;TEST - 2.30 - 2.30 + 2.40 + 2.40 SPT-AKI From e4f04f1688bf05eeb44a2e171d37b0aeb4dae6b7 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Thu, 7 Mar 2024 15:28:09 -0500 Subject: [PATCH 2/2] update precheck to be net 8 --- .../{NetCore6PreCheck.cs => Net8PreCheck.cs} | 16 ++++++++-------- SPTInstaller/Program.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) rename SPTInstaller/Installer Tasks/PreChecks/{NetCore6PreCheck.cs => Net8PreCheck.cs} (65%) diff --git a/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs b/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs similarity index 65% rename from SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs rename to SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs index 856d457..f2474b1 100644 --- a/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs +++ b/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs @@ -7,18 +7,18 @@ using SPTInstaller.Helpers; namespace SPTInstaller.Installer_Tasks.PreChecks; -public class NetCore6PreCheck : PreCheckBase +public class Net8PreCheck : PreCheckBase { - public NetCore6PreCheck() : base(".Net Core 6 Desktop Runtime", true) + public Net8PreCheck() : base(".Net 8 Desktop Runtime", true) { } public override async Task CheckOperation() { - var minRequiredVersion = new Version("6.0.0"); + var minRequiredVersion = new Version("8.0.0"); string[] output; - var failedButtonText = "Download .Net Core 6 Desktop Runtime"; + var failedButtonText = "Download .Net 8 Desktop Runtime"; var failedButtonAction = () => { @@ -27,7 +27,7 @@ public class NetCore6PreCheck : PreCheckBase FileName = "cmd.exe", UseShellExecute = true, WindowStyle = ProcessWindowStyle.Hidden, - ArgumentList = { "/C", "start", "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.4-windows-x64-installer" } + ArgumentList = { "/C", "start", "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-8.0.2-windows-x64-installer" } }); }; @@ -37,7 +37,7 @@ public class NetCore6PreCheck : PreCheckBase if (!result.Succeeded) { - return PreCheckResult.FromError(result.Message + "\n\nYou most likely don't have .net 6 installed", failedButtonText, failedButtonAction); + return PreCheckResult.FromError(result.Message + "\n\nYou most likely don't have .net 8 installed", failedButtonText, failedButtonAction); } output = result.StdOut.Split("\r\n"); @@ -63,12 +63,12 @@ public class NetCore6PreCheck : PreCheckBase if (foundVersion >= minRequiredVersion) { - return PreCheckResult.FromSuccess($".Net Core {minRequiredVersion} Desktop Runtime or higher is installed.\n\nInstalled Version: {foundVersion}"); + return PreCheckResult.FromSuccess($".Net {minRequiredVersion} Desktop Runtime or higher is installed.\n\nInstalled Version: {foundVersion}"); } highestFoundVersion = foundVersion > highestFoundVersion ? foundVersion : highestFoundVersion; } - return PreCheckResult.FromError($".Net Core Desktop Runtime version {minRequiredVersion} or higher is required.\n\nHighest Version Found: {(highestFoundVersion > new Version("0.0.0") ? highestFoundVersion : "Not Found")}\n\nThis is required to play SPT, but you can install it later if and shouldn't affect the SPT install process.", failedButtonText, failedButtonAction); + return PreCheckResult.FromError($".Net Desktop Runtime version {minRequiredVersion} or higher is required.\n\nHighest Version Found: {(highestFoundVersion > new Version("0.0.0") ? highestFoundVersion : "Not Found")}\n\nThis is required to play SPT", failedButtonText, failedButtonAction); } } \ No newline at end of file diff --git a/SPTInstaller/Program.cs b/SPTInstaller/Program.cs index e546d45..c1bb4d9 100644 --- a/SPTInstaller/Program.cs +++ b/SPTInstaller/Program.cs @@ -44,7 +44,7 @@ internal class Program #if !TEST ServiceHelper.Register(); - ServiceHelper.Register(); + ServiceHelper.Register(); ServiceHelper.Register(); ServiceHelper.Register();