Latest Posts

Changes in Building_Widelands_on_macOS

Old Title

BuildingWidelandsMac


Revision Differences of Revision 13

# Building Widelands on Mac OS ¶

These instructions are for Building Widelands on Mac with static libraries (needed for Releases), but glancing over it you should be able to figure out how to do it in a normal fashion too. ¶

First, install [Homebrew](http://brew.sh/). You will also need to install XCode for this. ¶

We will need a recent compiler: ¶

$ brew tap homebrew/versions ¶
$ brew install --enable-cxx gcc48 ¶

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

$ brew install ccache ¶

Install python and bzr ¶

$ brew install python && brew install bzr ¶

Then install all the dependencies of Widelands: ¶

$ brew install sdl libjpeg libpng libogg libvorbis libsdl_mixer sdl_net libsdl_ttf libsdl_gfx boost glew lua bzr cmake gettext libiconv ¶
$ brew link --force libpng ¶
$ brew link --force gettext ¶
$ brew install sdl_image ¶

We need a liblua that is statically linked. Easiest way is something along these lines: ¶

$ brew unpack lua; cd lua*; make macosx; cp src/liblua.a /usr/local/lib/liblua.a ¶

Same for libz.a ¶

$ brew tap homebrew/dupes; brew install zlib ¶

And for bzip2: ¶

$ wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz; tar xzvf bzip2-1.0.6.tar.gz; cd bzip2-1.0.6; make; cp libbz2.a /usr/local/lib/libbz2.a ¶

And for libiconv
: ¶

, I recommend editing $the brew unpack libficole anv;d cadd libiconv-1.14;g ./configuren --enable-static; make;. cpI ./lib/.alibs/libiconv.a /usr/lochal/lib ¶

We will
d alsto need ait recgent compilter: ¶

xt and add $in bre--w itap home-librew/versicons ¶
$ b
v-prew finx=/ustall --enabr/le-ocxx gcc48 ¶

I
als/o sptrong/ly suggest installbing [ccache](http://ccache.samba.orgnv/) so thato incremental builds do not take ages. ¶

$ brew
install ccachorrectly.

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 ¶