From 40f8a1e0f51c13d2666c8a0e01ef268a3c79c8fb Mon Sep 17 00:00:00 2001 From: Willard Date: Sat, 4 May 2024 23:07:36 +0200 Subject: [PATCH] split into lib and cli --- .gitignore | 8 +-- Cargo.toml | 66 +++--------------- arma-file-formats-cli/Cargo.toml | 16 +++++ arma-file-formats-cli/src/main.rs | 3 + arma-file-formats/Cargo.toml | 57 +++++++++++++++ .../src}/enfusion/mod.rs | 0 {src => arma-file-formats/src}/errors/mod.rs | 0 {src => arma-file-formats/src}/lib.rs | 0 .../src}/real_virtuality/core/binrw_utils.rs | 0 .../src}/real_virtuality/core/lzss.rs | 0 .../src}/real_virtuality/core/mod.rs | 0 .../src}/real_virtuality/core/read.rs | 0 .../src}/real_virtuality/core/types.rs | 0 .../src}/real_virtuality/core/write.rs | 0 .../src}/real_virtuality/mod.rs | 0 .../src}/real_virtuality/p3d/animations.rs | 0 .../src}/real_virtuality/p3d/enums.rs | 0 .../src}/real_virtuality/p3d/face_data.rs | 0 .../src}/real_virtuality/p3d/lod.rs | 0 .../src}/real_virtuality/p3d/mod.rs | 0 .../src}/real_virtuality/p3d/model_info.rs | 0 .../src}/real_virtuality/p3d/odol.rs | 0 .../src}/real_virtuality/p3d/skeleton.rs | 0 .../src}/real_virtuality/paa/mipmap.rs | 0 .../src}/real_virtuality/paa/mod.rs | 0 .../src}/real_virtuality/paa/paa.rs | 0 .../src}/real_virtuality/paa/tagg.rs | 0 .../src}/real_virtuality/pbo/archive.rs | 0 .../real_virtuality/pbo/archive_reader.rs | 0 .../src}/real_virtuality/pbo/entry.rs | 0 .../src}/real_virtuality/pbo/mod.rs | 0 .../src}/real_virtuality/rap/class.rs | 0 .../src}/real_virtuality/rap/config.rs | 0 .../src}/real_virtuality/rap/entry.rs | 0 .../src}/real_virtuality/rap/mod.rs | 0 .../src}/real_virtuality/rap/parser.rs | 0 .../src}/real_virtuality/rap/pretty_print.rs | 0 .../src}/real_virtuality/rap/property.rs | 0 .../src}/real_virtuality/rap/value.rs | 0 .../src}/real_virtuality/sign/mod.rs | 0 .../src}/real_virtuality/sign/private_key.rs | 0 .../src}/real_virtuality/sign/public_key.rs | 0 .../src}/real_virtuality/sign/signature.rs | 0 .../src}/real_virtuality/wrp/mod.rs | 0 .../src}/real_virtuality/wrp/oprw.rs | 0 .../src}/real_virtuality/wrp/quadtree.rs | 0 .../tests}/real_virtuality/p3d_test.rs | 0 .../tests}/real_virtuality/paa_test.rs | 0 .../tests}/real_virtuality/pbo_test.rs | 0 .../tests}/real_virtuality/rap_test.rs | 0 .../tests}/real_virtuality/util_test.rs | 0 .../tests}/real_virtuality/wrp_test.rs | 0 .../tests}/test-data-setup/Cargo.toml | 0 .../tests}/test-data-setup/src/main.rs | 6 +- .../tests}/test-data/rv-test-data-part-1.7z | Bin .../tests}/test-data/rv-test-data-part-2.7z | Bin .../tests}/test-data/rv-test-data-part-3.7z | Bin {tests => arma-file-formats/tests}/tests.rs | 0 58 files changed, 90 insertions(+), 66 deletions(-) create mode 100644 arma-file-formats-cli/Cargo.toml create mode 100644 arma-file-formats-cli/src/main.rs create mode 100644 arma-file-formats/Cargo.toml rename {src => arma-file-formats/src}/enfusion/mod.rs (100%) rename {src => arma-file-formats/src}/errors/mod.rs (100%) rename {src => arma-file-formats/src}/lib.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/binrw_utils.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/lzss.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/read.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/types.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/core/write.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/animations.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/enums.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/face_data.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/lod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/model_info.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/odol.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/p3d/skeleton.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/paa/mipmap.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/paa/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/paa/paa.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/paa/tagg.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/pbo/archive.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/pbo/archive_reader.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/pbo/entry.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/pbo/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/class.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/config.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/entry.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/parser.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/pretty_print.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/property.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/rap/value.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/sign/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/sign/private_key.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/sign/public_key.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/sign/signature.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/wrp/mod.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/wrp/oprw.rs (100%) rename {src => arma-file-formats/src}/real_virtuality/wrp/quadtree.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/p3d_test.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/paa_test.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/pbo_test.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/rap_test.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/util_test.rs (100%) rename {tests => arma-file-formats/tests}/real_virtuality/wrp_test.rs (100%) rename {tests => arma-file-formats/tests}/test-data-setup/Cargo.toml (100%) rename {tests => arma-file-formats/tests}/test-data-setup/src/main.rs (74%) rename {tests => arma-file-formats/tests}/test-data/rv-test-data-part-1.7z (100%) rename {tests => arma-file-formats/tests}/test-data/rv-test-data-part-2.7z (100%) rename {tests => arma-file-formats/tests}/test-data/rv-test-data-part-3.7z (100%) rename {tests => arma-file-formats/tests}/tests.rs (100%) diff --git a/.gitignore b/.gitignore index 030a9c3..285a5f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,7 @@ +/arma-file-formats/tests/real_virtuality/test-data/* + /target -/Cargo.lock +Cargo.lock -tarpaulin-report.html -*.profraw .env lcov.info - -/tests/real_virtuality/test-data/* diff --git a/Cargo.toml b/Cargo.toml index bd1c288..d7d40e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,58 +1,8 @@ -workspace = { members = ["tests/test-data-setup"] } -[package] -name = "arma-file-formats" -version = "0.1.0" -edition = "2021" -description = "Pure rust implementation of most of the Real Virtuality & Enfusion file formats." -license = "MIT" -repository = "https://github.com/arma-tools/arma-file-formats/" -readme = "README.md" -keywords = ["pbo", "paa", "p3d", "wrp", "real-virtuality", "decoding"] -categories = ["decoding", "parser-implementations", "parsing"] - -[lib] -crate-type = ["lib", "staticlib"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -byteorder = "1.4.3" -num_enum = "0.6.1" - -binrw = "0.11.2" - -rayon = { version = "1.5.1", optional = true } -anyhow = "1.0.53" -thiserror = "1.0.30" - -derivative = "2.2.0" - -# Paa -squish = "2.0.0-beta1" - -# PBO -indexmap = "2.0.0" -sha-1 = "0.10.1" - -# Sign -rsa = { version = "0.9.2" } -rand = { version = "0.8.5" } -getrandom = { version = "0.2", features = ["js"] } - -# Rap -ariadne = "0.3.0" -chumsky = "0.9.0" - -# LZO -lzokay-native = "0.1" - -[dev-dependencies] -image = "0.24.6" -serial_test = "2.0.0" - -[features] -default = ["real_virtuality", "enfusion"] - -parallel = ["squish/rayon", "rayon"] -real_virtuality = [] -enfusion = [] +[workspace] +members = [ + "arma-file-formats", + "arma-file-formats-cli", + "arma-file-formats/tests/test-data-setup", +] + +resolver = "2" diff --git a/arma-file-formats-cli/Cargo.toml b/arma-file-formats-cli/Cargo.toml new file mode 100644 index 0000000..bf52c6c --- /dev/null +++ b/arma-file-formats-cli/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "arma-file-formats-cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +arma-file-formats = { path = "../arma-file-formats" } +clap = { version = "4.5.4", features = ["derive"] } + +[features] +default = ["real_virtuality", "enfusion"] + +real_virtuality = [] +enfusion = [] diff --git a/arma-file-formats-cli/src/main.rs b/arma-file-formats-cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/arma-file-formats-cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/arma-file-formats/Cargo.toml b/arma-file-formats/Cargo.toml new file mode 100644 index 0000000..a096fde --- /dev/null +++ b/arma-file-formats/Cargo.toml @@ -0,0 +1,57 @@ +[package] +name = "arma-file-formats" +version = "0.1.0" +edition = "2021" +description = "Pure rust implementation of most of the Real Virtuality & Enfusion file formats." +license = "MIT" +repository = "https://github.com/arma-tools/arma-file-formats/" +readme = "README.md" +keywords = ["pbo", "paa", "p3d", "wrp", "real-virtuality", "decoding"] +categories = ["decoding", "parser-implementations", "parsing"] + +[lib] +crate-type = ["lib", "staticlib"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +byteorder = "1.4.3" +num_enum = "0.6.1" + +binrw = "0.11.2" + +rayon = { version = "1.5.1", optional = true } +anyhow = "1.0.53" +thiserror = "1.0.30" + +derivative = "2.2.0" + +# Paa +squish = "2.0.0-beta1" + +# PBO +indexmap = "2.0.0" +sha-1 = "0.10.1" + +# Sign +rsa = { version = "0.9.2" } +rand = { version = "0.8.5" } +getrandom = { version = "0.2", features = ["js"] } + +# Rap +ariadne = "0.3.0" +chumsky = "0.9.0" + +# LZO +lzokay-native = "0.1" + +[dev-dependencies] +image = "0.24.6" +serial_test = "2.0.0" + +[features] +default = ["real_virtuality", "enfusion"] + +parallel = ["squish/rayon", "rayon"] +real_virtuality = [] +enfusion = [] diff --git a/src/enfusion/mod.rs b/arma-file-formats/src/enfusion/mod.rs similarity index 100% rename from src/enfusion/mod.rs rename to arma-file-formats/src/enfusion/mod.rs diff --git a/src/errors/mod.rs b/arma-file-formats/src/errors/mod.rs similarity index 100% rename from src/errors/mod.rs rename to arma-file-formats/src/errors/mod.rs diff --git a/src/lib.rs b/arma-file-formats/src/lib.rs similarity index 100% rename from src/lib.rs rename to arma-file-formats/src/lib.rs diff --git a/src/real_virtuality/core/binrw_utils.rs b/arma-file-formats/src/real_virtuality/core/binrw_utils.rs similarity index 100% rename from src/real_virtuality/core/binrw_utils.rs rename to arma-file-formats/src/real_virtuality/core/binrw_utils.rs diff --git a/src/real_virtuality/core/lzss.rs b/arma-file-formats/src/real_virtuality/core/lzss.rs similarity index 100% rename from src/real_virtuality/core/lzss.rs rename to arma-file-formats/src/real_virtuality/core/lzss.rs diff --git a/src/real_virtuality/core/mod.rs b/arma-file-formats/src/real_virtuality/core/mod.rs similarity index 100% rename from src/real_virtuality/core/mod.rs rename to arma-file-formats/src/real_virtuality/core/mod.rs diff --git a/src/real_virtuality/core/read.rs b/arma-file-formats/src/real_virtuality/core/read.rs similarity index 100% rename from src/real_virtuality/core/read.rs rename to arma-file-formats/src/real_virtuality/core/read.rs diff --git a/src/real_virtuality/core/types.rs b/arma-file-formats/src/real_virtuality/core/types.rs similarity index 100% rename from src/real_virtuality/core/types.rs rename to arma-file-formats/src/real_virtuality/core/types.rs diff --git a/src/real_virtuality/core/write.rs b/arma-file-formats/src/real_virtuality/core/write.rs similarity index 100% rename from src/real_virtuality/core/write.rs rename to arma-file-formats/src/real_virtuality/core/write.rs diff --git a/src/real_virtuality/mod.rs b/arma-file-formats/src/real_virtuality/mod.rs similarity index 100% rename from src/real_virtuality/mod.rs rename to arma-file-formats/src/real_virtuality/mod.rs diff --git a/src/real_virtuality/p3d/animations.rs b/arma-file-formats/src/real_virtuality/p3d/animations.rs similarity index 100% rename from src/real_virtuality/p3d/animations.rs rename to arma-file-formats/src/real_virtuality/p3d/animations.rs diff --git a/src/real_virtuality/p3d/enums.rs b/arma-file-formats/src/real_virtuality/p3d/enums.rs similarity index 100% rename from src/real_virtuality/p3d/enums.rs rename to arma-file-formats/src/real_virtuality/p3d/enums.rs diff --git a/src/real_virtuality/p3d/face_data.rs b/arma-file-formats/src/real_virtuality/p3d/face_data.rs similarity index 100% rename from src/real_virtuality/p3d/face_data.rs rename to arma-file-formats/src/real_virtuality/p3d/face_data.rs diff --git a/src/real_virtuality/p3d/lod.rs b/arma-file-formats/src/real_virtuality/p3d/lod.rs similarity index 100% rename from src/real_virtuality/p3d/lod.rs rename to arma-file-formats/src/real_virtuality/p3d/lod.rs diff --git a/src/real_virtuality/p3d/mod.rs b/arma-file-formats/src/real_virtuality/p3d/mod.rs similarity index 100% rename from src/real_virtuality/p3d/mod.rs rename to arma-file-formats/src/real_virtuality/p3d/mod.rs diff --git a/src/real_virtuality/p3d/model_info.rs b/arma-file-formats/src/real_virtuality/p3d/model_info.rs similarity index 100% rename from src/real_virtuality/p3d/model_info.rs rename to arma-file-formats/src/real_virtuality/p3d/model_info.rs diff --git a/src/real_virtuality/p3d/odol.rs b/arma-file-formats/src/real_virtuality/p3d/odol.rs similarity index 100% rename from src/real_virtuality/p3d/odol.rs rename to arma-file-formats/src/real_virtuality/p3d/odol.rs diff --git a/src/real_virtuality/p3d/skeleton.rs b/arma-file-formats/src/real_virtuality/p3d/skeleton.rs similarity index 100% rename from src/real_virtuality/p3d/skeleton.rs rename to arma-file-formats/src/real_virtuality/p3d/skeleton.rs diff --git a/src/real_virtuality/paa/mipmap.rs b/arma-file-formats/src/real_virtuality/paa/mipmap.rs similarity index 100% rename from src/real_virtuality/paa/mipmap.rs rename to arma-file-formats/src/real_virtuality/paa/mipmap.rs diff --git a/src/real_virtuality/paa/mod.rs b/arma-file-formats/src/real_virtuality/paa/mod.rs similarity index 100% rename from src/real_virtuality/paa/mod.rs rename to arma-file-formats/src/real_virtuality/paa/mod.rs diff --git a/src/real_virtuality/paa/paa.rs b/arma-file-formats/src/real_virtuality/paa/paa.rs similarity index 100% rename from src/real_virtuality/paa/paa.rs rename to arma-file-formats/src/real_virtuality/paa/paa.rs diff --git a/src/real_virtuality/paa/tagg.rs b/arma-file-formats/src/real_virtuality/paa/tagg.rs similarity index 100% rename from src/real_virtuality/paa/tagg.rs rename to arma-file-formats/src/real_virtuality/paa/tagg.rs diff --git a/src/real_virtuality/pbo/archive.rs b/arma-file-formats/src/real_virtuality/pbo/archive.rs similarity index 100% rename from src/real_virtuality/pbo/archive.rs rename to arma-file-formats/src/real_virtuality/pbo/archive.rs diff --git a/src/real_virtuality/pbo/archive_reader.rs b/arma-file-formats/src/real_virtuality/pbo/archive_reader.rs similarity index 100% rename from src/real_virtuality/pbo/archive_reader.rs rename to arma-file-formats/src/real_virtuality/pbo/archive_reader.rs diff --git a/src/real_virtuality/pbo/entry.rs b/arma-file-formats/src/real_virtuality/pbo/entry.rs similarity index 100% rename from src/real_virtuality/pbo/entry.rs rename to arma-file-formats/src/real_virtuality/pbo/entry.rs diff --git a/src/real_virtuality/pbo/mod.rs b/arma-file-formats/src/real_virtuality/pbo/mod.rs similarity index 100% rename from src/real_virtuality/pbo/mod.rs rename to arma-file-formats/src/real_virtuality/pbo/mod.rs diff --git a/src/real_virtuality/rap/class.rs b/arma-file-formats/src/real_virtuality/rap/class.rs similarity index 100% rename from src/real_virtuality/rap/class.rs rename to arma-file-formats/src/real_virtuality/rap/class.rs diff --git a/src/real_virtuality/rap/config.rs b/arma-file-formats/src/real_virtuality/rap/config.rs similarity index 100% rename from src/real_virtuality/rap/config.rs rename to arma-file-formats/src/real_virtuality/rap/config.rs diff --git a/src/real_virtuality/rap/entry.rs b/arma-file-formats/src/real_virtuality/rap/entry.rs similarity index 100% rename from src/real_virtuality/rap/entry.rs rename to arma-file-formats/src/real_virtuality/rap/entry.rs diff --git a/src/real_virtuality/rap/mod.rs b/arma-file-formats/src/real_virtuality/rap/mod.rs similarity index 100% rename from src/real_virtuality/rap/mod.rs rename to arma-file-formats/src/real_virtuality/rap/mod.rs diff --git a/src/real_virtuality/rap/parser.rs b/arma-file-formats/src/real_virtuality/rap/parser.rs similarity index 100% rename from src/real_virtuality/rap/parser.rs rename to arma-file-formats/src/real_virtuality/rap/parser.rs diff --git a/src/real_virtuality/rap/pretty_print.rs b/arma-file-formats/src/real_virtuality/rap/pretty_print.rs similarity index 100% rename from src/real_virtuality/rap/pretty_print.rs rename to arma-file-formats/src/real_virtuality/rap/pretty_print.rs diff --git a/src/real_virtuality/rap/property.rs b/arma-file-formats/src/real_virtuality/rap/property.rs similarity index 100% rename from src/real_virtuality/rap/property.rs rename to arma-file-formats/src/real_virtuality/rap/property.rs diff --git a/src/real_virtuality/rap/value.rs b/arma-file-formats/src/real_virtuality/rap/value.rs similarity index 100% rename from src/real_virtuality/rap/value.rs rename to arma-file-formats/src/real_virtuality/rap/value.rs diff --git a/src/real_virtuality/sign/mod.rs b/arma-file-formats/src/real_virtuality/sign/mod.rs similarity index 100% rename from src/real_virtuality/sign/mod.rs rename to arma-file-formats/src/real_virtuality/sign/mod.rs diff --git a/src/real_virtuality/sign/private_key.rs b/arma-file-formats/src/real_virtuality/sign/private_key.rs similarity index 100% rename from src/real_virtuality/sign/private_key.rs rename to arma-file-formats/src/real_virtuality/sign/private_key.rs diff --git a/src/real_virtuality/sign/public_key.rs b/arma-file-formats/src/real_virtuality/sign/public_key.rs similarity index 100% rename from src/real_virtuality/sign/public_key.rs rename to arma-file-formats/src/real_virtuality/sign/public_key.rs diff --git a/src/real_virtuality/sign/signature.rs b/arma-file-formats/src/real_virtuality/sign/signature.rs similarity index 100% rename from src/real_virtuality/sign/signature.rs rename to arma-file-formats/src/real_virtuality/sign/signature.rs diff --git a/src/real_virtuality/wrp/mod.rs b/arma-file-formats/src/real_virtuality/wrp/mod.rs similarity index 100% rename from src/real_virtuality/wrp/mod.rs rename to arma-file-formats/src/real_virtuality/wrp/mod.rs diff --git a/src/real_virtuality/wrp/oprw.rs b/arma-file-formats/src/real_virtuality/wrp/oprw.rs similarity index 100% rename from src/real_virtuality/wrp/oprw.rs rename to arma-file-formats/src/real_virtuality/wrp/oprw.rs diff --git a/src/real_virtuality/wrp/quadtree.rs b/arma-file-formats/src/real_virtuality/wrp/quadtree.rs similarity index 100% rename from src/real_virtuality/wrp/quadtree.rs rename to arma-file-formats/src/real_virtuality/wrp/quadtree.rs diff --git a/tests/real_virtuality/p3d_test.rs b/arma-file-formats/tests/real_virtuality/p3d_test.rs similarity index 100% rename from tests/real_virtuality/p3d_test.rs rename to arma-file-formats/tests/real_virtuality/p3d_test.rs diff --git a/tests/real_virtuality/paa_test.rs b/arma-file-formats/tests/real_virtuality/paa_test.rs similarity index 100% rename from tests/real_virtuality/paa_test.rs rename to arma-file-formats/tests/real_virtuality/paa_test.rs diff --git a/tests/real_virtuality/pbo_test.rs b/arma-file-formats/tests/real_virtuality/pbo_test.rs similarity index 100% rename from tests/real_virtuality/pbo_test.rs rename to arma-file-formats/tests/real_virtuality/pbo_test.rs diff --git a/tests/real_virtuality/rap_test.rs b/arma-file-formats/tests/real_virtuality/rap_test.rs similarity index 100% rename from tests/real_virtuality/rap_test.rs rename to arma-file-formats/tests/real_virtuality/rap_test.rs diff --git a/tests/real_virtuality/util_test.rs b/arma-file-formats/tests/real_virtuality/util_test.rs similarity index 100% rename from tests/real_virtuality/util_test.rs rename to arma-file-formats/tests/real_virtuality/util_test.rs diff --git a/tests/real_virtuality/wrp_test.rs b/arma-file-formats/tests/real_virtuality/wrp_test.rs similarity index 100% rename from tests/real_virtuality/wrp_test.rs rename to arma-file-formats/tests/real_virtuality/wrp_test.rs diff --git a/tests/test-data-setup/Cargo.toml b/arma-file-formats/tests/test-data-setup/Cargo.toml similarity index 100% rename from tests/test-data-setup/Cargo.toml rename to arma-file-formats/tests/test-data-setup/Cargo.toml diff --git a/tests/test-data-setup/src/main.rs b/arma-file-formats/tests/test-data-setup/src/main.rs similarity index 74% rename from tests/test-data-setup/src/main.rs rename to arma-file-formats/tests/test-data-setup/src/main.rs index 36ba836..fa35dbb 100644 --- a/tests/test-data-setup/src/main.rs +++ b/arma-file-formats/tests/test-data-setup/src/main.rs @@ -1,7 +1,7 @@ use std::{env, path::Path}; fn main() { - if Path::new("tests/real_virtuality/test-data") + if Path::new("arma-file-formats/tests/real_virtuality/test-data") .read_dir() .is_ok_and(|mut rd| rd.next().is_some()) { @@ -13,12 +13,12 @@ fn main() { } for i in 1..4 { - let file = format!("tests/test-data/rv-test-data-part-{i}.7z"); + let file = format!("arma-file-formats/tests/test-data/rv-test-data-part-{i}.7z"); println!("Extracting test data: {file}"); sevenz_rust::decompress_file_with_password( file, - "tests/real_virtuality/", + "arma-file-formats/tests/real_virtuality/", env::var("AFF_TEST_DATA_PW") .expect("AFF_TEST_DATA_PW not set") .to_string() diff --git a/tests/test-data/rv-test-data-part-1.7z b/arma-file-formats/tests/test-data/rv-test-data-part-1.7z similarity index 100% rename from tests/test-data/rv-test-data-part-1.7z rename to arma-file-formats/tests/test-data/rv-test-data-part-1.7z diff --git a/tests/test-data/rv-test-data-part-2.7z b/arma-file-formats/tests/test-data/rv-test-data-part-2.7z similarity index 100% rename from tests/test-data/rv-test-data-part-2.7z rename to arma-file-formats/tests/test-data/rv-test-data-part-2.7z diff --git a/tests/test-data/rv-test-data-part-3.7z b/arma-file-formats/tests/test-data/rv-test-data-part-3.7z similarity index 100% rename from tests/test-data/rv-test-data-part-3.7z rename to arma-file-formats/tests/test-data/rv-test-data-part-3.7z diff --git a/tests/tests.rs b/arma-file-formats/tests/tests.rs similarity index 100% rename from tests/tests.rs rename to arma-file-formats/tests/tests.rs