Skip to content

Running from source (Windows)

codewarrior0 edited this page Oct 23, 2012 · 3 revisions

If you want the absolute-latest-cutting-edge changes and features of MCEdit, you'll want to be running from source. Maybe you're a new programmer and you want to twiddle with MCEdit's code. If you're new to Python and github and on Windows, you might find that it's harder than it seems, and cmd doesn't recognize easy_install.

This guide, unlike the readme on the main page, assumes Windows is your OS.

Before you Begin

You must know whether your system is 32-bit or 64-bit. To find out, click Start, right-click Computer, and click Properties. A Control Panel window should show up with information about your computer. Find "System type" and remember what your system is, it will be vital when downloading the required python libraries.

Windows doesn't like executables it doesn't recognize - thing is, it doesn't seem to recognize anything at all. Be smart and think.

Dependencies

MCEdit depends on pygame for windowing and input, pyopengl for graphics, numpy for high speed block operations, and pyyaml to load block definitions, plus win32api on Windows for platform support.

Python

You'll need Python 2.7.2 (just not 3 or above). You can get it here. If your system is 32-bit, get the first one "Python 2.7.2 Windows Installer". If your system is 64-bit get the one below, "Python 2.7.2 Windows X86-64 Installer".

Install that. If it asks, install for "this user only", or you might hit trouble later on.

virtualenv

If you just want to run the blazing hot version, skip this part. However, if you wish to package up changes you make, you'll want virtualenv. To extract the file get 7-Zip - this is explained further in the Packaging page.

win32api

Both 32 and 64 bit systems go here. Click on the latest build (as of 13/ 3/12, Build 217). If 32-bit, get "pywin32-217.win32-py2.7.exe", if 64-bit, get "pywin32-217.win-amd64-py2.7.exe".

  • Win7 Pro 64-bit: Watch the final step of the install carefully to see that it is successful instead of mentioning excepthook and stderr. If it fails, [Finish] and right-clicking the executable to "Troubleshoot Compatibility" -> "The program worked in earlier versions of Windows..." -> Select "Windows Server 2008" -> [Next] -> [Start the program...] to successfully finish the installation of this dependency. You only need to run this installer once, so don't bother saving these selections.

PyOpenGL

32-bit users go to this page.

64-bit users have a harder time. You will find a 64-bit adaptation of this library here. Choose the third one down, "PyOpenGL-3.0.1.win-amd64-py2.7.exe".

numpy

32-bit 9th one down, "numpy-1.6.1-win32-superpack-python2.7.exe".

64-bit 11th down, "numpy-unoptimized-1.6.1.win-amd64-py2.7.‌exe". This one likes taking its sweet time installing, be patient.

pygame

32-bit Windows section, first one, "pygame-1.9.1.win32-py2.7.msi".

64-bit Second one down, "pygame-1.9.2pre.win-amd64-py2.7.‌exe".

pyyaml

32-bit Download and installation, Windows Installers, third one down "http://pyyaml.org/download/pyyaml/PyYAML-3.10.win32-py2.7.exe".

64-bit Last time you'll see this page in your life, I promise. Second down, "PyYAML-3.10.win-amd64-py2.7.‌exe".

Get MCEdit

The next step is to use git to retrieve the source code from github. A github account is not needed but is nice to have if you want to submit your own changes. Open up Git Bash and clone MCEdit.

git clone --recursive -o upstream https://github.com/mcedit/mcedit

Now go to your User folder (where My Documents, My Pictures, etc. are located. NOT Libraries). You should see a folder called "mcedit". Go in there and double click "mcedit.py." Done.

To update, simply open up Git Bash:

cd mcedit
git fetch upstream
git merge upstream/master

pymclevel is relatively easy to take care using git. Simply open up Git bash:

cd mcedit
git submodule init
git submodule update

Use that again every time you wish to update.