Fix unix building

This commit is contained in:
Thoronium
2023-04-26 16:08:52 -06:00
parent 7a4c28b501
commit 31f77355f1
2 changed files with 12 additions and 2 deletions

View File

@@ -341,7 +341,13 @@ fn restart_grasscutter(window: tauri::Window) -> bool {
#[cfg(unix)] #[cfg(unix)]
#[tauri::command] #[tauri::command]
fn restart_grasscutter(window: tauri::Window) {} fn restart_grasscutter(window: tauri::Window) {
// Placeholder text for imports
let s = System::new();
if let Some(process) = s.process(Pid::from(1337)) {
println!("{}", process.name());
}
}
#[cfg(windows)] #[cfg(windows)]
#[tauri::command] #[tauri::command]

View File

@@ -1,7 +1,7 @@
use duct::cmd; use duct::cmd;
use ini::Ini; use ini::Ini;
use std::path::PathBuf;
use std::ffi::OsStr; use std::ffi::OsStr;
use std::path::PathBuf;
#[cfg(windows)] #[cfg(windows)]
use { use {
@@ -245,6 +245,10 @@ pub fn service_status(service: String) -> bool {
} }
} }
#[cfg(unix)]
#[tauri::command]
pub fn service_status(service: String) {}
#[cfg(windows)] #[cfg(windows)]
#[tauri::command] #[tauri::command]
pub fn start_service(service: String) -> bool { pub fn start_service(service: String) -> bool {