Latest Posts

Changes in Building_Widelands_on_macOS

Old Title


Editor Comment

install instructions for gcc-7

Revision Differences of Revision 31

# Building Widelands on Mac OS ¶

First, install [Homebrew]( [MacPorts]( works as well. ¶
You will also need to install X
Ccode for both of them. ¶

We will need a recent compiler. This install
eds gcc-6 on my system7: ¶

$ brew install gcc@

I also strongly suggest installing [ccache]( 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-7 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 ¶
wWidelands 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 ¶
'./' 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 ¶
[]( ¶
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 bundle and package it into a .dmg. ¶

If you use clang (as provi
cded by XCode or installed by yourself) you will be able to use [ASAN](, ¶
this has
e proven an valuable tool in detecting memory Issues.