Skip to content

The shell's framework mirror is the primary copy, and the installer makes it - #406

Merged
v0lumehi merged 1 commit into
mainfrom
fix/shell-mirror-primary
Nov 1, 2026
Merged

v0lumehi merged 1 commit into
mainfrom
fix/shell-mirror-primary

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@LNPANDY, this implements the points from my review on #399: #399 (comment)

I propose it without waiting for your reply, so it is ready for 0.8.0. #399 is merged, this is the follow-up.

Fix or feature

  • Fix

What changed

  • The mirror is an APFS clone, not a hard link. mirrorFramework removes the old mirror and calls FileManager.copyItem. It costs no space on APFS, and later writes to the build folder do not reach it. On another volume it is a real copy. The linkItem branch is gone.
  • The mirror is the primary copy. shell.json points at NX2Apple-shell/frameworks/ for every game that has a mirror. dropMissing checks one path. The second loop that rewrote paths is gone.
  • The installer makes the mirror. ShellInstaller mirrors every game whose framework is in its build folder, before dropMissing. A game built before The shell folder caches every game's framework, and Settings names it (#398) #399 gets a mirror at its next install. The build callback in ContentView no longer mirrors.
  • A failed mirror is written to the install log, and the game keeps its build folder path. A half copy is removed.
  • BuildModel.shellRoot gives the shell folder to the cache row and to installShell. The first call of resolveRoot can no longer save a different root than the install uses.
  • The semicolons in shellCache.note are now full stops in English, Swedish and French. The Chinese text had a full-width one, which I changed too. frontend-qt/nspb_qt/localization.py is regenerated with gen_localization.py, so it matches. No other mirror text had a semicolon.

Checked

  • swift test --filter "ShellMirrorTests|ShellInstallTests" passes (39 tests). The new tests cover the clone (a write to the source does not reach the mirror, another inode), the mirror paths in shell.json, the installer mirroring a build from before The shell folder caches every game's framework, and Settings names it (#398) #399, a game that plays from its mirror when its build folder is gone, and a failed mirror that keeps the build folder path.
  • swift test in frontend/ passes, run without --parallel. The localization tests pass.
  • python3 -m unittest discover -s frontend-qt/tests has the same 19 errors as main in a checkout without engine/ (the tests that read the engine). The localization tests there pass.
  • Not run on a device.

Screenshots

None, no visible change beyond the wording of the note in Settings > Build tools > Cache files. The row sits below the first screen of the Settings capture, so I did not attach one. The English text now reads: "The shell's mirrored frameworks, its library file (shell.json) and the banner cache. Deleting it means every game's framework must come from its build folder again at the next install. A game whose build folder is also gone must be rebuilt."

Scope

  • No engine file (dm/, scripts/, docs/, ref/) is added to the repository
  • No keys, game files or data extracted from a game in the change

…akes it

The mirror in NX2Apple-shell/frameworks is now a clone made with copyItem. It costs no space on APFS. Later writes to the build folder do not reach it. On another volume it is a real copy.

shell.json always points at the mirror for a game that has one. dropMissing checks one path. The second loop that rewrote paths is gone.

The installer mirrors every game whose framework it finds in its build folder, before dropMissing. A game built before the mirror existed gets one too. The build callback no longer mirrors.

A failed mirror is logged in the install log and the game keeps its build folder path.

One helper, shellRoot, gives the shell folder to the cache row and to installShell. The first call of resolveRoot can no longer save a different root than the install uses.

The semicolons in the English, Swedish, French and Chinese texts of shellCache.note are now full stops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

launcher The NX2Apple launcher app windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant