fix: cacher la fenêtre console du backend Python (CREATE_NO_WINDOW)
CI / lint (push) Successful in 26s
CI / security (push) Successful in 13s
CI / test (push) Successful in 29s
CI / build (push) Successful in 12s
CI / e2e (push) Failing after 25s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Successful in 26s
CI / security (push) Successful in 13s
CI / test (push) Successful in 29s
CI / build (push) Successful in 12s
CI / e2e (push) Failing after 25s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
Ajout de creation_flags(0x08000000) sur Windows pour que le processus Python ne montre pas de fenêtre terminal au démarrage
This commit is contained in:
@@ -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<Child, String> {
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user