Improve installer extraction, login failures, and upload handling
This commit is contained in:
@@ -256,14 +256,14 @@ public static class InstallerEngine
|
||||
prerequisites.WebView2Installed ? PreflightStatus.Passed : PreflightStatus.Warning,
|
||||
prerequisites.WebView2Installed
|
||||
? $"已安装 {prerequisites.WebView2Version ?? "可用版本"}。"
|
||||
: "未检测到;开始安装时将从微软官方地址下载并静默安装。"),
|
||||
: "未检测到;开始安装时将从微软官方地址下载,请在弹出的安装窗口中完成安装。"),
|
||||
new(
|
||||
"vcruntime",
|
||||
"Microsoft Visual C++ x64 Runtime",
|
||||
prerequisites.VcRuntimeInstalled ? PreflightStatus.Passed : PreflightStatus.Warning,
|
||||
prerequisites.VcRuntimeInstalled
|
||||
? $"已安装 {prerequisites.VcRuntimeVersion ?? "可用版本"}。"
|
||||
: "未检测到;开始安装时将从微软官方地址下载并静默安装。"),
|
||||
: "未检测到;开始安装时将从微软官方地址下载,请在弹出的安装窗口中完成安装。"),
|
||||
EvaluateDirectory(targetDirectory),
|
||||
SelfTest()
|
||||
? new PreflightItem("engine", "安装引擎完整性", PreflightStatus.Passed, "嵌入引擎已通过哈希命名释放和 PE 完整性检查。")
|
||||
@@ -481,6 +481,7 @@ public static class InstallerEngine
|
||||
"retry" => $"下载中断,正在重试 {fields[2]}。",
|
||||
"bundled" => $"正在使用安装包内置的 {fields[2]}。",
|
||||
"install" => $"正在安装 {fields[2]}。",
|
||||
"waiting" => $"请在弹出的安装窗口中完成 {fields[2]} 安装;窗口关闭后将自动继续。",
|
||||
"complete" => $"{fields[2]} 安装完成。",
|
||||
_ => fields[2]
|
||||
};
|
||||
|
||||
@@ -64,6 +64,19 @@ public sealed class ToolCatalogTests
|
||||
Assert.IsTrue(catalog.Search("音乐").Any(module => module.Id == "music"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FullToolboxCatalogIncludesMigratedToolFamilies()
|
||||
{
|
||||
var builtin = new BuiltinReferenceToolCatalog().GetModules();
|
||||
var catalog = new ToolCatalog(ToolCatalog.DefaultModules()
|
||||
.Concat(NexNativeToolCatalog.Modules)
|
||||
.Concat(builtin));
|
||||
|
||||
Assert.IsNotNull(catalog.GetById("hotboard"));
|
||||
Assert.IsTrue(catalog.Modules.Any(module => module is NexNativeToolModule));
|
||||
Assert.IsTrue(catalog.Modules.Any(module => module is BuiltinReferenceToolModule));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void EveryCatalogToolHasOneStableDisplayGroup()
|
||||
{
|
||||
|
||||
@@ -1562,6 +1562,7 @@ public sealed partial class MainWindow : Window, IShellNavigationHost
|
||||
var builtinTools = _builtinToolCatalog.GetModules();
|
||||
|
||||
var modules = ToolCatalog.DefaultModules()
|
||||
.Concat(NexNativeToolCatalog.Modules)
|
||||
.Concat(builtinTools)
|
||||
.Concat(externalTools)
|
||||
.Concat(pluginTools)
|
||||
@@ -1573,7 +1574,7 @@ public sealed partial class MainWindow : Window, IShellNavigationHost
|
||||
"Information",
|
||||
"tool-catalog",
|
||||
"Tool catalog rebuilt",
|
||||
$"native={ToolCatalog.DefaultModules().Count()}; builtin={builtinTools.Count}; external={externalTools.Count}; plugin={pluginTools.Count()}",
|
||||
$"native={ToolCatalog.DefaultModules().Count()}; nex={NexNativeToolCatalog.Modules.Count}; builtin={builtinTools.Count}; external={externalTools.Count}; plugin={pluginTools.Count()}",
|
||||
cancellationToken);
|
||||
|
||||
return new ToolCatalog(modules);
|
||||
|
||||
@@ -255,7 +255,11 @@ public sealed class StartupInitializationService(
|
||||
context.Report(0.25, T("正在扫描内置与随包工具...", "Scanning built-in and bundled tools..."));
|
||||
var externalTools = await externalToolCatalog.GetModulesAsync(token).ConfigureAwait(false);
|
||||
var builtinTools = builtinToolCatalog.GetModules();
|
||||
var count = ToolCatalog.DefaultModules().Count() + builtinTools.Count + externalTools.Count;
|
||||
var count = ToolCatalog.DefaultModules()
|
||||
.Concat(NexNativeToolCatalog.Modules)
|
||||
.Concat(builtinTools)
|
||||
.Concat(externalTools)
|
||||
.Count();
|
||||
setToolCount(count);
|
||||
context.Report(1, T($"工具目录已就绪:{count} 个工具。", $"Tool catalog ready: {count} tools."));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user