Repository navigation
Import Add-ons…: every add-on in a folder at once (Linux, Windows, macOS) - #139
Merged
Merged
Conversation
…and macOS A new menu item reads a folder with its subfolders and the ZIP archives in it (nested up to three deep), tells each .xpx and .xpt package by what it holds, refuses what cannot come in (damaged, empty, Expansion packages on Core Rules 2.0) and imports the same file found twice only once. The list before the import says what comes in and why the rest does not. Import backs up UserDbas and Chars beside the data folder, imports the packages from the oldest file to the newest, leaves out characters already in the list, copies the .bmp pictures to where the imported records look for them (or where a pictures.tsv places them) and writes a log. The logic is in cr_app::addons; the GNOME app shows the list and a progress bar, the Windows app and the Mac app a dialog and a sheet. Import in cr-store keeps the chosen items in a set, as a package holds tens of thousands of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NiPLVSzvK27vd8v2rbXNs7
The switch on the sheet in front had no case for it, which Swift refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NiPLVSzvK27vd8v2rbXNs7
This was referenced Oct 30, 2026
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.
Requested by Brahm · project thread
What it does
A new menu item, Import Add-ons… (main menu on Linux, More menu on Windows, File menu on the Mac), takes a folder and imports every add-on in it in one go:
.xpx/.xptby what it holds (Expansion or Core Rules 2.0, and which categories, for example "Expansion: Classes 1, Class Abilities 62").UserDbasandCharsbeside the data folder. Packages go in from the oldest file to the newest, so the newer one wins on a name clash. Characters already in the list are left out, so a second run does not duplicate them. The.bmppictures are copied to where the imported records look for them, or to the place apictures.tsvbeside them gives, and never over an existing file. A log is written.Code
cr-app/src/addons.rs: all the logic (scan, groups/notes/summary text, import, report, log), with tests. This adds thezipdependency (deflate only).cr-store:import_namedkeeps the chosen items in aHashSet. With aVecthe check was quadratic on a 36k-item package.AddonsSessionin the bridge, and anAddonsViewsheet (Addons.swift).IMPORT_ADDONSon every app. Translations are in all six languages, and the README has a paragraph on it.Tested
cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test --workspacepass.cargo clippy -p cr-win -p cr-app -p cr-mac-ffi --target x86_64-pc-windows-msvcalso passes (check only). The Swift code is not compiled here; the macOS CI job builds it..XPXand a damaged file): 2,706 items, 5 characters and 4 pictures came in. The duplicate and the damaged file were reported. Run withCORERULES_DIR=… CORERULES_ADDONS=… cargo test -p cr-app addons.Comunidade.xpxin a ZIP with its 668 pictures and apictures.tsv: 36,525 items, 48 characters and 537 pictures. A second run brings no characters.Generated by Claude Code