diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dade3b4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,136 @@ +# CI that: +# +# * checks for a Git Tag that looks like a release ("v1.2.0") +# * creates a Github Release™️ +# * builds binaries/packages with cargo-dist +# * uploads those packages to the Github Release™️ +# +# Note that the Github Release™️ will be created before the packages, +# so there will be a few minutes where the release has no packages +# and then they will slowly trickle in, possibly failing. To make +# this more pleasant we mark the release as a "draft" until all +# artifacts have been successfully uploaded. This allows you to +# choose what to do with partial successes and avoids spamming +# anyone with notifications before the release is actually ready. +name: Release + +permissions: + contents: write + +# This task will run whenever you push a git tag that looks like +# a version number. We just look for `v` followed by at least one number +# and then whatever. so `v1`, `v1.0.0`, and `v1.0.0-prerelease` all work. +# +# If there's a prerelease-style suffix to the version then the Github Release™️ +# will be marked as a prerelease (handled by taiki-e/create-gh-release-action). +# +# Note that when generating links to uploaded artifacts, cargo-dist will currently +# assume that your git tag is always v{VERSION} where VERSION is the version in +# the published package's Cargo.toml (this is the default behaviour of cargo-release). +# In the future this may be made more robust/configurable. +on: + push: + tags: + - v[0-9]+.* + +env: + ALL_CARGO_DIST_TARGET_ARGS: --target=x86_64-unknown-linux-gnu --target=x86_64-apple-darwin --target=x86_64-pc-windows-msvc + ALL_CARGO_DIST_INSTALLER_ARGS: + +jobs: + # Create the Github Release™️ so the packages have something to be uploaded to + create-release: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.create-gh-release.outputs.computed-prefix }}${{ steps.create-gh-release.outputs.version }} + steps: + - uses: actions/checkout@v3 + - id: create-gh-release + uses: taiki-e/create-gh-release-action@v1 + with: + draft: true + # (required) GitHub token for creating GitHub Releases. + token: ${{ secrets.GITHUB_TOKEN }} + + + # Build and packages all the things + upload-artifacts: + needs: create-release + strategy: + matrix: + # For these target platforms + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-20.04 + install-dist: curl --proto '=https' --tlsv1.2 -L -sSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.2/installer.sh | sh + - target: x86_64-apple-darwin + os: macos-11 + install-dist: curl --proto '=https' --tlsv1.2 -L -sSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.2/installer.sh | sh + - target: x86_64-pc-windows-msvc + os: windows-2019 + install-dist: irm 'https://github.com/axodotdev/cargo-dist/releases/download/v0.0.2/installer.ps1' | iex + runs-on: ${{ matrix.os }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + - name: Install Rust + run: rustup update stable && rustup default stable + - name: Install cargo-dist + run: ${{ matrix.install-dist }} + - name: Run cargo-dist + # This logic is a bit janky because it's trying to be a polyglot between + # powershell and bash since this will run on windows, macos, and linux! + # The two platforms don't agree on how to talk about env vars but they + # do agree on 'cat' and '$()' so we use that to marshal values between commmands. + run: | + # Actually do builds and make zips and whatnot + cargo dist --target=${{ matrix.target }} --output-format=json > dist-manifest.json + echo "dist ran successfully" + cat dist-manifest.json + # Parse out what we just built and upload it to the Github Release™️ + cat dist-manifest.json | jq --raw-output ".releases[].artifacts[].path" > uploads.txt + echo "uploading..." + cat uploads.txt + gh release upload ${{ needs.create-release.outputs.tag }} $(cat uploads.txt) + echo "uploaded!" + + # Compute and upload the manifest for everything + upload-manifest: + needs: create-release + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + - name: Install Rust + run: rustup update stable && rustup default stable + - name: Install cargo-dist + run: curl --proto '=https' --tlsv1.2 -L -sSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.2/installer.sh | sh + - name: Run cargo-dist manifest + run: | + # Generate a manifest describing everything + cargo dist manifest --no-local-paths --output-format=json $ALL_CARGO_DIST_TARGET_ARGS $ALL_CARGO_DIST_INSTALLER_ARGS > dist-manifest.json + echo "dist manifest ran successfully" + cat dist-manifest.json + # Upload the manifest to the Github Release™️ + gh release upload ${{ needs.create-release.outputs.tag }} dist-manifest.json + echo "uploaded manifest!" + # Edit the Github Release™️ title/body to match what cargo-dist thinks it should be + CHANGELOG_TITLE=$(cat dist-manifest.json | jq --raw-output ".releases[].changelog_title") + cat dist-manifest.json | jq --raw-output ".releases[].changelog_body" > new_dist_changelog.md + gh release edit ${{ needs.create-release.outputs.tag }} --title="$CHANGELOG_TITLE" --notes-file=new_dist_changelog.md + echo "updated release notes!" + + # Mark the Github Release™️ as a non-draft now that everything has succeeded! + publish-release: + needs: [create-release, upload-artifacts, upload-manifest] + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + - name: mark release as non-draft + run: | + gh release edit ${{ needs.create-release.outputs.tag }} --draft=false + diff --git a/.gitignore b/.gitignore index 1946f25..dda6767 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *target/ -/Cargo.lock -/tests/config.sh +*.lock +/repak/tests/config.sh diff --git a/Cargo.toml b/Cargo.toml index aeb54f1..0e24af6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,19 @@ -[package] -name = "unpak" -authors = ["spuds"] -repository = "https://github.com/bananaturtlesandwich/unpak" -description = "a no-nonsense unreal pak parsing crate" +[workspace] +members = ["repak", "repak_cli"] + +[workspace.package] +repository = "https://github.com/trumank/repak" +authors = ["spuds", "trumank"] license = "MIT OR Apache-2.0" -keywords = ["modding", "parsing", "compression"] -categories = ["filesystem", "parser-implementations"] -version = "0.2.0" +version = "0.1.0" edition = "2021" -[dependencies] -byteorder = "1.4" -strum = { version = "0.24", features = ["derive"] } -aes = "0.8" -flate2 = "1.0" -thiserror = "1.0" -sha1 = "0.10.5" - -[dev-dependencies] +[workspace.dependencies] base64 = "0.21.0" -paste = "1.0.11" +aes = "0.8.2" + +# generated by 'cargo dist init' +[profile.dist] +inherits = "release" +debug = true +split-debuginfo = "packed" diff --git a/README.md b/README.md index d5a8e3e..e398a01 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,24 @@ -# unpak -## a no-nonsense unreal pak parser -- doesn't force files to be extracted -- only converts entries to bytes when requested -- supports up to frozen index (4.25) paks (planned support for higher) -- supports compressed and encrypted paks -- supports iteration over entries -## [click for example code](https://github.com/bananaturtlesandwich/unpak/blob/master/examples/unpak.rs) -## the problem -looking at the libraries for pak reading, they were never not quite right for what i wanted to do: -- [rust-u4pak](https://github.com/panzi/rust-u4pak) - excellent support but very limited api -- [ue4pak](https://github.com/Speedy37/ue4pak-rs) - excellent api but no support for extraction -- [unrealpak](https://github.com/AstroTechies/unrealmodding/tree/main/unreal_pak) - excellent api but only supports version 8 -- [rust-unreal-unpak](https://crates.io/crates/rust-unreal-unpak) - is async only supports version 10 +# repak -so i just though *fuck it i'll do it myself* and did it myself +fork of https://github.com/bananaturtlesandwich/unpak -## references -although the api of [rust-u4pak](https://github.com/panzi/rust-u4pak) wasn't very friendly, the [`README`](https://github.com/panzi/rust-u4pak#readme) went into beautiful detail into the intricacies of the file format and when the readme had incorrect info *cough cough* `encryption uuid` *cough cough* the source code also had the answers as long as you looked hard enough \ No newline at end of file +## compatibility + +| UE Version | Version | Version Feature | Read | Write | +|------------|---------|-----------------------|--------------------|--------------------| +| | 1 | Initial | :grey_question: | :x: | +| 4.0-4.2 | 2 | NoTimestamps | :heavy_check_mark: | :x: | +| 4.3-4.15 | 3 | CompressionEncryption | :heavy_check_mark: | :x: | +| 4.16-4.19 | 4 | IndexEncryption | :heavy_check_mark: | :x: | +| 4.20 | 5 | RelativeChunkOffsets | :heavy_check_mark: | :x: | +| | 6 | DeleteRecords | :grey_question: | :x: | +| 4.21 | 7 | EncryptionKeyGuid | :heavy_check_mark: | :x: | +| 4.22 | 8A | FNameBasedCompression | :heavy_check_mark: | :x: | +| 4.23-4.24 | 8B | FNameBasedCompression | :heavy_check_mark: | :heavy_check_mark: | +| 4.25 | 9 | FrozenIndex | :heavy_check_mark: | :x: | +| | 10 | PathHashIndex | :grey_question: | :x: | +| 4.26-4.27 | 11 | Fnv64BugFix | :heavy_check_mark: | :x: | + +Supports reading encrypted (both index and/or data) and compressed paks. +Writing is still a work in progress, but is functional enough for most recent +Unreal Engine versions. diff --git a/repak/Cargo.toml b/repak/Cargo.toml new file mode 100644 index 0000000..8e72c43 --- /dev/null +++ b/repak/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "repak" +repository.workspace = true +authors.workspace = true +license.workspace = true +version.workspace = true +edition.workspace = true + +[dependencies] +byteorder = "1.4" +strum = { version = "0.24", features = ["derive"] } +aes = "0.8" +flate2 = "1.0" +thiserror = "1.0" +sha1 = "0.10.5" + +[dev-dependencies] +base64 = { workspace = true } +paste = "1.0.11" diff --git a/src/entry.rs b/repak/src/entry.rs similarity index 100% rename from src/entry.rs rename to repak/src/entry.rs diff --git a/src/error.rs b/repak/src/error.rs similarity index 100% rename from src/error.rs rename to repak/src/error.rs diff --git a/src/ext.rs b/repak/src/ext.rs similarity index 100% rename from src/ext.rs rename to repak/src/ext.rs diff --git a/src/footer.rs b/repak/src/footer.rs similarity index 100% rename from src/footer.rs rename to repak/src/footer.rs diff --git a/src/lib.rs b/repak/src/lib.rs similarity index 100% rename from src/lib.rs rename to repak/src/lib.rs diff --git a/src/pak.rs b/repak/src/pak.rs similarity index 100% rename from src/pak.rs rename to repak/src/pak.rs diff --git a/tests/config.example.sh b/repak/tests/config.example.sh similarity index 100% rename from tests/config.example.sh rename to repak/tests/config.example.sh diff --git a/repak/tests/config.sh b/repak/tests/config.sh new file mode 100644 index 0000000..1ee0e25 --- /dev/null +++ b/repak/tests/config.sh @@ -0,0 +1,6 @@ +UNREAL_4_20=/home/truman/scrapbox/ue/4.20/Engine/Binaries/Linux/UnrealPak +UNREAL_4_21=/home/truman/scrapbox/ue/4.21/Engine/Binaries/Linux/UnrealPak +UNREAL_4_22=/home/truman/scrapbox/ue/4.22/Engine/Binaries/Linux/UnrealPak +UNREAL_4_23=/home/truman/scrapbox/ue/4.23/Engine/Binaries/Linux/UnrealPak +UNREAL_4_25=/home/truman/scrapbox/ue/4.25/Engine/Binaries/Linux/UnrealPak +UNREAL_4_27=/home/truman/scrapbox/ue/4.27/Engine/Binaries/Linux/UnrealPak diff --git a/tests/crypto.json b/repak/tests/crypto.json similarity index 100% rename from tests/crypto.json rename to repak/tests/crypto.json diff --git a/tests/generate.sh b/repak/tests/generate.sh similarity index 100% rename from tests/generate.sh rename to repak/tests/generate.sh diff --git a/tests/pack/root/directory/nested.txt b/repak/tests/pack/root/directory/nested.txt similarity index 100% rename from tests/pack/root/directory/nested.txt rename to repak/tests/pack/root/directory/nested.txt diff --git a/tests/pack/root/test.png b/repak/tests/pack/root/test.png similarity index 100% rename from tests/pack/root/test.png rename to repak/tests/pack/root/test.png diff --git a/tests/pack/root/test.txt b/repak/tests/pack/root/test.txt similarity index 100% rename from tests/pack/root/test.txt rename to repak/tests/pack/root/test.txt diff --git a/tests/pack/root/zeros.bin b/repak/tests/pack/root/zeros.bin similarity index 100% rename from tests/pack/root/zeros.bin rename to repak/tests/pack/root/zeros.bin diff --git a/tests/packs/pack_v11.pak b/repak/tests/packs/pack_v11.pak similarity index 100% rename from tests/packs/pack_v11.pak rename to repak/tests/packs/pack_v11.pak diff --git a/tests/packs/pack_v11_compress.pak b/repak/tests/packs/pack_v11_compress.pak similarity index 100% rename from tests/packs/pack_v11_compress.pak rename to repak/tests/packs/pack_v11_compress.pak diff --git a/tests/packs/pack_v11_compress_encrypt.pak b/repak/tests/packs/pack_v11_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v11_compress_encrypt.pak rename to repak/tests/packs/pack_v11_compress_encrypt.pak diff --git a/tests/packs/pack_v11_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v11_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v11_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v11_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v11_compress_encryptindex.pak b/repak/tests/packs/pack_v11_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v11_compress_encryptindex.pak rename to repak/tests/packs/pack_v11_compress_encryptindex.pak diff --git a/tests/packs/pack_v11_encrypt.pak b/repak/tests/packs/pack_v11_encrypt.pak similarity index 100% rename from tests/packs/pack_v11_encrypt.pak rename to repak/tests/packs/pack_v11_encrypt.pak diff --git a/tests/packs/pack_v11_encrypt_encryptindex.pak b/repak/tests/packs/pack_v11_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v11_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v11_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v11_encryptindex.pak b/repak/tests/packs/pack_v11_encryptindex.pak similarity index 100% rename from tests/packs/pack_v11_encryptindex.pak rename to repak/tests/packs/pack_v11_encryptindex.pak diff --git a/tests/packs/pack_v5.pak b/repak/tests/packs/pack_v5.pak similarity index 100% rename from tests/packs/pack_v5.pak rename to repak/tests/packs/pack_v5.pak diff --git a/tests/packs/pack_v5_compress.pak b/repak/tests/packs/pack_v5_compress.pak similarity index 100% rename from tests/packs/pack_v5_compress.pak rename to repak/tests/packs/pack_v5_compress.pak diff --git a/tests/packs/pack_v5_compress_encrypt.pak b/repak/tests/packs/pack_v5_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v5_compress_encrypt.pak rename to repak/tests/packs/pack_v5_compress_encrypt.pak diff --git a/tests/packs/pack_v5_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v5_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v5_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v5_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v5_compress_encryptindex.pak b/repak/tests/packs/pack_v5_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v5_compress_encryptindex.pak rename to repak/tests/packs/pack_v5_compress_encryptindex.pak diff --git a/tests/packs/pack_v5_encrypt.pak b/repak/tests/packs/pack_v5_encrypt.pak similarity index 100% rename from tests/packs/pack_v5_encrypt.pak rename to repak/tests/packs/pack_v5_encrypt.pak diff --git a/tests/packs/pack_v5_encrypt_encryptindex.pak b/repak/tests/packs/pack_v5_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v5_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v5_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v5_encryptindex.pak b/repak/tests/packs/pack_v5_encryptindex.pak similarity index 100% rename from tests/packs/pack_v5_encryptindex.pak rename to repak/tests/packs/pack_v5_encryptindex.pak diff --git a/tests/packs/pack_v7.pak b/repak/tests/packs/pack_v7.pak similarity index 100% rename from tests/packs/pack_v7.pak rename to repak/tests/packs/pack_v7.pak diff --git a/tests/packs/pack_v7_compress.pak b/repak/tests/packs/pack_v7_compress.pak similarity index 100% rename from tests/packs/pack_v7_compress.pak rename to repak/tests/packs/pack_v7_compress.pak diff --git a/tests/packs/pack_v7_compress_encrypt.pak b/repak/tests/packs/pack_v7_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v7_compress_encrypt.pak rename to repak/tests/packs/pack_v7_compress_encrypt.pak diff --git a/tests/packs/pack_v7_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v7_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v7_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v7_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v7_compress_encryptindex.pak b/repak/tests/packs/pack_v7_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v7_compress_encryptindex.pak rename to repak/tests/packs/pack_v7_compress_encryptindex.pak diff --git a/tests/packs/pack_v7_encrypt.pak b/repak/tests/packs/pack_v7_encrypt.pak similarity index 100% rename from tests/packs/pack_v7_encrypt.pak rename to repak/tests/packs/pack_v7_encrypt.pak diff --git a/tests/packs/pack_v7_encrypt_encryptindex.pak b/repak/tests/packs/pack_v7_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v7_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v7_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v7_encryptindex.pak b/repak/tests/packs/pack_v7_encryptindex.pak similarity index 100% rename from tests/packs/pack_v7_encryptindex.pak rename to repak/tests/packs/pack_v7_encryptindex.pak diff --git a/tests/packs/pack_v8a.pak b/repak/tests/packs/pack_v8a.pak similarity index 100% rename from tests/packs/pack_v8a.pak rename to repak/tests/packs/pack_v8a.pak diff --git a/tests/packs/pack_v8a_compress.pak b/repak/tests/packs/pack_v8a_compress.pak similarity index 100% rename from tests/packs/pack_v8a_compress.pak rename to repak/tests/packs/pack_v8a_compress.pak diff --git a/tests/packs/pack_v8a_compress_encrypt.pak b/repak/tests/packs/pack_v8a_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v8a_compress_encrypt.pak rename to repak/tests/packs/pack_v8a_compress_encrypt.pak diff --git a/tests/packs/pack_v8a_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v8a_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8a_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v8a_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v8a_compress_encryptindex.pak b/repak/tests/packs/pack_v8a_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8a_compress_encryptindex.pak rename to repak/tests/packs/pack_v8a_compress_encryptindex.pak diff --git a/tests/packs/pack_v8a_encrypt.pak b/repak/tests/packs/pack_v8a_encrypt.pak similarity index 100% rename from tests/packs/pack_v8a_encrypt.pak rename to repak/tests/packs/pack_v8a_encrypt.pak diff --git a/tests/packs/pack_v8a_encrypt_encryptindex.pak b/repak/tests/packs/pack_v8a_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8a_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v8a_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v8a_encryptindex.pak b/repak/tests/packs/pack_v8a_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8a_encryptindex.pak rename to repak/tests/packs/pack_v8a_encryptindex.pak diff --git a/tests/packs/pack_v8b.pak b/repak/tests/packs/pack_v8b.pak similarity index 100% rename from tests/packs/pack_v8b.pak rename to repak/tests/packs/pack_v8b.pak diff --git a/tests/packs/pack_v8b_compress.pak b/repak/tests/packs/pack_v8b_compress.pak similarity index 100% rename from tests/packs/pack_v8b_compress.pak rename to repak/tests/packs/pack_v8b_compress.pak diff --git a/tests/packs/pack_v8b_compress_encrypt.pak b/repak/tests/packs/pack_v8b_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v8b_compress_encrypt.pak rename to repak/tests/packs/pack_v8b_compress_encrypt.pak diff --git a/tests/packs/pack_v8b_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v8b_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8b_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v8b_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v8b_compress_encryptindex.pak b/repak/tests/packs/pack_v8b_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8b_compress_encryptindex.pak rename to repak/tests/packs/pack_v8b_compress_encryptindex.pak diff --git a/tests/packs/pack_v8b_encrypt.pak b/repak/tests/packs/pack_v8b_encrypt.pak similarity index 100% rename from tests/packs/pack_v8b_encrypt.pak rename to repak/tests/packs/pack_v8b_encrypt.pak diff --git a/tests/packs/pack_v8b_encrypt_encryptindex.pak b/repak/tests/packs/pack_v8b_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8b_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v8b_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v8b_encryptindex.pak b/repak/tests/packs/pack_v8b_encryptindex.pak similarity index 100% rename from tests/packs/pack_v8b_encryptindex.pak rename to repak/tests/packs/pack_v8b_encryptindex.pak diff --git a/tests/packs/pack_v9.pak b/repak/tests/packs/pack_v9.pak similarity index 100% rename from tests/packs/pack_v9.pak rename to repak/tests/packs/pack_v9.pak diff --git a/tests/packs/pack_v9_compress.pak b/repak/tests/packs/pack_v9_compress.pak similarity index 100% rename from tests/packs/pack_v9_compress.pak rename to repak/tests/packs/pack_v9_compress.pak diff --git a/tests/packs/pack_v9_compress_encrypt.pak b/repak/tests/packs/pack_v9_compress_encrypt.pak similarity index 100% rename from tests/packs/pack_v9_compress_encrypt.pak rename to repak/tests/packs/pack_v9_compress_encrypt.pak diff --git a/tests/packs/pack_v9_compress_encrypt_encryptindex.pak b/repak/tests/packs/pack_v9_compress_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v9_compress_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v9_compress_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v9_compress_encryptindex.pak b/repak/tests/packs/pack_v9_compress_encryptindex.pak similarity index 100% rename from tests/packs/pack_v9_compress_encryptindex.pak rename to repak/tests/packs/pack_v9_compress_encryptindex.pak diff --git a/tests/packs/pack_v9_encrypt.pak b/repak/tests/packs/pack_v9_encrypt.pak similarity index 100% rename from tests/packs/pack_v9_encrypt.pak rename to repak/tests/packs/pack_v9_encrypt.pak diff --git a/tests/packs/pack_v9_encrypt_encryptindex.pak b/repak/tests/packs/pack_v9_encrypt_encryptindex.pak similarity index 100% rename from tests/packs/pack_v9_encrypt_encryptindex.pak rename to repak/tests/packs/pack_v9_encrypt_encryptindex.pak diff --git a/tests/packs/pack_v9_encryptindex.pak b/repak/tests/packs/pack_v9_encryptindex.pak similarity index 100% rename from tests/packs/pack_v9_encryptindex.pak rename to repak/tests/packs/pack_v9_encryptindex.pak diff --git a/tests/test.rs b/repak/tests/test.rs similarity index 94% rename from tests/test.rs rename to repak/tests/test.rs index cf623da..8e19431 100644 --- a/tests/test.rs +++ b/repak/tests/test.rs @@ -111,16 +111,16 @@ macro_rules! encryptindex { let key = general_purpose::STANDARD .decode(AES_KEY) .as_ref() - .map_err(|_| unpak::Error::Base64) + .map_err(|_| repak::Error::Base64) .and_then(|bytes| { - aes::Aes256Dec::new_from_slice(bytes).map_err(|_| unpak::Error::Aes) + aes::Aes256Dec::new_from_slice(bytes).map_err(|_| repak::Error::Aes) }).unwrap(); let mut inner_reader = std::io::Cursor::new(include_bytes!(concat!("packs/pack_", $version, $compress, $encrypt, $encryptindex, ".pak"))); let len = inner_reader.seek(SeekFrom::End(0)).unwrap(); - let mut pak = unpak::PakReader::new_any( + let mut pak = repak::PakReader::new_any( ReadCounter::new_size(inner_reader, len as usize), Some(key), ).unwrap(); @@ -158,12 +158,12 @@ macro_rules! encryptindex { matrix_test!( ( - "v5" unpak::Version::V5, - "v7" unpak::Version::V7, - "v8a" unpak::Version::V8A, - "v8b" unpak::Version::V8B, - "v9" unpak::Version::V9, - "v11" unpak::Version::V11, + "v5" repak::Version::V5, + "v7" repak::Version::V7, + "v8a" repak::Version::V8A, + "v8b" repak::Version::V8B, + "v9" repak::Version::V9, + "v11" repak::Version::V11, ), ("", "_compress"), ("", "_encrypt"), diff --git a/repak_cli/Cargo.toml b/repak_cli/Cargo.toml new file mode 100644 index 0000000..621e611 --- /dev/null +++ b/repak_cli/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "repak_cli" +repository.workspace = true +authors.workspace = true +license.workspace = true +version.workspace = true +edition.workspace = true + +[[bin]] +name = "repak" +path = "src/main.rs" + +[dependencies] +aes = { workspace = true } +base64 = { workspace = true } +clap = { version = "4.1.4", features = ["derive"] } +path-clean = "0.1.0" +repak = { version = "0.1.0", path = "../repak" } diff --git a/unpak_cli/src/main.rs b/repak_cli/src/main.rs similarity index 86% rename from unpak_cli/src/main.rs rename to repak_cli/src/main.rs index 7404f8e..a917091 100644 --- a/unpak_cli/src/main.rs +++ b/repak_cli/src/main.rs @@ -88,7 +88,7 @@ struct Args { action: Action, } -fn main() -> Result<(), unpak::Error> { +fn main() -> Result<(), repak::Error> { let args = Args::parse(); match args.action { @@ -99,18 +99,18 @@ fn main() -> Result<(), unpak::Error> { } } -fn aes_key(key: &str) -> Result { +fn aes_key(key: &str) -> Result { use aes::cipher::KeyInit; use base64::{engine::general_purpose, Engine as _}; general_purpose::STANDARD .decode(key) .as_ref() - .map_err(|_| unpak::Error::Base64) - .and_then(|bytes| aes::Aes256Dec::new_from_slice(bytes).map_err(|_| unpak::Error::Aes)) + .map_err(|_| repak::Error::Base64) + .and_then(|bytes| aes::Aes256Dec::new_from_slice(bytes).map_err(|_| repak::Error::Aes)) } -fn info(args: ActionInfo) -> Result<(), unpak::Error> { - let pak = unpak::PakReader::new_any( +fn info(args: ActionInfo) -> Result<(), repak::Error> { + let pak = repak::PakReader::new_any( BufReader::new(File::open(&args.input)?), args.aes_key.map(|k| aes_key(k.as_str())).transpose()?, )?; @@ -121,8 +121,8 @@ fn info(args: ActionInfo) -> Result<(), unpak::Error> { Ok(()) } -fn list(args: ActionInfo) -> Result<(), unpak::Error> { - let pak = unpak::PakReader::new_any( +fn list(args: ActionInfo) -> Result<(), repak::Error> { + let pak = repak::PakReader::new_any( BufReader::new(File::open(&args.input)?), args.aes_key.map(|k| aes_key(k.as_str())).transpose()?, )?; @@ -132,8 +132,8 @@ fn list(args: ActionInfo) -> Result<(), unpak::Error> { Ok(()) } -fn unpack(args: ActionUnpack) -> Result<(), unpak::Error> { - let mut pak = unpak::PakReader::new_any( +fn unpack(args: ActionUnpack) -> Result<(), repak::Error> { + let mut pak = repak::PakReader::new_any( BufReader::new(File::open(&args.input)?), args.aes_key.map(|k| aes_key(k.as_str())).transpose()?, )?; @@ -147,7 +147,7 @@ fn unpack(args: ActionUnpack) -> Result<(), unpak::Error> { Err(e) => Err(e), }?; if output.read_dir()?.next().is_some() { - return Err(unpak::Error::Other("output directory not empty")); + return Err(repak::Error::Other("output directory not empty")); } let mount_point = PathBuf::from(pak.mount_point()); let prefix = Path::new(&args.strip_prefix); @@ -159,10 +159,10 @@ fn unpack(args: ActionUnpack) -> Result<(), unpak::Error> { mount_point .join(&file) .strip_prefix(prefix) - .map_err(|_| unpak::Error::Other("prefix does not match"))?, + .map_err(|_| repak::Error::Other("prefix does not match"))?, ); if !file_path.clean().starts_with(&output) { - return Err(unpak::Error::Other( + return Err(repak::Error::Other( "tried to write file outside of output directory", )); } @@ -172,7 +172,7 @@ fn unpack(args: ActionUnpack) -> Result<(), unpak::Error> { Ok(()) } -fn pack(args: ActionPack) -> Result<(), unpak::Error> { +fn pack(args: ActionPack) -> Result<(), repak::Error> { let output = args .output .map(PathBuf::from) @@ -192,16 +192,16 @@ fn pack(args: ActionPack) -> Result<(), unpak::Error> { } let input_path = Path::new(&args.input); if !input_path.is_dir() { - return Err(unpak::Error::Other("input is not a directory")); + return Err(repak::Error::Other("input is not a directory")); } let mut paths = vec![]; collect_files(&mut paths, input_path)?; paths.sort(); - let mut pak = unpak::PakWriter::new( + let mut pak = repak::PakWriter::new( BufWriter::new(File::create(output)?), None, - unpak::Version::V8B, + repak::Version::V8B, args.mount_point, ); diff --git a/unpak_cli/Cargo.lock b/unpak_cli/Cargo.lock deleted file mode 100644 index ef6bb95..0000000 --- a/unpak_cli/Cargo.lock +++ /dev/null @@ -1,540 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "base64" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" -dependencies = [ - "generic-array", -] - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cipher" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "4.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" -dependencies = [ - "bitflags", - "clap_derive", - "clap_lex", - "is-terminal", - "once_cell", - "strsim", - "termcolor", -] - -[[package]] -name = "clap_derive" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "flate2" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "generic-array" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "is-terminal" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" -dependencies = [ - "hermit-abi", - "io-lifetimes", - "rustix", - "windows-sys", -] - -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - -[[package]] -name = "once_cell" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" - -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - -[[package]] -name = "path-clean" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustix" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - -[[package]] -name = "syn" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" - -[[package]] -name = "unpak" -version = "0.2.0" -dependencies = [ - "aes", - "byteorder", - "flate2", - "sha1", - "strum", - "thiserror", -] - -[[package]] -name = "unpak_cli" -version = "0.1.0" -dependencies = [ - "aes", - "base64", - "clap", - "path-clean", - "unpak", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" diff --git a/unpak_cli/Cargo.toml b/unpak_cli/Cargo.toml deleted file mode 100644 index 1e8e754..0000000 --- a/unpak_cli/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "unpak_cli" -version = "0.1.0" -edition = "2021" - -[[bin]] -name = "unpak" -path = "src/main.rs" - -[dependencies] -aes = "0.8" -base64 = "0.21.0" -clap = { version = "4.1.4", features = ["derive"] } -path-clean = "0.1.0" -unpak = { version = "0.2.0", path = ".." }