#![windows_subsystem = "windows"] mod config; mod ui_gtk; use std::path::PathBuf; #[cfg(target_os = "windows")] fn file_manager() -> &'static str { "explorer" } #[cfg(not(target_os = "windows"))] fn file_manager() -> &'static str { "xdg-open" } fn get_sounds_dir() -> PathBuf { let mut data_dir = dirs::data_dir().expect("Couldn't find user data directory"); data_dir.push("ruin"); data_dir.push("lull"); if !data_dir.exists() { std::fs::create_dir_all(&data_dir) .expect("Couldn't create lull sounds directory"); } data_dir } //#[cfg(not(target_os = "windows"))] fn main() { ui_gtk::instantiate(); }