Skip to content

Add opt-in macOS standalone builder support - #295

Merged
ZallaxDev merged 8 commits into
ZallaxDev:integrationfrom
mkrieger95:feature/mkrieger95-macos-builder
Nov 21, 2026
Merged

ZallaxDev merged 8 commits into
ZallaxDev:integrationfrom
mkrieger95:feature/mkrieger95-macos-builder

Conversation

@mkrieger95

@mkrieger95 mkrieger95 commented Nov 20, 2026 •

Copy link
Copy Markdown

Continues #39, originally designed, implemented, and tested by Andrés Flórez (@andresflopaez1255). Their original commit 0378e96 is retained in this branch with its original authorship. The original review and Andrés's macOS audit log are the starting point for this update.

Changes

  • Carry the patch forward to integration, including the release script's newer localization and voxel recipe paths. Keep Windows as the default, make macOS an explicit native build, and keep Linux on the source builder.

  • Preserve executable permissions and PyInstaller runtime symlinks through ZIP extraction. Document the self-built native macOS package under Linux and macOS, with the web builder as the recommended installation route.

  • Support the macOS engine files, recipes and PyInstaller runtime in the strict release audit, including a scoped exception for upstream build paths in the bundled Python and Tcl binaries. ROM and secret checks remain enabled.

  • Fix a blocker exposed by the full release: classify the port-owned bottom/menu_top.bin as an engine asset, alongside the existing menu art. Add a regression test for engine inclusion and exclusion from the game-data ABI. Recipe literal limits remain unchanged.

  • Test macOS packaging compatibility with Python 3.15.2 and Pillow 13.0.0. The release-generation pins come from integration’s upstream.lock. The real-ROM test below used the pins on the original dev base.

Validation

Native Apple Silicon release validation with the supported English ROM passed. See the full build report, environment, procedure and artifact checksums.

  • Produced Emerald3DS-v0.5.0-macOS.zip, the engine-only 3DSX and WebPayload ZIP. Both ZIPs passed their strict real-ROM release audits.
  • Both model-proof passes passed, including 188 rooms with zero failures. All five ROM-based generators matched the build, and every precompiled program rebuilt its file exactly.
  • Both executables from the extracted final macOS ZIP loaded their payload, Tcl and Pillow. The extracted command-line builder created a 6,847-entry game-data pack from the ROM; its separate verification passed with ABI a303f539.
  • Targeted staging tests passed: 18 tests, one skipped. The new regression failed before the menu-art fix and passed after it.
  • macOS packaging CI passed before retargeting using Python 3.15.2 and Pillow 13.0.0, covering PyInstaller packaging, strict synthetic-data auditing, ZIP extraction and both executable launch probes. Dependency-update scope and validation.
  • The strict repository audit also passed after the fixes.

The native release was completed across an initial run and a corrected resume after fixing menu-art classification; the linked report records the exact scope. Actual 3DS hardware boot/play testing is still outstanding. This run was English-only and used --skip-cia, so localized releases and the optional HOME Menu forwarder are not validated by it.

AI-assisted follow-up implementation and validation.

andresflopaez1255 and others added 4 commits October 14, 2026 19:41
- Add --platform {Windows,macOS} flag to tools/build_release.py (defaults to Windows)
- Add Emerald3DS-v*-macOS globs to tools/release_audit_allow.toml
- Document --platform macOS in docs/RELEASING.md and tools/build_release.py
- Document macOS standalone builder instructions under docs/INSTALLATION.md
Ship the port-owned top menu art with the engine and cover its exclusion
from the data ABI. Permit upstream Tcl build paths in its scoped runtime
exception, matching the bundled Python framework.

Validated the native release, strict audits for both ZIPs, extracted Mac
builders, and a 6,847-entry pack built from the supported English ROM.

Copy link
Copy Markdown
Author

The native Apple Silicon release validation is now complete. Pushed the two blockers found during the real-ROM build, plus a regression test, in 8b0333a.

