diff --git a/repak/Cargo.toml b/repak/Cargo.toml index 1e35868..332e236 100644 --- a/repak/Cargo.toml +++ b/repak/Cargo.toml @@ -29,3 +29,6 @@ hex = { workspace = true, optional = true } [dev-dependencies] base64 = { workspace = true } paste = "1.0.11" + +[package.metadata.cargo-all-features] +denylist = ["oodle"] diff --git a/repak/src/error.rs b/repak/src/error.rs index 4bfd7df..bcb42b3 100644 --- a/repak/src/error.rs +++ b/repak/src/error.rs @@ -16,7 +16,14 @@ pub enum Error { #[error("enable the encryption feature to read encrypted paks")] 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, // std errors diff --git a/repak_cli/Cargo.toml b/repak_cli/Cargo.toml index 0c3ef14..b31338b 100644 --- a/repak_cli/Cargo.toml +++ b/repak_cli/Cargo.toml @@ -10,6 +10,11 @@ edition.workspace = true name = "repak" path = "src/main.rs" +[target.'cfg(windows)'.dependencies] +repak = { path = "../repak", features = ["oodle"] } +[target.'cfg(not(windows))'.dependencies] +repak = { path = "../repak" } + [dependencies] aes = { workspace = true } base64 = { workspace = true } @@ -19,6 +24,5 @@ indicatif = { version = "0.17.3", features = ["rayon"] } path-clean = "0.1.0" path-slash = "0.2.1" rayon = "1.6.1" -repak = { version = "0.1.7", path = "../repak", features = ["oodle"] } sha2 = "0.10.7" strum = { workspace = true }