Repository navigation
packing/nup: an update without an icon takes its base game's - #2823
UserDerezzed wants to merge 1 commit into
Conversation
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.
9f9bbc1 to
aa2b8d2
Compare
|
Hi! This branch is based on a To pick up the fix, merge the current git fetch origin
git merge origin/main
git pushIf the merge has conflicts, ask here if you want help with them. |
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>
|
Thanks, @UserDerezzed, for finding the cause, adding a test, and repacking Ocarina of Time to confirm the fix. Your fix is on 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 |
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.icnsin 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_versionsaved the packed package's own records only, and the NSP script looks foricon.jpgin 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.controlnow 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.pytest_update_without_an_icon_takes_its_base_games: fails without the change (noicon.jpg), and covers an update's own icon, the base game's localized icons, and no icon anywhere.pack_app.py'smake_icnsmakes an.icnsof it.dm/tools/tests,dm/ios/testsanddm/gfx/tests, one by one as CI runs them: 217 files, 2,455 tests, no failure.lint_python.pywith the pinned ruff and pyright: 0 new findings.main(cherry-picked, with other open pull requests, so not this branch's tree): the update's extraction folder has the 38,073-byteicon.jpg, and the app hasAppIcon.icnswith 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
regress.py checkwas run.regress.py impactmapspack_nup.pyto every game (its rule: games built from NUP containers), but the change reaches onlyicon.jpgin 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 needsdocs_symptoms.pyrun again.