Skip to content

Build universal binary by default for Intel Mac support#331

Open
JimLiuxinghai wants to merge 1 commit intosteipete:mainfrom
JimLiuxinghai:main
Open

Build universal binary by default for Intel Mac support#331
JimLiuxinghai wants to merge 1 commit intosteipete:mainfrom
JimLiuxinghai:main

Conversation

@JimLiuxinghai
Copy link

Body:
Summary
Changes the default build behavior to create universal binaries (arm64 + x86_64) instead of host-architecture-only builds, enabling Intel Mac support out of the box.
Changes

  • Modified Scripts/package_app.sh: Default ARCH_LIST to arm64 x86_64 instead of host architecture detection
  • Modified Scripts/compile_and_run.sh: Default ARCHES_VALUE to "arm64 x86_64" instead of uname -m
    Why
    Previously, the build scripts only compiled for the host architecture, which meant:
  • Building on Apple Silicon Macs produced arm64-only binaries
  • Building on Intel Macs produced x86_64-only binaries
    This change ensures that both architectures are always included in the build, making the app work on both Intel and Apple Silicon Macs regardless of where it was built.
    Backward Compatibility
    Users can still override this behavior via the ARCHES environment variable:
    ARCHES="arm64" ./Scripts/package_app.sh # Apple Silicon only
    ARCHES="x86_64" ./Scripts/package_app.sh # Intel only
    Testing
  • Verified that lipo -archs CodexBar.app/Contents/MacOS/CodexBar outputs: x86_64 arm64
  • Build completes successfully with ./Scripts/compile_and_run.sh

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