by toabi » Mon Jun 20, 2011 21:28
Well.
CMake can build stuff. But there are some issues:
1) The compiler doesn't like debug:98 and debug:71 with "error: cast from ‘_opaque_pthread_t*’ to ‘unsigned int’ loses precision"
Fun fact: Building with Xcode works without commenting those two out.
2) Irrlicht on OS X is weird. If you launch it from terminal, it does not receive keyboard input. Keyboard input goes straight to the terminal. I searched a bit around and the thing they say you is: You have to use a Cocoa App Template in Xcode! Well.
3) Also there are/were some 32/64 bit issues. It tried to build 64, but there's only 32bit Irrlicht on OS X…
So because Irrlicht didn't work well I tried to put everything into a Xcode Cocoa Application template. And this is now my build system. It consists of:
- the xcodeproj file
- Interface Builder definitions for the OS X menubar (minimal Cocoa Application)
- Launch script to place in the final application bundle
- A folder with Irrlicht.framework and and libjthread.a
Those files all live in a folder named "minetest-mac". One just has to drop this folder into the cloned minetest folder, open the Xcode project and press "build". It then builds you a fully functional redistributable OS X application bundle. Which is awesome.
The build process could also be started from CLI by running "xcodebuild" in the "minetest/minetest-mac" folder.
The only disadvantage of this is that everytime new files are added to the repository, I have to reference them in the Xcode project.