Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building/running on Apple Silicon Macs #89

Open
cubuspl42 opened this issue Jul 7, 2024 · 1 comment
Open

Support building/running on Apple Silicon Macs #89

cubuspl42 opened this issue Jul 7, 2024 · 1 comment

Comments

@cubuspl42
Copy link

Although ARM support was recently added in #64, it wasn't focused on Macs or macOS. It would be great if the source code was ready to be built on modern Macs, one way or another.

@cubuspl42
Copy link
Author

cubuspl42 commented Jul 7, 2024

Known workaround:

One can build the game for x86-64 and launch it in the Rosetta compatibility mode.

  1. Install Rosetta if you haven't already
softwareupdate --install-rosetta
  1. Install x86-64 Homebrew if you haven't already
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Please note that it will be installed in the legacy /usr/local/ prefix, so if you already have ARM-native Homebrew installation preset in /opt/homebrew/, it shouldn't collide.

  1. Install the x86-64 Homebrew dependencies
arch -x86_64 /usr/local/bin/brew install sdl2 libxmp libvorbis libogg
  1. Built the game for x86-64
arch -x86_64 ./make-macosx.sh x86_64

App bundle generation will likely fail, but this is a separate issue: #69

The game binary itself should be built successfully.

  1. Run the built x86-64 binary (it should automatically run in the Rosetta compatibility mode):
./build/release-darwin-x86_64/openarena.x86_64

The game will likely crash at startup, not being able to find the game data. You can solve this by putting the game data (the heavy baseoa folder) at ~/Library/Application Support/OpenArena/baseoa.

The game might crash at runtime in a strncpy call, when launching the match, but this is a separate issue: #91

This allows to run the game locally, on the machine you built it. For creating the app bundle, see #69 (comment).

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

No branches or pull requests

1 participant