Update Windows version check

This commit is contained in:
Timothy Baldridge 2021-07-04 16:33:26 -06:00
parent d66890d470
commit adb15fd087
2 changed files with 6 additions and 3 deletions

View File

@ -11,7 +11,8 @@ namespace Wabbajack.Common
{
public static class Consts
{
public static Version? CurrentMinimumWabbajackVersion = new Version("2.2.2.0");
public static Version? CurrentMinimumWabbajackVersion = new("2.2.2.0");
public static Version MaximumUnsupportedWindowsVersion = new("10.0.18363.0");
public static bool TestMode { get; set; } = false;
public static RelativePath GameFolderFilesDir = (RelativePath)"Game Folder Files";

View File

@ -42,10 +42,12 @@ namespace Wabbajack
var p = SystemParametersConstructor.Create();
Utils.Log($"Detected Windows Version: {p.WindowsVersion}");
if (!(p.WindowsVersion.Major >= 10 && p.WindowsVersion.Minor >= 0))
if (!(p.WindowsVersion > Consts.MaximumUnsupportedWindowsVersion))
Utils.Log(
$"You are not running a recent version of Windows (version 10 or greater), Wabbajack is not supported on OS versions older than Windows 10.");
$"You are not running a recent version of Windows ({p.WindowsVersion}), Wabbajack is only supported on Windows versions greater than {Consts.MaximumUnsupportedWindowsVersion}.");
Utils.Log(
$"System settings - ({p.SystemMemorySize.ToFileSizeString()} RAM) ({p.SystemPageSize.ToFileSizeString()} Page), Display: {p.ScreenWidth} x {p.ScreenHeight} ({p.VideoMemorySize.ToFileSizeString()} VRAM - VideoMemorySizeMb={p.EnbLEVRAMSize})");