chore: 分发包改用 WebView2 在线安装器
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user