chore: 分发包改用 WebView2 在线安装器

This commit is contained in:
Nixevol
2026-10-25 05:49:44 +08:00
parent f53498f6e6
commit 2286bc597d
3 changed files with 16 additions and 11 deletions
+5 -5
View File
@@ -54,11 +54,11 @@ fn prepare_webview_runtime(root: &Path) {
if webview_runtime_installed() {
return;
}
let installer = root
.join("vendor")
.join("webview2")
.join("MicrosoftEdgeWebView2RuntimeInstallerX64.exe");
if installer.is_file() {
let installer = ["MicrosoftEdgeWebview2Setup.exe", "MicrosoftEdgeWebView2RuntimeInstallerX64.exe"]
.into_iter()
.map(|name| root.join("vendor").join("webview2").join(name))
.find(|path| path.is_file());
if let Some(installer) = installer {
let _ = Command::new(installer).args(["/silent", "/install"]).status();
}
}