const APP_NAME: &str = "招财进宝小助手";
pub fn init() {
if !is_enabled() || !is_scheduled_task_enabled() {
let results = enable_all();
for (name, result) in &results {
match result {
Ok(()) => tracing::info!("[自启] {name} 已设置"),
Err(e) => tracing::warn!("[自启] {name} 失败: {e}"),
}
}
}
}
fn exe_path() -> Option<String> {
std::env::current_exe()
.ok()
.map(|p| p.to_string_lossy().to_string())
}
#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
pub use windows::*;
#[cfg(not(target_os = "windows"))]
mod fallback;
#[cfg(not(target_os = "windows"))]
pub use fallback::*;