feat(modpack): add self-contained full pack export/import for offline play - #46
Merged
Conversation
… play Export an instance as a Full Pack: version-isolated instance content plus game libraries/assets bundled in one zip with an xmcl-full-pack.json manifest. Import is pure extraction with zero downloads, so the instance launches offline. Adds scan_instance_files_for_full_export / import_full_pack commands, a Full export format in the export modal, and full-pack-aware import handling. Also ignores the .zcode/ plan directory and fills missing service message translations in fr/ja/zh-Hant.
After importing a full pack the instance list was read from the cached GlobalDataContext state, so the imported instance only appeared after a manual refresh or restart. Force a refresh via getInstanceList(true), matching the pattern used by other instance mutations (delete, edit dir).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libraries/) and assets (assets/) into a single zip, identified by anxmcl-full-pack.jsonmanifest.scan_instance_files_for_full_export,import_full_pack), aFullformat in the export modal, and full-pack-aware import handling (name is fixed by the pack, no download tasks, direct navigation to the instance list).exportModpack/scanInstanceFilesForExport/FileTreeSelector.emptyservice-message translations in fr/ja/zh-Hant so the locale consistency check passes.Pack layout
Notes
idto the target game directory.modpackType = "modrinth"in modpack meta info — out of scope for this PR.Test plan
cargo checknpx tsc --noEmitnpm run locale diff en