MCPcopy Create free account
hub / github.com/VSCodeConfigHelper/v4 / has_webview2_installed

Function has_webview2_installed

src-tauri/src/cli/mod.rs:35–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34#[cfg(windows)]
35fn has_webview2_installed() -> bool {
36 use crate::utils::winreg;
37
38 fn correct_version(v: &str) -> bool {
39 if v == "" {
40 return false;
41 }
42 if let Ok(cmp) = version_compare::compare(v, "104.0.0.0") {
43 return cmp != version_compare::Cmp::Lt;
44 }
45 return false;
46 }
47
48 if let Some(v) = winreg::get(
49 winreg::HKEY_LOCAL_MACHINE,
50 r#"SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"#,
51 "pv",
52 ) {
53 return correct_version(&v);
54 }
55 if let Some(v) = winreg::get(
56 winreg::HKEY_CURRENT_USER,
57 r#"Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"#,
58 "pv",
59 ) {
60 return correct_version(&v);
61 }
62 return false;
63}
64
65#[macro_export]
66macro_rules! out {

Callers 1

runFunction · 0.85

Calls 2

getFunction · 0.85
correct_versionFunction · 0.85

Tested by

no test coverage detected