Compiling Warzone 2100 on Mac OS X

Published on June 16, 2007, 8:53 p.m.

I recently ran across The Warzone 2100 Resurrection Project, and I thought to myself,"cool, I wonder if there's an OS X version..." So, I hit their downloads page only to find the message: "(The MacOSX diskimage will follow soon)"

So I thought, "oh well, I'll just grab the source code and compile it!" After about two hours of digging, I finally got it compiled, and here's how! (NOTE: I've got quite a bit of Unix stuff installed via fink, so your mileage may vary)

  1. Here's the list of stuff I had to get/install/compile before I could even start on Warzone 2100: cmake (to compile physfs), physfs, a newer bison, and SDL_net

  2. First I grab cmake 2.4.6. Luckily, they have a universal .dmg for Tiger.

  3. Next, I grab the source code for physfs-1.1.1 from their download page. At first I tried compiling the "Unix Way", but that didn't work, so I used cmake to generate an Xcode project (pretty cool!). From a terminal window, I cd into the physfs directory and type:
    cmake -G Xcode .

    Then, after compiling physfs with Xcode, I copied the libraries to my /usr/local directories. Again from a Terminal:
    sudo cp libphysfs.* /usr/local/lib
    sudo cp physfs.h /usr/local/include

  4. Next, I open up fink commander and grab the newest version of bison from fink

  5. Now I need SDL_net. While the project offers a Mac OS X Framework and SDL_net is available through fink... I grabbed the source anyway. It compiled just fine the Unix way:

    sudo make install

    This put all the libraries in /usr/local/lib and /usr/local/include

  6. Finally, time to compile Warzone2100, so I grabbed the source code, which contains a handy-dandy file called COMPILE. I suggest you read it. To start of, I opened a terminal and cd'd into the warzone2100-2.0.6 directory and typed the following command:

    Then, I typed the following to configure it using my fink libraries and headers:
    ./configure --prefix=/Applications/Warzone2100-2.0.6 LDFLAGS=-L/sw/lib CPPFLAGS=-I/sw/include

    This will also put the final binary in my /Applications Directory. So, the last to steps are to compile, and install:
    sudo make install
    This did the trick for me.

  7. Now that I got Warzone2100 compiled, I can open a terminal and type the following:
    /Applications/Warzone2100/bin/warzone2100 --fullscreen

    And this "should" lauch the application!
comments powered by Disqus