aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJonas <104419015+jojo-chaechae@users.noreply.github.com>2026-11-02 13:39:49 +0600
committerGitHub <noreply@github.com>2026-11-02 08:39:49 +0100
commit926e7ac6af102956b08cc053d81527ec3be855a2 (patch)
tree07795397a6b6ca4cd44910cdee99baa79d5ad2da /CMakeLists.txt
parente38b738b84eb671b7567a37b4932f11a58843dad (diff)
file_sys: add a deterministic NUP packer, Convert to NUP in Qt and eden-cli --pack-nup (#271)
* file_sys: add a NUP packer for loose dumps Packs a loose dump (exefs/romfs, base/, updates/<version>/ and dlc/<titleid>/<n>/) into a NUP v1 container with the aligned record layout. Every package is kept, files are deduplicated by SHA-256 and compressed with zstd unless that does not shrink them, and files over 256 MiB are stored raw. Output is byte-identical on every platform: compression is single-threaded with every frame parameter set explicitly, and zstd is always bundled so all builds use the same version. A low-storage mode deletes each source file once its extent is synced and journaled, and an interrupted run resumes from the journal. Assisted-by: Claude Opus 5.5 (wrote the packer, its EdenPack-free dump detection, the aligned record layout and the deterministic zstd setup; ran the Raiders and Donkey Kong Bananza packs and boot checks) * tests: cover the NUP packer Round-trips a dump through NupContainer, checks standalone updates, a bare exefs/romfs dump, low-storage resume and overwrite rejection, and pins the hash of a packed dump so changes to the output are deliberate. Assisted-by: Claude Opus 5.5 (wrote the tests, including the pinned output hash) * qt: add Convert to NUP to the game list Shown for loose dumps. Asks for confirmation with the estimated space, offers low-storage mode, runs in the background with progress and cancel, and resumes an interrupted low-storage conversion. Assisted-by: Claude Opus 5.5 (wrote the Convert to NUP action and its progress and resume handling) * cli: add --pack-nup <dump> [out.nup] Assisted-by: Claude Opus 5.5 (wrote the --pack-nup option)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba44aa9d47..04d0f17d74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -463,6 +463,9 @@ if (lz4_ADDED)
endif()
# zstd
+# Always bundled: NUP archives are only byte-identical across platforms when every build
+# compresses with the same zstd version.
+set(zstd_FORCE_BUNDLED ON)
AddJsonPackage(zstd)
if (zstd_ADDED)