优化了自检逻辑功能和完善自检清单
This commit is contained in:
@@ -441,6 +441,12 @@ public sealed class InstallIntegrityCheckService(
|
||||
private static bool ShouldVerifyPayloadFile(string relativePath)
|
||||
{
|
||||
var normalized = Normalize(relativePath);
|
||||
if (normalized.StartsWith("Tools/", StringComparison.OrdinalIgnoreCase) ||
|
||||
normalized.StartsWith("Metadata/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return normalized.StartsWith("lang/", StringComparison.OrdinalIgnoreCase) ||
|
||||
normalized.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) ||
|
||||
normalized.EndsWith(".exe", StringComparison.OrdinalIgnoreCase) ||
|
||||
@@ -486,7 +492,11 @@ public sealed class InstallIntegrityCheckService(
|
||||
LaunchableExtensions.Contains(Path.GetExtension(path), StringComparer.OrdinalIgnoreCase))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
AddRelativeFileCheck(items, installRoot, relativePath, StartupCheckSeverity.Warning);
|
||||
var normalized = Normalize(relativePath);
|
||||
var path = Path.Combine(installRoot, normalized.Replace('/', Path.DirectorySeparatorChar));
|
||||
items.Add(File.Exists(path)
|
||||
? Passed($"file:{normalized}", Path.GetFileName(normalized), "历史外部工具清单项存在;按可选能力记录。", path)
|
||||
: Skipped($"file:{normalized}", Path.GetFileName(normalized), "历史外部工具清单项缺失;当前版本不再将 Tools 目录作为必需随包内容。", path));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public sealed class ToolResultWebBridge(
|
||||
if (!string.IsNullOrWhiteSpace(value) &&
|
||||
services.GetService<IShellNavigationService>()?.NavigateToTool(value) == true)
|
||||
{
|
||||
ToastService.Show(AppLocalizer.T("已打开工具,请确认输入后重新运行", "Tool opened; review the input and run again"), ToastKind.Information);
|
||||
ToastService.Show(AppLocalizer.T("已打开工具,请确认输入后重新运行", "Tool opened; review the input and run again"), ToastKind.Info);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user