diff --git a/desktop/src/main.rs b/desktop/src/main.rs index 1d29ca5..4157b6e 100644 --- a/desktop/src/main.rs +++ b/desktop/src/main.rs @@ -6,6 +6,9 @@ use std::path::PathBuf; use std::process::{Child, Command, Stdio}; use std::sync::Mutex; use std::time::Duration; + +#[cfg(target_os = "windows")] +use std::os::windows::process::CommandExt; use tauri::Manager; // ── State ─────────────────────────────────────────────────────────────────── @@ -143,6 +146,12 @@ fn spawn_backend(exe_dir: &PathBuf) -> Result { cmd.current_dir(&data_dir) .env("PYTHONPATH", exe_dir); + // Hide console window on Windows + #[cfg(target_os = "windows")] + { + cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW + } + // Pass vault config as env vars (VAULT_N_NAME, VAULT_N_PATH, DIR_N_NAME, DIR_N_PATH) let config = load_config(); for (i, vault) in config.vaults.iter().enumerate() {