Building Hedgewars under OS X Yosemite

Ok, you considered to build Hedgewars by yourself. To be clear, I’m going to build 0.9.21 on 10.10 Yosemite on MacBook Pro with Retina. First of all, read official manual. After source code pull from Mercurial failed via hg command I considered downloading source on the Downloads page.

As original HowTo says, you should build Ogg and Vorbis, but while Ogg build succeeded, Vorbis said it can’t resolve u_int16_t type and after some googling I’ve found it was a known issue and you should replace #include <inttypes.h> with #include <sys/types.h> under #elfif (defined(__APPLE__) && defined(__MACH__)) in file ogg/os_types.h. Then everything goes more or less ok until you’re trying to generate makefile with Cmake. I had to turn off video recording feature, screenshots in PNG (BMPs instead) and no local server. Finally, I came up with

cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DNOPNG=1 -DNOVIDEOREC=1 -DNOSERVER=1 -DCMAKE_BUILD_TYPE=Release

After successful build you still can’t play, because hwengine fails to launch. It looks for libfreetype.6.dylib in /usr/X11, but you might even don’t have X11 installed. If yes, proceed to Quartz/X11, download and install it. Don’t forget after all make symlink to original X11 directory using sudo ln -s /opt/X11 /usr/X11.

And still, after everything is done, Hedgewars fail to run in fullscreen mode so you might consider running it via VirtualBox and some Linux distro instead.

By the way, you can download my build of Hedgewars 0.9.21 for OS X Yosemite 10.10 here.