mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
Fix unix building
This commit is contained in:
@@ -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]
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user