Skip to main content

qualia_client_core/api/
windows.rs

1//! Windows runtime prerequisites
2
3#![allow(non_snake_case)]
4
5pub struct PrerequisiteStatus {
6    pub platform_requires_check: bool,
7    pub webview2_ready: bool,
8    pub webview2_bundled: bool,
9    pub webview2_evergreen: bool,
10    pub vc_redist_ready: bool,
11    pub all_ready: bool,
12    pub bundled_webview2_dir: String,
13}
14
15pub fn check_prerequisites() -> PrerequisiteStatus {
16    let s = crate::prerequisites::check_prerequisites();
17    PrerequisiteStatus {
18        platform_requires_check: s.platform_requires_check,
19        webview2_ready: s.webview2_ready,
20        webview2_bundled: s.webview2_bundled,
21        webview2_evergreen: s.webview2_evergreen,
22        vc_redist_ready: s.vc_redist_ready,
23        all_ready: s.all_ready,
24        bundled_webview2_dir: s.bundled_webview2_dir,
25    }
26}
27
28pub fn configure_webview2_runtime() -> bool {
29    crate::prerequisites::configure_webview2_runtime()
30}
31
32pub async fn install_prerequisite(kind: String) -> Result<(), String> {
33    crate::prerequisites::install_prerequisite(kind).await
34}