Bump release version and snapshot startup state
This commit is contained in:
18
src-tauri/src/process.rs
Normal file
18
src-tauri/src/process.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use std::{ffi::OsStr, process::Command};
|
||||
|
||||
pub fn command_no_window(program: impl AsRef<OsStr>) -> Command {
|
||||
let mut command = Command::new(program);
|
||||
hide_console_window(&mut command);
|
||||
command
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn hide_console_window(command: &mut Command) {
|
||||
use std::os::windows::process::CommandExt;
|
||||
|
||||
const CREATE_NO_WINDOW: u32 = 0x08000000;
|
||||
command.creation_flags(CREATE_NO_WINDOW);
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn hide_console_window(_command: &mut Command) {}
|
||||
Reference in New Issue
Block a user