From 757614eb5724e50a096f4d9e67888dd588da89a0 Mon Sep 17 00:00:00 2001 From: bruno Date: Sun, 26 Jul 2026 22:47:00 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20cacher=20la=20fen=C3=AAtre=20console=20d?= =?UTF-8?q?u=20backend=20Python=20(CREATE=5FNO=5FWINDOW)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout de creation_flags(0x08000000) sur Windows pour que le processus Python ne montre pas de fenêtre terminal au démarrage --- desktop/src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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() {