Skip to content

install_mac_app: launch natively on Apple Silicon instead of under Rosetta - #69

Merged
EDToaster merged 1 commit into
mainfrom
fix/mac-app-rosetta
Nov 9, 2026
Merged

EDToaster merged 1 commit into
mainfrom
fix/mac-app-rosetta

Conversation

@EDToaster

Copy link
Copy Markdown
Owner

Problem

When the app installed by scripts/install_mac_app.sh is launched from Finder/Spotlight on Apple Silicon, the terminal's shell runs as x86_64 (uname -m => x86_64).

The bundle's CFBundleExecutable is a #!/bin/sh shim with no Mach-O header, so LaunchServices can't infer its architecture and may start it under Rosetta. A translated parent prefers the x86_64 slice of universal binaries, so the Intel preference leaks down to the shell.

Fix

  • The shim now spawns the real binary via /usr/bin/arch -arm64 when hw.optional.arm64 is 1 (this reports the hardware, so it's still correct when the shim itself is translated). Intel Macs are unchanged.
  • Added LSArchitecturePriority (arm64, x86_64) to the generated Info.plist.

Testing

  • bash -n on the script and sh -n on the rendered shim pass.
  • Not yet verified on a Mac. To check: rerun scripts/install_mac_app.sh, launch Toastty from Finder, and run uname -m (expect arm64). If LaunchServices has cached the old decision, log out and back in.
  • If uname -m still says x86_64, check file ~/Library/Application\ Support/Toastty/toastty. An x86_64-only binary means the Rust toolchain is the Intel one (rustc -vV | grep host).

Created with Perplexity

@EDToaster
EDToaster merged commit 084542f into main Nov 9, 2026
2 checks passed
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.

1 participant