From ff717aab7317c23d1aa3eff42245a60e465b4b97 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Sun, 30 Jun 2024 11:50:12 -0400 Subject: [PATCH 1/4] fix path being url encoded --- SPTInstaller/ViewModels/InstallPathSelectionViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPTInstaller/ViewModels/InstallPathSelectionViewModel.cs b/SPTInstaller/ViewModels/InstallPathSelectionViewModel.cs index b2c9547..fcac7c7 100644 --- a/SPTInstaller/ViewModels/InstallPathSelectionViewModel.cs +++ b/SPTInstaller/ViewModels/InstallPathSelectionViewModel.cs @@ -69,7 +69,7 @@ public class InstallPathSelectionViewModel : ViewModelBase Title = "Select a folder to install SPT into" }); - SelectedPath = selections.First().Path.AbsolutePath.Replace("/", "\\"); + SelectedPath = selections.First().Path.LocalPath; } } From ae08be8367137357605fe553491cba5f4a198597 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Sun, 30 Jun 2024 12:12:08 -0400 Subject: [PATCH 2/4] add eft install precheck also updated wording of free space precheck when eft install isn't found --- .../PreChecks/EftInstalledPreCheck.cs | 24 +++++++++++++++++++ .../PreChecks/FreeSpacePreCheck.cs | 2 +- SPTInstaller/Program.cs | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 SPTInstaller/Installer Tasks/PreChecks/EftInstalledPreCheck.cs diff --git a/SPTInstaller/Installer Tasks/PreChecks/EftInstalledPreCheck.cs b/SPTInstaller/Installer Tasks/PreChecks/EftInstalledPreCheck.cs new file mode 100644 index 0000000..f6926ed --- /dev/null +++ b/SPTInstaller/Installer Tasks/PreChecks/EftInstalledPreCheck.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using SPTInstaller.Models; + +namespace SPTInstaller.Installer_Tasks.PreChecks; + +public class EftInstalledPreCheck : PreCheckBase +{ + private InternalData _internalData; + + public EftInstalledPreCheck(InternalData data) : base("EFT Installed", true) + { + _internalData = data; + } + + public override async Task CheckOperation() + { + if (_internalData.OriginalGamePath is null || !Directory.Exists(_internalData.OriginalGamePath) || !File.Exists(Path.Join(_internalData.OriginalGamePath, "Escapefromtarkov.exe"))) + { + return PreCheckResult.FromError("EFT installation could not be found", "Retry", RequestReevaluation); + } + + return PreCheckResult.FromSuccess("EFT install folder found"); + } +} \ No newline at end of file diff --git a/SPTInstaller/Installer Tasks/PreChecks/FreeSpacePreCheck.cs b/SPTInstaller/Installer Tasks/PreChecks/FreeSpacePreCheck.cs index cc2ddde..2e24368 100644 --- a/SPTInstaller/Installer Tasks/PreChecks/FreeSpacePreCheck.cs +++ b/SPTInstaller/Installer Tasks/PreChecks/FreeSpacePreCheck.cs @@ -33,7 +33,7 @@ public class FreeSpacePreCheck : PreCheckBase if (eftSourceDirSize == -1) { - return PreCheckResult.FromError("An error occurred while getting the EFT source directory size"); + return PreCheckResult.FromError("An error occurred while getting the EFT source directory size. This is most likely because EFT is not installed"); } var availableSize = DriveInfo.GetDrives() diff --git a/SPTInstaller/Program.cs b/SPTInstaller/Program.cs index 99c9c75..ca4306e 100644 --- a/SPTInstaller/Program.cs +++ b/SPTInstaller/Program.cs @@ -44,6 +44,7 @@ internal class Program ServiceHelper.Register(); #if !TEST + ServiceHelper.Register(); ServiceHelper.Register(); ServiceHelper.Register(); ServiceHelper.Register(); From b9a5ad944241ca1098d3b53b3fe31f5ce9aad76f Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Sun, 30 Jun 2024 12:15:45 -0400 Subject: [PATCH 3/4] add some margin to update changelog --- SPTInstaller/ViewModels/InstallerUpdateViewModel.cs | 1 + SPTInstaller/Views/InstallerUpdateView.axaml | 1 + 2 files changed, 2 insertions(+) diff --git a/SPTInstaller/ViewModels/InstallerUpdateViewModel.cs b/SPTInstaller/ViewModels/InstallerUpdateViewModel.cs index 24fd3ee..5bf8fb8 100644 --- a/SPTInstaller/ViewModels/InstallerUpdateViewModel.cs +++ b/SPTInstaller/ViewModels/InstallerUpdateViewModel.cs @@ -21,6 +21,7 @@ public class InstallerUpdateViewModel : ViewModelBase Task.Run(async () => { await UpdateInfo.CheckForUpdates(Assembly.GetExecutingAssembly().GetName().Version); + if (!UpdateInfo.UpdateAvailable) { NavigateTo(new InstallPathSelectionViewModel(HostScreen, _debugging)); diff --git a/SPTInstaller/Views/InstallerUpdateView.axaml b/SPTInstaller/Views/InstallerUpdateView.axaml index 13493bb..75cb8b7 100644 --- a/SPTInstaller/Views/InstallerUpdateView.axaml +++ b/SPTInstaller/Views/InstallerUpdateView.axaml @@ -13,6 +13,7 @@ From 74ef0c096a23f68d3d138132fb06246fb74fe5e0 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Sun, 30 Jun 2024 12:16:14 -0400 Subject: [PATCH 4/4] bump version --- SPTInstaller/SPTInstaller.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index 7dc3185..36567aa 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -10,8 +10,8 @@ icon.ico Assets\spt_installer.ico Debug;Release;TEST - 2.81 - 2.81 + 2.82 + 2.82 SPT