mirror of
https://github.com/open-goal/jak-project
synced 2026-07-31 08:16:02 -04:00
Add xdelta3 and file patching interface
This commit is contained in:
@@ -240,6 +240,17 @@ Config read_config_file(const std::string& path_to_config_file,
|
||||
config.import_deps_by_file =
|
||||
import_deps.get<std::unordered_map<std::string, std::vector<std::string>>>();
|
||||
|
||||
config.write_patches = cfg.at("write_patches").get<bool>();
|
||||
config.apply_patches = cfg.at("apply_patches").get<bool>();
|
||||
const auto& object_patches = cfg.at("object_patches");
|
||||
for (auto& [obj, pch] : object_patches.items()) {
|
||||
ObjectPatchInfo new_pch;
|
||||
new_pch.crc = (u32)std::stoull(pch.at("crc32").get<std::string>(), nullptr, 16);
|
||||
new_pch.target_file = pch.at("in").get<std::string>();
|
||||
new_pch.patch_file = pch.at("out").get<std::string>();
|
||||
config.object_patches.insert({obj, new_pch});
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user