Fixes found by the full build

  • Engine-owned top-screen menu art: bottom/menu_top.bin is generated entirely by the port's gen_menu_art.py --top. It was missing from ENGINE_PATTERNS, so the recipe treated 192,012 bytes of original port art as unexplained ROM data and failed its 65,536-byte limit. It now ships with the engine, alongside bottom/menu.bin. The regression test checks engine inclusion and exclusion from the game-data ABI.
  • Bundled Tcl runtime: the Python.org Tcl binary carries upstream build-machine paths. Added the exact macOS _internal/Tcl file pattern to the existing runtime local-path exceptions, matching the Python framework exception. Secret and ROM checks remain enabled. Checked that secrets and game-pack signatures still fail, and that local paths in project files still fail.

No recipe limits were raised. The corrected recipe has 29,538 unexplained literal bytes; original game-object literals are 1,012 bytes, below their 4,096-byte limit.

Environment and scope

Native arm64 Mac, macOS 27.3, Python 3.13.3, Pillow 12.3.0, PyInstaller 6.22.3, GNU Make 4.4.1, devkitARM r68 / GCC 16.1.0 and libctru 2.7.1. English BPEE ROM, matching supported SHA-1 f3ae088181bf583e55daf962a92bb46f4f1d07b7; symbols-only reference ELF.

This was the complete release pipeline across an initial run and a corrected resume, rather than a new uninterrupted invocation: the initial native build and both model-proof passes completed, then recipe generation exposed the menu-art classification defect. After fixing staging, rebuilt the executable with make release and resumed with:

python tools/build_release.py --version 0.5.0 --platform macOS \
  --rom "$EMERALD_ROM" --gba-elf "$EMERALD_ELF" --skip-make --skip-cia

The resume retained the completed model proofs; no model or generator sources changed. It reran recipe generation, all five ROM-based generators, program compilation, native app packaging and both strict release audits.

Results

  • Both model-proof passes passed, including 188 rooms with zero failures.
  • All five ROM-based generators matched their expected size and CRC. Every precompiled program rebuilt its file exactly.
  • macOS ZIP: release_audit: clean, 331 files checked with the real-ROM scan.
  • WebPayload ZIP: release_audit: clean, 46 files checked with the real-ROM scan and web-payload validation.
  • Extracted the final macOS ZIP with unzip. Both graphical and command-line executables loaded Tcl, Pillow and their adjacent payload successfully.
  • Used the extracted final command-line executable to build the pack from the ROM, then ran its separate verify command:
    OK: 6847 entries, ABI a303f539, release v0.5.0
    
  • The private pack includes 419 optional follower sprites and English follower text, with no missing assets.
  • Targeted staging tests rerun before pushing: 18 tests, one skipped, no failures.

Artifact SHA-256 values:

b56b974681ab35024ed96503f5040a52b00effe09ad876a8449bbd8a6fc58372  Emerald3DS-v0.5.0-macOS.zip
0f2092863d74426ca35be3e8e049eb7091f9edcdcfa3648b436e5f367e48092d  Emerald3DS-WebPayload.zip
04e7b2477a788c3d5708c401f8a67ace1cf9ca6a98391a39c5833bf0d7429d6c  Emerald3DS.3dsx

Remaining scope: actual 3DS hardware boot/play testing has not been performed. This run was English-only and used --skip-cia, so it does not validate localized releases or the optional HOME Menu forwarder. No ROM, ELF, generated pack or private SD-card archive is attached here; this update contains source fixes and validation evidence only.

AI-assisted implementation and validation.

Exercise the latest stable runtimes in the native packaging workflow,
independently of upstream.lock's proven release-generation environment.
Document that real game data must continue to use the existing pins.

Copy link
Copy Markdown
Author

Added 61a96e8 to update the macOS packaging compatibility check to Python 3.15.2 and Pillow 13.0.0, the current stable releases verified for this update.

The updated macOS packaging CI passed: dependency installation, PyInstaller packaging, strict synthetic-payload audit, extraction, and both executable launch probes succeeded.

