Skip to content
notmyname edited this page May 4, 2011 · 12 revisions

Build Instructions

These instructions are for building the C extension for Overviewer. Building the extension is not currently required, but will be in the near future. Also note that Windows binary kits are available in the 'Downloads' section. These kits already contain the compiled extension.

Windows

First, you'll need a compiler. You can either use Visual Studio, or cygwin/mingw.

Building with Visual Studio

You can get a free copy of Visual Studio Express here: http://www.microsoft.com/express/Windows/

You will want the C++ version (Microsoft® Visual C++® 2010 Express)

  1. Get the latest source code from github

  2. From the Start menu, navigate to the 'Microsoft Visual Studio 2010 Express' and open the 'Visual Studio Command Prompt (2010)' shortcut.

  3. cd to the folder containing the Overviewer source code

  4. Copy Imaging.h and ImPlatform.h from your PIL installation into the current working directory

  5. First try a build:

    c:\python26\python setup.py build

If you encounter the following errors: error: Unable to find vcvarsall.bat then try the following:

set DISTUTILS_USE_SDK=1
set MSSdk=1
c:\python26\python setup.py build

If the build was successful, there should be a c_overviewer.pyd file in your current working directory.

Building with mingw

  1. Open a MinGW shell

  2. cd to the Overviewer directory

  3. Copy Imaging.h and ImPlatform.h from your PIL installation into the current working directory

  4. Build:

    python setup.py --compiler=mingw32

Linux

You will need the gcc compiler, which is normally installed by default.

You will need the following packages (at least):

  • python-imaging (for PIL)
  • python2.6-dev
  • python-numpy

Then to build: python2.6 setup.py build

OSX

  1. Download the source code for PIL from http://www.pythonware.com/products/pil/

  2. Compile the PIL code (python ./setup.py build)

  3. Find the path to libImaging in the PIL source tree

  4. Build minecraft overviewer with the path from step 3 as the value for C_INCLUDE_PATH:

    C_INCLUDE_PATH=<path from step 3> python ./setup.py build

Clone this wiki locally