feat: partial support for patches

This commit is contained in:
2025-04-11 15:27:13 +00:00
parent b9a40d44a8
commit 1a68eda8c1
21 changed files with 1218 additions and 583 deletions

View File

@ -1,5 +1,6 @@
use std::hash::{DefaultHasher, Hash, Hasher};
use crate::model::config::GlobalConfig;
use crate::model::patch::PatchFileVec;
use crate::pkg::{Feature, Status};
use crate::profiles::Profile;
use crate::{model::misc::Game, pkg::PkgKey};
@ -17,6 +18,7 @@ pub struct AppData {
pub pkgs: PackageStore,
pub cfg: GlobalConfig,
pub state: GlobalState,
pub patch_set: PatchFileVec,
}
#[derive(PartialEq, Debug, Copy, Clone)]
@ -37,13 +39,18 @@ impl AppData {
None => None
};
let patch_set = PatchFileVec::new(util::config_dir())
.map_err(|e| log::error!("unable to load patch set: {e}"))
.unwrap_or_default();
log::debug!("Recent profile: {:?}", profile);
AppData {
profile: profile,
pkgs: PackageStore::new(apph.clone()),
cfg,
state: GlobalState { remain_open: true }
state: GlobalState { remain_open: true },
patch_set
}
}