feat: Try support service mode for MacOS

This commit is contained in:
MystiPanda
2024-03-31 21:44:34 +08:00
parent 9fc819a410
commit e95808e6be
11 changed files with 158 additions and 177 deletions

View File

@@ -92,17 +92,16 @@ pub fn clash_pid_path() -> Result<PathBuf> {
Ok(app_home_dir()?.join("clash.pid"))
}
#[cfg(target_os = "linux")]
#[cfg(not(target_os = "windows"))]
pub fn service_path() -> Result<PathBuf> {
Ok(app_resources_dir()?.join("clash-verge-service"))
}
}
#[cfg(windows)]
pub fn service_path() -> Result<PathBuf> {
Ok(app_resources_dir()?.join("clash-verge-service.exe"))
}
#[cfg(any(windows, target_os = "linux"))]
pub fn service_log_file() -> Result<PathBuf> {
use chrono::Local;