Merge pull request 'Fix EFT Check' (#105) from waffle.lord/Installer:fix/eft-check into master

Reviewed-on: SPT/Installer#105
This commit is contained in:
IsWaffle 2024-07-23 22:12:44 +00:00
commit 1893e4e908
3 changed files with 13 additions and 13 deletions

View File

@ -10,8 +10,8 @@
<PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\spt_installer.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.90</AssemblyVersion>
<FileVersion>2.90</FileVersion>
<AssemblyVersion>2.91</AssemblyVersion>
<FileVersion>2.91</FileVersion>
<Company>SPT</Company>
</PropertyGroup>

View File

@ -152,6 +152,17 @@ public class InstallPathSelectionViewModel : ViewModelBase
_data.TargetInstallPath = SelectedPath;
_data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath();
#if !TEST
if (_data.OriginalGamePath == null)
{
NavigateTo(new MessageViewModel(HostScreen,
Result.FromError("Could not find where you installed EFT.\n\nDo you own and have the game installed?")));
return;
}
#endif
NavigateTo(new PreChecksViewModel(HostScreen));
}
}

View File

@ -128,21 +128,10 @@ public class PreChecksViewModel : ViewModelBase
return;
}
data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath();
InstallPath = data.TargetInstallPath;
Log.Information($"Install Path: {FileHelper.GetRedactedPath(InstallPath)}");
#if !TEST
if (data.OriginalGamePath == null)
{
NavigateTo(new MessageViewModel(HostScreen,
Result.FromError("Could not find where you installed EFT.\n\nDo you own and have the game installed?")));
return;
}
#endif
if (data.OriginalGamePath == data.TargetInstallPath)
{
Log.CloseAndFlush();