Repository navigation
packing/nup: take the app version from the build row, else the label - #2822
UserDerezzed wants to merge 1 commit into
Conversation
The Mac app of The Legend of Zelda: Ocarina of Time 1.1.1, packed from a NUP, said Version 1.0 in Finder (CFBundleShortVersionString 1.0). The app version came from control.nacp alone: the packed version's, else the base game's. This NUP has no NACP in either package, so the script passed no version and pack_app.py wrote its default. A dump has no control data either. app_version_of now takes the control data first, then the display version the profile's build row registers for the packed version, then the NUP's display version record (pack_nup.display_label: the package's, else its base game's, or the metadata record's when the NUP has no base game). Each is cut to a bundle version (nacp.bundle_version, the cut nacp.version already made), so a row or a label that is no version (v131072, ?) gives none and the app says 1.0 as before. The label comes last because the packer typed it. The IPA takes the same version (DM_APP_VERSION). Checked: test_nsp_nup's new test (the order, the cuts, the label of an update and of its base game); for the Ocarina of Time NUP and its build folder the function gives 1.1.1 where it gave none. Every Python test file as CI runs them, and lint_python.py with the pinned tools. Not checked: the app was not packed again, and no IPA was built.
|
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. |
A NUP can carry a display version without carrying control data. Use its selected package's numeric label in the survey, the derived profile, and the app after the applicable control data and registered version. Read the base NACP for the app even when only the update is extracted. Keep Ocarina of Time's registered runtime row as it is. Checked the real Mario Kart World 1.8.0 NUP and both version fields in signed Mac app fixtures. Focused packing, unsigned IPA, and docs tests passed. Python lint matches the findings on main. Combines PR #2822 and PR #3070 and addresses issue #2902. Co-authored-by: UserDerezzed <25561419+UserDerezzed@users.noreply.github.com> Co-authored-by: Eliran Zach <4012041+thehobbit85@users.noreply.github.com> Co-authored-by: Saqib Razaq <232577050+saqibrazaq-dt@users.noreply.github.com>
|
Thanks for tracking down the Finder version and checking the rebuilt Mac app. The fix landed in f3f73320. The app now falls back to the registered build version and then the selected NUP package’s numeric label. I verified both version fields in a signed Mac bundle using a synthetic NUP with the reported |
If the packed update has no NACP, prefer its registered version before falling back to the base game's NACP. The base control data can describe an older release. The selected NUP's numeric label is the final fallback. Register Ocarina of Time v131072 as 1.1.1 for its verified main build ID. The local NUP has no control data or numeric label, so the app version and the host's version service both use this registered value. Checked 186 targeted tests, the generated symptom index, and both Mac bundle version fields with the local NUP. OoT reached its title menu on an M6 running macOS 27.2.1 and called GetDisplayVersion. The Pyright findings match clean main. Follow-up to PR #2822. Co-authored-by: UserDerezzed <25561419+UserDerezzed@users.noreply.github.com>
|
Thanks again, @UserDerezzed, for finding the Finder version issue and checking the rebuilt Mac app. The follow-up is on All 186 targeted tests passed. Both Mac bundle version fields resolved to 1.1.1 from the local NUP, and the rebuilt host reached the Ocarina of Time title menu on an M6. The checks covered bundle metadata and the title boot. Fresh full game app and IPA builds were outside those checks. |
What and why
The Mac app of The Legend of Zelda: Ocarina of Time 1.1.1, packed from a NUP, says
Version 1.0in Finder (CFBundleShortVersionString1.0).The app version came from
control.nacpalone: the packed version's, else the base game's. This NUP has no NACP in either package, so the script passed no version andpack_app.pywrote its default. A dump has no control data either.app_version_ofnow takes, in this order:buildrow registers for the packed version;pack_nup.display_label: the package's, else its base game's, or the metadata record's when the NUP has no base game).Each is cut to a bundle version with the cut
nacp.versionalready made (nownacp.bundle_version), so a row or a label that is no version (v131072,?) gives none and the app says 1.0 as before. The label comes last because the packer typed it:pack_nup.py's header already treats these records as labels, not the console's values. The IPA takes the same version (DM_APP_VERSION).For Ocarina of Time the build row has
v131072where its display version goes, so the label supplies 1.1.1. I left the row alone: the host answersnn::oe::GetDisplayVersionfrom it, and I have not checked what the game shows with either value.Reference entry: An app packed from a NUP without control data says version 1.0.
Checked
test_nsp_nup.pytest_app_version_without_nacp_is_the_profiles_then_the_label: the order, the cuts, and the label of an update and of its base game.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 build's game line namesversion: 1.1.1, and the app'sInfo.plisthasCFBundleShortVersionStringandCFBundleVersion1.1.1 where it had 1.0. 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 impactnames every game, as it does for any change tobuild_ipa_from_nsp.py, but the change reaches only the version string of an app whose game has no control data, and no step of the shader chain, the rewriter or the host reads it.impactalso notes that no rule ofimpact_map.tsvmapsdm/tools/nacp.py; I did not add one here.#2823, for the same NUP's missing app icon, touches the neighbouring lines of
packing.md's Launcher metadata section and of the game note; whichever lands second needsdocs_symptoms.pyrun again.