fix: stop status polling from spawning FFmpeg and hide subprocess console windows
Build Windows Release / Windows installer (push) Canceled after 0s

This commit is contained in:
Alvin-Zilverstand committed 2026-09-14 13:51:46 +02:00
1 parent 355a798c34
commit bde7d78c3d
9 files changed
+95 -48

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
use std::path::Path;
use std::process::Command;
/// Builds a `Command` that never shows a console window on Windows. FFmpeg and other
/// console subprocesses otherwise flash a terminal window each time they start from a
/// GUI (Tauri) process, which looks like the app constantly opening and closing.
pub fn hidden_command(program: impl AsRef<Path>) -> Command {
let mut command = Command::new(program.as_ref());
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
command.creation_flags(CREATE_NO_WINDOW);
}
command
}