Rename get_oodle -> oodle_loader

This commit is contained in:
Truman Kilen 2023-12-16 16:23:56 -06:00
parent cb7743e347
commit 95b4f35b0d
5 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
[package] [package]
name = "get_oodle" name = "oodle_loader"
repository.workspace = true repository.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

View file

@ -26,7 +26,7 @@ pub fn decompress() -> OodleDecompress {
#[cfg(windows)] #[cfg(windows)]
return windows_oodle::decompress_wrapper_windows; return windows_oodle::decompress_wrapper_windows;
#[cfg(unix)] #[cfg(unix)]
return linux_oodle::get_oodle_linux(); return linux_oodle::oodle_loader_linux();
} }
fn call_decompress(comp_buf: &[u8], raw_buf: &mut [u8], decompress: OodleLZ_Decompress) -> i32 { fn call_decompress(comp_buf: &[u8], raw_buf: &mut [u8], decompress: OodleLZ_Decompress) -> i32 {
@ -234,7 +234,7 @@ mod linux_oodle {
array array
} }
pub fn get_oodle_linux() -> OodleDecompress { pub fn oodle_loader_linux() -> OodleDecompress {
DECOMPRESS.get_or_init(|| get_decompress_inner().unwrap()); DECOMPRESS.get_or_init(|| get_decompress_inner().unwrap());
decompress_wrapper decompress_wrapper
} }

View file

@ -11,7 +11,7 @@ name = "repak"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
get_oodle = { path = "../get_oodle" } oodle_loader = { path = "../oodle_loader" }
repak = { path = "../repak", features = ["oodle"] } repak = { path = "../repak", features = ["oodle"] }
aes = { workspace = true } aes = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }

View file

@ -282,7 +282,7 @@ const STYLE: &str = "[{elapsed_precise}] [{wide_bar}] {pos}/{len} ({eta})";
fn unpack(aes_key: Option<aes::Aes256>, action: ActionUnpack) -> Result<(), repak::Error> { fn unpack(aes_key: Option<aes::Aes256>, action: ActionUnpack) -> Result<(), repak::Error> {
for input in &action.input { for input in &action.input {
let mut builder = repak::PakBuilder::new().oodle(get_oodle::decompress); let mut builder = repak::PakBuilder::new().oodle(oodle_loader::decompress);
if let Some(aes_key) = aes_key.clone() { if let Some(aes_key) = aes_key.clone() {
builder = builder.key(aes_key); builder = builder.key(aes_key);
} }
@ -453,7 +453,7 @@ fn pack(args: ActionPack) -> Result<(), repak::Error> {
fn get(aes_key: Option<aes::Aes256>, args: ActionGet) -> Result<(), repak::Error> { fn get(aes_key: Option<aes::Aes256>, args: ActionGet) -> Result<(), repak::Error> {
let mut reader = BufReader::new(File::open(&args.input)?); let mut reader = BufReader::new(File::open(&args.input)?);
let mut builder = repak::PakBuilder::new().oodle(get_oodle::decompress); let mut builder = repak::PakBuilder::new().oodle(oodle_loader::decompress);
if let Some(aes_key) = aes_key { if let Some(aes_key) = aes_key {
builder = builder.key(aes_key); builder = builder.key(aes_key);
} }