//! Installing and removing the virtual monitor's driver through the app's elevated half //! (admin.spec.md, "Virtual monitor"). Windows only, with the driver files in `display-driver/` next //! to this program and `JARVIS_TEST_VDISPLAY=install` or `uninstall`; Windows asks for the //! administrator (and on install whether to trust the SignPath Foundation). Elsewhere it skips. //! No test harness: started elevated, this same program is the elevated half. fn main() { let args: Vec = std::env::args().collect(); if let Some(code) = jarvis_app::vdisplay::elevated_main(&args) { std::process::exit(code); } let Ok(action) = std::env::var("JARVIS_TEST_VDISPLAY") else { eprintln!("skipped: set JARVIS_TEST_VDISPLAY=install|uninstall"); return; }; let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap(); let outcome = rt.block_on(jarvis_app::vdisplay::run_elevated(&action)); let status = jarvis_app::vdisplay::status(); println!("{action}: {outcome:?} -> {status:?}"); outcome.expect("the elevated half succeeds"); assert_eq!(status.installed, action == "install"); assert!(!status.other); }