-
Notifications
You must be signed in to change notification settings - Fork 0
Build instructions
These instructions are for building the C extension for Overviewer. Also note that Windows binary kits are available in the 'Downloads' section. These kits already contain the compiled extension. There are also precompiled binary packages for Debian systems. See Installation for more information.
First, you'll need a compiler. You can either use Visual Studio, or cygwin/mingw.
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)
-
Get the latest source code from github
-
From the Start menu, navigate to the 'Microsoft Visual Studio 2010 Express' and open the 'Visual Studio Command Prompt (2010)' shortcut.
-
cd to the folder containing the Overviewer source code
-
Copy Imaging.h and ImPlatform.h from your PIL installation into the current working directory
-
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.
-
Open a MinGW shell
-
cd to the Overviewer directory
-
Copy Imaging.h and ImPlatform.h from your PIL installation into the current working directory
-
Build:
python setup.py build --compiler=mingw32
You will need the gcc compiler and a working build environment. On Ubuntu and Debian, this can be done by installing build-essential.
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
-
Download the source code for PIL from http://www.pythonware.com/products/pil/
-
Compile the PIL code (python ./setup.py build)
-
Install PIL (sudo python ./setup.py install)
-
Find the path to libImaging in the PIL source tree
-
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
The following script (copied into your MCO source directory) should handle everything for you:
#!/bin/bash
# start with a clean place to work
python ./setup.py clean
# get PIL
if [ ! -d "`pwd`/Imaging-1.1.7/libImaging" ]; then
/usr/bin/curl -o imaging.tgz http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz
tar xzf imaging.tgz
rm imaging.tgz
fi
# build MCO
C_INCLUDE_PATH="`pwd`/Imaging-1.1.7/libImaging" python ./setup.py build