use crate::path::StrictPath;
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Ea {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Epic {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Gog {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct GogGalaxy {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Heroic {
pub path: StrictPath,
}
impl Heroic {
pub const FLATPAK_SUFFIX: &str = ".var/app/com.heroicgameslauncher.hgl/config/heroic";
pub fn flatpak_home(&self) -> Option<StrictPath> {
self.path
.raw()
.ends_with(Self::FLATPAK_SUFFIX)
.then(|| self.path.popped().popped())
}
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Legendary {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Lutris {
pub path: StrictPath,
pub database: Option<StrictPath>,
}
impl Lutris {
pub const FLATPAK_SUFFIX_DATA: &str = ".var/app/net.lutris.Lutris/data/lutris";
pub const FLATPAK_SUFFIX_CONFIG: &str = ".var/app/net.lutris.Lutris/config/lutris";
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Microsoft {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Origin {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Prime {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Steam {
pub path: StrictPath,
}
impl Steam {
pub const FLATPAK_SUFFIX: &str = ".var/app/com.valvesoftware.Steam/.steam/steam";
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Uplay {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct OtherHome {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct OtherWine {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct OtherWindows {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct OtherLinux {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct OtherMac {
pub path: StrictPath,
}
#[derive(
Clone,
Debug,
Default,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
)]
#[serde(default, rename_all = "camelCase")]
pub struct Other {
pub path: StrictPath,
}