Skip to content

packing/nup: an update without an icon takes its base game's - #2823

Closed
UserDerezzed wants to merge 1 commit into
seedds:mainfrom
UserDerezzed:nup-update-icon
Closed

UserDerezzed wants to merge 1 commit into
seedds:mainfrom
UserDerezzed:nup-update-icon

Conversation

@UserDerezzed

@UserDerezzed UserDerezzed commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The Mac app of The Legend of Zelda: Ocarina of Time, packed from a NUP, has the system's blank application icon: there is no AppIcon.icns in the app, though the NUP carries the game's icon.

The NUP has the icon on its base game's record and none on the update's. pack_version saved the packed package's own records only, and the NSP script looks for icon.jpg in the packed version's folder, then in the folder the base game is extracted to alone. This profile builds from the update only, so no such folder is made and the base game's icon was never written.

pack_nup.control now gives an update without an icon its base game's: the icon record, else its localized icons, picked as the package's own are (icon_of). An update's own icon still wins. The NACP stays the package's own, since its display version and languages are that version's.

Reference entry: An app packed from a NUP's update has no icon.

Checked

  • test_nsp_nup.py test_update_without_an_icon_takes_its_base_games: fails without the change (no icon.jpg), and covers an update's own icon, the base game's localized icons, and no icon anywhere.
  • For the Ocarina of Time NUP the update's records now give the base record's 256x256 JPEG, byte for byte, and pack_app.py's make_icns makes an .icns of it.
  • Every Python test file of dm/tools/tests, dm/ios/tests and dm/gfx/tests, one by one as CI runs them: 217 files, 2,455 tests, no failure.
  • lint_python.py with the pinned ruff and pyright: 0 new findings.
  • The Mac app packed again after this pull request was opened, from a local branch that carries this commit on an older main (cherry-picked, with other open pull requests, so not this branch's tree): the update's extraction folder has the 38,073-byte icon.jpg, and the app has AppIcon.icns with the game's artwork where it had none. No red line, and the signature verifies. The commit message and the reference entry were written before that build and still say the app was not packed again.

Not checked

  • An IPA was not built.
  • No regress.py check was run. regress.py impact maps pack_nup.py to every game (its rule: games built from NUP containers), but the change reaches only icon.jpg in the extraction folder of a NUP update that has no icon of its own.

#2822, for the same NUP's app version, touches the neighbouring lines of packing.md's Launcher metadata section and of the game note; whichever lands second needs docs_symptoms.py run again.

@github-actions github-actions Bot added tools Tools and scripts (dm/tools, scripts) docs Documentation game: 0400486024DEC000 A game labels Nov 16, 2026
The Mac app of The Legend of Zelda: Ocarina of Time, packed from a NUP,
had the system's blank application icon: no AppIcon.icns in the app,
though the NUP carries the game's icon.

The NUP has the icon on its base game's record and none on the update's.
pack_version saved the packed package's own records only, and the NSP
script looks for icon.jpg in the packed version's folder, then in the
folder the base game is extracted to alone. This profile builds from the
update only, so no such folder is made and the icon was never written.

pack_nup.control now gives an update without an icon its base game's:
the icon record, else its localized icons, picked as the package's own
are (icon_of). The NACP stays the package's own, since its display
version and languages are that version's.

Checked: test_nsp_nup's new test (fails without the change: no
icon.jpg); for the Ocarina of Time NUP the update's records now give the
base record's 256x256 JPEG, and pack_app.py's make_icns makes an .icns
of it. Every Python test file as CI runs them, and lint_python.py with
the pinned tools. Not checked: the app was not packed again.
@gnavarro24

Copy link
Copy Markdown
Contributor

Hi! This branch is based on a main from before commit c70c242 ("ci: repair host and tool test failures on main"). Most of the failing checks here (Host unit tests, Tool tests, clang-tidy, Build check) come from that older base, not from this change.

To pick up the fix, merge the current main into this branch and push:

git fetch origin
git merge origin/main
git push

If the merge has conflicts, ask here if you want help with them.

seedds added a commit that referenced this pull request Nov 20, 2026
An update-only build can omit the base extraction folder, leaving the
launcher without an icon even when the NUP has one on the base record.
Use the base icon when the selected update supplies none, with the same
localized icon selection the packer already uses. Keep NACP selection
independent of icon selection.

Reproduced the missing icon on main and passed 56 targeted NUP, icon and
documentation tests with the fix. The PR author repacked the Ocarina of
Time v131072 Mac app on an older main with this fix and verified its
AppIcon.icns and signature. The local Pyright findings match clean main.

PR #2823

Co-authored-by: UserDerezzed <25561419+UserDerezzed@users.noreply.github.com>
@seedds

seedds commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks, @UserDerezzed, for finding the cause, adding a test, and repacking Ocarina of Time to confirm the fix.

Your fix is on main in 040c3ae with co-author credit. When a NUP update has no icon, the packer now uses the base game's icon, so the Mac app gets its artwork even when the build extracts only the update.

All 56 targeted tests passed on the landing revision. Your Mac repack confirmed the artwork and verified the app signature. A fresh Mac app and IPA build on the landing revision were outside these checks. Closing this PR because the fix is on main.

@seedds seedds closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400486024DEC000 A game tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants