Files
lull/src/main.rs

36 lines
666 B
Rust
Raw Permalink Normal View History

#![windows_subsystem = "windows"]
2021-04-27 10:16:25 +01:00
mod config;
mod ui_gtk;
2021-04-27 10:16:25 +01:00
use std::path::PathBuf;
2020-10-03 13:17:20 +01:00
#[cfg(target_os = "windows")]
fn file_manager() -> &'static str {
"explorer"
}
#[cfg(not(target_os = "windows"))]
fn file_manager() -> &'static str {
"xdg-open"
}
2021-04-26 21:59:24 +01:00
fn get_sounds_dir() -> PathBuf {
let mut data_dir = dirs::data_dir().expect("Couldn't find user data directory");
2021-04-26 21:58:11 +01:00
data_dir.push("ruin");
data_dir.push("lull");
if !data_dir.exists() {
2021-04-27 10:16:25 +01:00
std::fs::create_dir_all(&data_dir)
.expect("Couldn't create lull sounds directory");
}
data_dir
}
2021-04-27 10:16:25 +01:00
//#[cfg(not(target_os = "windows"))]
2020-09-22 17:46:27 +01:00
fn main() {
2021-04-27 10:16:25 +01:00
ui_gtk::instantiate();
2020-09-22 17:46:27 +01:00
}