Fix oodle feature config for non-windows targets

This commit is contained in:
Truman Kilen 2023-08-28 10:58:22 -05:00
parent 87efb35d66
commit aa6d5f49b1
3 changed files with 16 additions and 2 deletions

View file

@ -29,3 +29,6 @@ hex = { workspace = true, optional = true }
[dev-dependencies] [dev-dependencies]
base64 = { workspace = true } base64 = { workspace = true }
paste = "1.0.11" paste = "1.0.11"
[package.metadata.cargo-all-features]
denylist = ["oodle"]

View file

@ -16,7 +16,14 @@ pub enum Error {
#[error("enable the encryption feature to read encrypted paks")] #[error("enable the encryption feature to read encrypted paks")]
Encryption, Encryption,
#[error("enable the oodle feature to read oodle paks")] #[cfg_attr(
windows,
error("enable the oodle feature to read Oodle compressed paks")
)]
#[cfg_attr(
not(windows),
error("Oodle compression only supported on Windows (or WINE)")
)]
Oodle, Oodle,
// std errors // std errors

View file

@ -10,6 +10,11 @@ edition.workspace = true
name = "repak" name = "repak"
path = "src/main.rs" path = "src/main.rs"
[target.'cfg(windows)'.dependencies]
repak = { path = "../repak", features = ["oodle"] }
[target.'cfg(not(windows))'.dependencies]
repak = { path = "../repak" }
[dependencies] [dependencies]
aes = { workspace = true } aes = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }
@ -19,6 +24,5 @@ indicatif = { version = "0.17.3", features = ["rayon"] }
path-clean = "0.1.0" path-clean = "0.1.0"
path-slash = "0.2.1" path-slash = "0.2.1"
rayon = "1.6.1" rayon = "1.6.1"
repak = { version = "0.1.7", path = "../repak", features = ["oodle"] }
sha2 = "0.10.7" sha2 = "0.10.7"
strum = { workspace = true } strum = { workspace = true }