Skip to content

Packaging

Zap-12100 edited this page Mar 19, 2012 · 2 revisions

MCEdit has a lot of odd quirks you will run into when developing. They're all slightly different when it comes to developing on different platforms. This guide will point out anything extra you need when packaging for release.

Before you Begin

This guide assumes you're coming from experience or the Running from source guide.

That guide assumes you only wanted to run MCEdit from source and not package it for release. It you want to work on it and then package it yourself, there are extra steps to do. No matter what system you're on, or what system you're packaging for, you'll need esky. Esky can be installed from source or via easy_install esky.

If you want to package the accelerated NBT module you will need Cython, which may be installed from source, binary package, or easy_install cython.

What was virtualenv about before?

If you were coming from the "Running from source" guide, you'll have installed virtualenv and be wondering what it was about. virtualenv will simplify development by creating an isolated and barebones Python environment. Anything you install while virtualenv is active won't affect your system-wide Python installation, for example.

Windows

Windows additionally requires the win32api binary package.

easy_install esky
easy_install py2exe
python setup.py bdist_esky

OS X

You will run into errors attempting to use the system Python when packaging anything under OS X. The easiest way to install a new Python is by using Homebrew.

If you were using the system python while developing and using virtualenv, you'll need to overwrite it with your newly installed version.

brew install python
virtualenv -p /usr/local/bin/python ENV

easy_install esky
easy_install py2app
python setup.py bdist_esky

This will leave you with a zip file in dist/ that contains a portable .app bundle.

Final Notes

Packaging is in no way fun, you can expect plenty of errors and the like. Remember to share changes you make. Happy coding!