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

MacOS Apple Silicon build #447

Open
naymapl opened this issue Mar 7, 2022 · 3 comments
Open

MacOS Apple Silicon build #447

naymapl opened this issue Mar 7, 2022 · 3 comments

Comments

@naymapl
Copy link

naymapl commented Mar 7, 2022

Hello.
I want to build macOS arm version of your game. How to build it ? Is it use cmake and make to build and where I find files for build and instruction/manual. Thank you so much for help.

Ok I found assaultcube.xcodeproj file and try to build but got error:
Zrzut ekranu 2022-03-7 o 08 33 23

Zrzut ekranu 2022-03-7 o 08 33 16

Where fo find and where to place game data ?

@RonaldReagan
Copy link
Member

@naymapl AC's launcher expects to be packaged in a very specific way. When building I'll tend to not build the launcher. You can choose what product gets built by going to xcode -> Product -> Scheme and select assault cube:
Screen Shot 2022-03-24 at 00 04 27

You will then notice a different error. It won't be able to find the packages dir. To fix this you can edit the scheme. Go to the Product -> Scheme menu again and select edit scheme. In here you can select a custom working directory. Here you can either make a new directory, copy the packages and config folders into it, or you can just be lazy and select the top level AC repository.
Screen Shot 2022-03-24 at 00 05 04

@danielktdoranie
Copy link

If you manage to build this, I would love it!

@h0tgril
Copy link

h0tgril commented Apr 4, 2024

The other issue is all the linker errors when building on arm64, probably due to some included precompiled frameworks only having x86-64 symbols. To resolve that, I had to first get the libs from MacPorts using sudo port selfupdate && sudo port install libogg libvorbis (Homebrew libs I think were still Intel idk), open the Xcode proj, set the target to assaultcube (not launcher), delete the Ogg and Vorbis frameworks from AC/, also delete the ogg+vorbis dirs from AC/source/include, add the MacPorts /opt/local/lib as a library search path, add /opt/local/include as a header search path, add the libogg+libvorbis .a and .dylib files in /opt/local/lib to the build phases > link binary with libraries step, and also replace SDL.framework and SDL_image.framework with new releases from https://github.com/libsdl-org/SDL_image/releases and https://github.com/libsdl-org/SDL/releases.

After building in release mode like RonaldReagan said, it worked! I got a .dmg containing a fully arm64-native launcher and inner assaultcube.app. Seeing better fps on my M1 mini, for example the notoriously laggy custom map ac_syria sticks close to 200fps compared to 120fps on the Intel build.

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

4 participants