fix: stop status polling from spawning FFmpeg and hide subprocess console windows
Build Windows Release / Windows installer (push) Canceled after 0s
Build Windows Release / Windows installer (push) Canceled after 0s
This commit is contained in:
1 parent
355a798c34
commit
bde7d78c3d
9 files changed
+95
-48
No files matched your search
+16
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user