Difference between revisions of "MacOS"
m (→Using MacPorts) |
m (→Using MacPorts) |
||
Line 27: | Line 27: | ||
For 0.4: | For 0.4: | ||
<pre>sudo port install libxml2 libsdl2 libsdl2_image libsdl2_mixer protobuf-c glew boost ftgl</pre> | <pre>sudo port install libxml2 libsdl2 libsdl2_image libsdl2_mixer protobuf-c glew boost ftgl</pre> | ||
− | ( | + | (At testing time, ftgl did not work.) |
You'd also need dylibbundler and create-dmg for building dmgs; you'd have to work out yourself how to get it working. | You'd also need dylibbundler and create-dmg for building dmgs; you'd have to work out yourself how to get it working. |
Revision as of 06:45, 14 February 2021
This page will help you get up and running to hack Armagetron on macOS.
The old way
See Mac OS X. Nobody on the core team has a real Mac any more, so the XCode UI based build has fallen into disrepair. Patches welcome.
Prerequisites
Builds work the same way as on Linux. The build prerequisites can be installed over Homebrew or MacPorts. Our automated builds use Homebrew because its libraries integrate better with the macOS system and are easier to pack into the app bundle. Therefore, if you don't already have one of those on your system, pick Homebrew, you're less likely to run into problems.
All code blocks are to be entered into the terminal.
Using Homebrew
For 0.2.X, use
brew install pkg-config autoconf automake sdl sdl_image
For 0.4, use
brew install pkg-config autoconf automake sdl2 sdl2_image sdl2_mixer protobuf-c glew boost ftgl
You can drop autoconf and automake if you just build from source archives. If you also want to build app bundles and dmgs, add dylibbundler and create-dmg. libxml2 may also be required, but macOS comes with a version already.
Using MacPorts
For 0.2.X:
sudo port install libxml2 libsdl libsdl_image
For 0.4:
sudo port install libxml2 libsdl2 libsdl2_image libsdl2_mixer protobuf-c glew boost ftgl
(At testing time, ftgl did not work.)
You'd also need dylibbundler and create-dmg for building dmgs; you'd have to work out yourself how to get it working.
Get source and build
Follow the Linux Instructions for these parts.
Build dmg and app bundle
The Linux installation instructions would give you an installation you can start from the Terminal only. That's not very Apple. So while you're in the build directory, do
sh ./src/macosx/build_bundle.sh
This should put a dmg with the app bundle inside and a zip of the app bundle contents into the current directory. If you want them somewhere else, specify the path as build_bundle.sh's optional single argument.