Latest Posts

Changes in Building_Widelands_on_macOS

Old Title

BuildingWidelandsMac


Editor Comment

Reverted to revision #24


Revision Differences of Revision 27

# Building Widelands on Mac OS ¶

First, install [Homebrew](http://brew.sh/). ([MacPorts](http://www.macports.org/) should work, too) ¶
You will also need to install XCode for both of them. ¶

We will need a recent compiler. This installed gcc-6 on my system: ¶

$ brew install gcc@6 ¶

I also strongly suggest installing [ccache](http://ccache.samba.org/) so that incremental builds do not take ages. ¶

$ brew install ccache ¶

Then install all the dependencies of Widelands: ¶

$ brew install -v python sdl2 libjpeg libpng libogg libvorbis sdl2_mixer sdl2_net sdl2_image sdl2_ttf glew bzrtools
boost cmake doxygen graphviz gettext ninja icu4c zlib
$ brew install --cc=gcc-6 boost

$ brew link --force gettext ¶

At one point you must also check out the source code of Widelands of course. ¶
This takes forever if you want to have the full version history (which you might ¶
want if you want to do serious development), but if you are only wanting to ¶
build widelands without changing much you can try: ¶

$ bzr checkout --lightweight lp:widelands wl_bzr ¶

We did not 'link' all of the dependencies into our Homebrew path, so ¶
'./compile.sh' might not work out of the box for you. You might need to provide ¶
additional parameters to cmake so that it finds all your libraries. Have a look ¶
how we do it in ¶
[build_app.sh](http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/utils/macos/build_app.sh) ¶
in the BuildWidelands() function. This script is used to make the daily builds ¶
for Widelands, so it contains all steps that are needed on my system to build ¶
Widelands from scratch, make a Widelands.app bundle and package it into a .dmg.