Compiling MegaZeux: Difference between revisions
Line 35: | Line 35: | ||
Run ./config.sh. Consider the following flags: | Run ./config.sh. Consider the following flags: | ||
--platform darwin ---------- Mandatory. | --platform darwin ---------- Mandatory. | ||
--disable-x11 ---------- | --disable-x11 ---------- Also mandatory. | ||
--disable-utils ---------- This disables compilation of utilities such as downver and checkres. | --disable-utils ---------- This disables compilation of utilities such as downver and checkres. This is optional. | ||
--enable-release ---------- Removes debug symbols. This will make the package smaller if you intend on installing MZX in app form. | --enable-release ---------- Removes debug symbols. This will make the package smaller if you intend on installing MZX in app form. | ||
--prefix /opt/local ---------- | --prefix /opt/local ---------- Mandatory if you're using MacPorts; omit otherwise. | ||
Make options: | Make options: |
Revision as of 20:17, 17 June 2012
Compiling any MegaZeux 2.8x source requires a POSIX compatible shell (bash, dash) to be installed. Download the source .tar.bz2 or .tar.xz and extract it to a new folder.
Building
supo apt-get install libsdl1.2-dev libogg-dev libvorbis-dev libpng-dev
Download our dependencies.
./config.sh
This will give you help about how to configure MegaZeux.
./config.sh --platform unix
To configure the sources. On OS X, the platform is "darwin", and on win32 the platform is "win32".
make
This will build MegaZeux from sources. If it fails, you probably don't have one of SDL, libvorbis, libogg, libpng, zlib or the corresponding dev packages installed.
make install
This will install MegaZeux to the system. Do not use for the "unix-devel" platform, which is intended to run straight out of the source directory.
Please see debian/README for more information.
Mac OS X
You will need to install XCode and optionally MacPorts before continuing.
NOTE: Using MacPorts is not acceptable for official releases! Use it for personal builds only.
Determine the name of your compiler before continuing; typing 'i686-' or 'powerpc-' and pressing tab twice should be sufficient. Example output:
i686-apple-darwin10-g++-4.2.1 i686-apple-darwin10-gcc-4.2.1
Compile/install dependencies. If you're using MacPorts:
sudo port install libsdl libogg libvorbis libpng
Navigate to the extracted source directory. If you're building MZX 2.84 and under, please download this updated Makefile.in and put it in arch/darwin/, otherwise MegaZeux will fail to compile.
Run ./config.sh. Consider the following flags:
--platform darwin ---------- Mandatory. --disable-x11 ---------- Also mandatory. --disable-utils ---------- This disables compilation of utilities such as downver and checkres. This is optional. --enable-release ---------- Removes debug symbols. This will make the package smaller if you intend on installing MZX in app form. --prefix /opt/local ---------- Mandatory if you're using MacPorts; omit otherwise.
Make options:
ARCH={ your architecture: i686, amd64, ppc, or ppc64 } CROSS_COMPILE_{ X86 or PPC }_CC={ name of your gcc compiler} CROSS_COMPILE_{ X86 or PPC }_CXX={ name of your g++ compiler}
Run make:
make ARCH=i686 CROSS_COMPILE_X86_CC=i686-apple-darwin10-gcc-4.2.1 CROSS_COMPILE_X86_CXX=i686-apple-darwin10-g++-4.2.1
Hopefully nothing will go wrong! :)
Packaging
Mac OS X
Make sure there is not a "MegaZeux" volume mounted before continuing.
rm -r build/ make lipo make archive
A .dmg will appear in build/arch/darwin/. Please refer to the documentation in arch/darwin/ for more details.