imp(os-version-check): 引入更加准确的版本号检测 (#1617)

This commit is contained in:
若琳酱
2025-10-01 23:32:22 +08:00
committed by GitHub
parent b13cbc8486
commit f30e2c1572

View File

@@ -1,4 +1,4 @@
Imports System.IO
Imports System.IO
Imports PCL.Core.App
Imports PCL.Core.Utils
Imports PCL.Core.Utils.OS
@@ -132,7 +132,8 @@ WaitRetry:
Log($"[Start] 管理员权限:{ProcessInterop.IsAdmin()}")
'检测异常环境
Dim problemList As New List(Of String)
If Not Environment.OSVersion.Version.Build >= 17763 Then problemList.Add("- Windows 版本不满足推荐要求,推荐至少 Windows 10 1809建议考虑升级 Windows 系统")
Dim currentOSVersion = KernelInterop.GetCurrentOSVersion()
If currentOSVersion.Build < 17763 Then problemList.Add("- Windows 版本不满足推荐要求,推荐至少 Windows 10 1809建议考虑升级 Windows 系统")
If Is32BitSystem then problemList.Add("- 当前系统为 32 位,不受 PCL 和新版 Minecraft 支持,非常建议重装为 64 位系统后再进行游戏")
If ExePath.Contains(IO.Path.GetTempPath()) OrElse ExePath.Contains("AppData\Local\Temp\") Then problemList.Add("- PCL 正在临时目录运行,请将 PCL 从压缩包中解压之后再使用,否则可能导致游戏存档或设置丢失")
If ExePath.ContainsF("wechat_files", True) OrElse ExePath.ContainsF("WeChat Files", True) OrElse ExePath.ContainsF("Tencent Files", True) Then problemList.Add("- PCL 正在 QQ、微信、TIM 等社交软件的下载目录运行,请考虑移动到其他位置,否则可能导致游戏存档或设置丢失")