As agreed for this change, upstream.lock and the proven Python 3.13/Pillow 12.3.0 release-generation environment are unchanged. docs/RELEASING.md now explains why the latest-version packaging check is independent of the runtime used to generate real game data and preserve native/browser parity. The earlier real-ROM build report continues to describe that pinned release environment; this update does not claim a full real-ROM release rebuild under Python 3.15.

The workflow YAML was parsed locally, git diff --check passed, and the strict repository audit passed. Marking this PR ready for review as requested; actual 3DS hardware testing remains explicitly outstanding.

@mkrieger95
mkrieger95 marked this pull request as ready for review November 20, 2026 16:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T16:12:19.591283Z 61a96e8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mkrieger95
mkrieger95 changed the base branch from dev to integration November 20, 2026 18:15
@ZallaxDev

Copy link
Copy Markdown
Owner

Thanks @mkrieger95 for carrying this forward! This keeps Andrés's original commit and covers what was still open in #39: the full macOS audit entries, opt-in native packaging, and self-build instructions under "Linux and macOS" while keeping the web builder as the recommended path. Merging without squashing to keep 0378e96 and its authorship.

@ZallaxDev
ZallaxDev merged commit cef1f47 into ZallaxDev:integration Nov 21, 2026
6 checks passed
@mkrieger95
mkrieger95 deleted the feature/mkrieger95-macos-builder branch November 21, 2026 01:33
DannyM90 added a commit to DannyM90/emerald-3ds that referenced this pull request Nov 21, 2026
…axDev#267, ZallaxDev#294, ZallaxDev#295

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjZs53yVtumpNLmM8AycET

# Conflicts:
#	tools/locales/japanese.json.gz
ZallaxDev added a commit that referenced this pull request Nov 21, 2026
- public_sync: an integration commit is held when each file has what it adds; changelog credits beside the pull requests' own entries
- Changelog: public pull requests #190 #209 #262-#300, by their authors
- public_sync: dev takes integration's ported pull requests as their own commits; a conflict or unported pull requests are problems, not a line
- Public export: the benchmark, profiling and macOS builder test tools (#293, #295, #300)
- Public export: upstream.lock's Python 3.15.2 and Pillow 13.0.0 (#288, #289)
- Harden Emerald 3DS runtime and builder workflows (#300)
- Replace deprecated Pillow pixel reads in voxel tools (#294)
- Add opt-in macOS standalone builder support (#295)
- Locales: move the Japanese span in main_menu.c past the main menu card (#298)
- Fly map: choose the destination with the +Control Pad (#267)
- Bottom screen: a tap on the map that slides a little still goes on with a message (#281)
- Summary: give the trainer memo room for a third line (#269)
- Summary: show Pokémon status icons (#270)
- Main menu: the saved game's trainer card on the top screen (#284)
- Restore Japanese naming marks and full touchscreen rows (#275)
- Speed up voxel generation to shorten development builds (#293)
- Release: ship bottom/menu_top.bin with the engine files (#280)
- Bag: planting a berry opens it in the bottom screen's window (#283)
- Frontier Pass map: the picture half as big again, filling its plate (#282)
- CI: support Ubuntu 26.04 with non-PIE sanitizer fixtures (#290)
- Startup: the data pack errors and the START hint in French and Italian (#209)
- Installation: step-by-step builder for Linux and macOS (#190)
- Bottom screen: reuse unchanged wild-list snapshots (#273)
- Upgrade release builds to Pillow 13.0.0 (#289)
- Naming screen: a tab turns straight to its page (#287)
- ci: upgrade GitHub Actions to latest tested releases (#292)
- Generate map event IDs for standalone voxel host tests (#277)
- Tests: update the voxel draft chunk fixture (#262)
- Harden native string formatting and numeric input parsing (#279)
- Build releases with Python 3.15.2 (#288)
- Visible wild: roll the IVs right after the personality (PID/IV legality) (#266)
- CI: use the release toolchain for 3DS builds (#286)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants