Merge branch 'master' into feature/precheck-details

This commit is contained in:
IsWaffle 2023-07-27 14:12:06 +00:00
commit af11a12cac
4 changed files with 10 additions and 13 deletions

View File

@ -13,7 +13,7 @@ public static class DirectorySizeHelper
var installTargetDirectoryInfo = new DirectoryInfo(installTargetDirPath);
var eftSourceDirSize = GetSizeOfDirectory(eftSourceDirectoryInfo);
var availableSize = DriveInfo.GetDrives().FirstOrDefault(d => d.Name == installTargetDirectoryInfo.Root.Name)?.AvailableFreeSpace ?? 0;
var availableSize = DriveInfo.GetDrives().FirstOrDefault(d => d.Name.ToLower() == installTargetDirectoryInfo.Root.Name.ToLower())?.AvailableFreeSpace ?? 0;
return eftSourceDirSize < availableSize;
}

View File

@ -16,16 +16,7 @@ public class InitializationTask : InstallerTaskBase
public override async Task<IResult> TaskOperation()
{
SetStatus("Initializing", $"Target Install Path: {FileHelper.GetRedactedPath(_data.TargetInstallPath)}");
_data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath();
if (_data.OriginalGamePath == null)
{
return Result.FromError("EFT IS NOT INSTALLED!");
}
SetStatus(null, $"Installed EFT Game Path: {FileHelper.GetRedactedPath(_data.OriginalGamePath)}");
SetStatus("Initializing", $"Installed EFT Game Path: {FileHelper.GetRedactedPath(_data.OriginalGamePath)}");
var result = PreCheckHelper.DetectOriginalGameVersion(_data.OriginalGamePath);

View File

@ -9,8 +9,8 @@
<PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.3</AssemblyVersion>
<FileVersion>2.3</FileVersion>
<AssemblyVersion>2.4</AssemblyVersion>
<FileVersion>2.4</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -41,6 +41,12 @@ public class PreChecksViewModel : ViewModelBase
}
data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath();
if (data.OriginalGamePath == null)
{
NavigateTo(new MessageViewModel(HostScreen, Result.FromError("Could not find EFT install.\n\nDo you own and have the game installed?")));
}
data.TargetInstallPath = Environment.CurrentDirectory;
InstallPath = data.TargetInstallPath;