diff --git a/Cargo.lock b/Cargo.lock index 2895ecf..0df3095 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bpx" -version = "4.0.0-rc.10.0.0" +version = "4.0.0-rc.10.0.1" dependencies = [ "bytesutil", "elsa", @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "bpx" -version = "4.0.0-rc.10.0.0" +version = "4.0.0-rc.10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222df1991a96c96a099d12bba9c7763c3b4c1267aeb67c2fd718f35f29130a3c" +checksum = "1590de23956d302e099830860b9b85bf7f54b114b17fca9bffd4d0c8497a5260" dependencies = [ "bytesutil", "elsa", @@ -95,7 +95,7 @@ dependencies = [ name = "bpxdbg" version = "0.1.0" dependencies = [ - "bpx 4.0.0-rc.10.0.0", + "bpx 4.0.0-rc.10.0.1", "json", ] @@ -104,7 +104,7 @@ name = "bpxdump" version = "0.1.0" dependencies = [ "assert_cmd", - "bpx 4.0.0-rc.10.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bpx 4.0.0-rc.10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "clap", "predicates", ] @@ -114,7 +114,7 @@ name = "bpxp" version = "0.1.0" dependencies = [ "assert_cmd", - "bpx 4.0.0-rc.10.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bpx 4.0.0-rc.10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "clap", "file_diff", "serial_test", diff --git a/dbg/Cargo.toml b/dbg/Cargo.toml index 418da7a..2b6ff76 100644 --- a/dbg/Cargo.toml +++ b/dbg/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bpx = { version = "4.0.0-beta-10.0.0", path = "../../bpx-rs", features = ["package", "shader", "sd-formatting"] } +bpx = { version = "4.0.0-beta-10.0.1", path = "../../bpx-rs", features = ["package", "shader", "sd-formatting"] } json = "0.12.4" diff --git a/dump/Cargo.toml b/dump/Cargo.toml index caa8fa8..b2d6aa4 100644 --- a/dump/Cargo.toml +++ b/dump/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] clap = "2.27.0" -bpx = { version = "4.0.0-rc.10.0.0", features = ["sd", "sd-formatting"] } +bpx = { version = "4.0.0-rc.10.0.1", features = ["sd", "sd-formatting"] } [dev-dependencies] assert_cmd = "1.0.4" diff --git a/dump/src/bpxinfo.rs b/dump/src/bpxinfo.rs index 4cca348..cff5a56 100644 --- a/dump/src/bpxinfo.rs +++ b/dump/src/bpxinfo.rs @@ -37,6 +37,7 @@ use bpx::core::{ header::{FLAG_CHECK_CRC32, FLAG_CHECK_WEAK, FLAG_COMPRESS_XZ, FLAG_COMPRESS_ZLIB}, Container }; +use bpx::core::options::OpenOptions; use bpx::sd::formatting::{Format, IndentType}; use clap::ArgMatches; @@ -204,7 +205,11 @@ fn open_section_print( pub fn run(file: &Path, matches: &ArgMatches) -> Result<()> { - let mut bpx = Container::open(BufReader::new(File::open(file)?))?; + let options = OpenOptions::new(BufReader::new(File::open(file)?)) + .skip_signature(matches.is_present("skip_signature")) + .skip_versions(matches.is_present("skip_version")) + .skip_checksum(matches.is_present("skip_checksum")); + let mut bpx = Container::open(options)?; print_main_header(&bpx); if matches.is_present("metadata") { diff --git a/dump/src/main.rs b/dump/src/main.rs index e67f992..346e121 100644 --- a/dump/src/main.rs +++ b/dump/src/main.rs @@ -49,6 +49,9 @@ fn main() (@arg section_id: -d --dump +takes_value "Dumps the content of the section identified by the given index") (@arg out_file: -o --output +takes_value "Save dump output to a file") (@arg bpxsd: --bpxsd "Parse the section to print (specified in -d) as a BPX Structured Data Object (BPXSD)") + (@arg skip_signature: --skipsignature "Skip file signature verification") + (@arg skip_version: --skipversion "Skip file version verification") + (@arg skip_checksum: --skipchecksum "Skip checksum verifications") ) .get_matches(); let file = matches.value_of("file").unwrap(); diff --git a/package/Cargo.toml b/package/Cargo.toml index 7c03f42..b27ffad 100644 --- a/package/Cargo.toml +++ b/package/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] clap = "2.27.0" -bpx = { version = "4.0.0-rc.10.0.0", features = ["package"] } +bpx = { version = "4.0.0-rc.10.0.1", features = ["package"] } [dev-dependencies] assert_cmd = "1.0.4"