Create files for configuration

This commit is contained in:
Philip Kristoffersen
2021-09-24 23:08:35 +02:00
parent 517cf87d87
commit 60dd680c33
8 changed files with 221 additions and 7 deletions
+29
View File
@@ -0,0 +1,29 @@
use serde::Deserialize;
#[derive(Debug, Deserialize)]
struct EpicGamesLauncher {
enabled: bool,
location: Option<String>,
}
impl Default for EpicGamesLauncher {
fn default() -> Self {
// On windows
// Even if no path is given, we can try to guess, so lets enable by default
#[cfg(target_os = "windows")]
let enabled = true;
// On linux
// We can notguess, so lets not enable by default
#[cfg(target_os = "linux")]
let enabled = false;
EpicGamesLauncher {
enabled,
location: None,
}
}
}