Alice R ec391ffced Fix typo in darwin README | vor 6 Jahren | |
---|---|---|
.. | ||
MZXRun.plist | vor 14 Jahren | |
Makefile.in | vor 6 Jahren | |
MegaZeux.plist | vor 14 Jahren | |
README.md | vor 6 Jahren | |
dmg.sh | vor 6 Jahren | |
lipo.sh | vor 14 Jahren |
If you are building on the Darwin 10 platform (OS 10.6 or higher) you can build MegaZeux without using Xcode by following the instructions in this file. This process has been superceded by the Xcode project folder (arch/xcode) for all Intel Mac builds, but is still required to create PowerPC builds.
Xcode 3.2.6 is assumed to be installed, but older versions may work. Xcode 4.x and later remove the PowerPC compilers, however, so they are not suited to creating PowerPC builds.
Make sure i686-apple-darwin10-gcc
and/or powerpc-apple-darwin10-gcc
exist
in your /usr/bin
folder or create them with the following commands:
cd /usr/bin
sudo ln -s i686-apple-darwin10-gcc-4.2.1 i686-apple-darwin10-gcc
sudo ln -s powerpc-apple-darwin10-gcc-4.2.1 powerpc-apple-darwin10-gcc
You must build static library versions of zlib, libpng, libogg, libvorbis, and SDL 1.2 (SDL 2 is not supported for these platforms). These libraries must be installed to a common prefix. The following commands to `configure' are recommended:
CHOST="i686-apple-darwin10" \
CFLAGS="-O2 -mmacosx-version-min=10.6" \
./configure \
--prefix=[YOUR PREFIX HERE]/i686 \
-static
CHOST="powerpc-apple-darwin10" \
CFLAGS="-O2 -mmacosx-version-min=10.4" \
./configure \
--prefix=[YOUR PREFIX HERE]/ppc \
-static
CFLAGS="-O2 -mmacosx-version-min=10.6" \
./configure \
--prefix=[YOUR PREFIX HERE]/i686 \
--disable-shared \
--enable-static \
--build=i686-apple-darwin10 \
--host=i686-apple-darwin10
CFLAGS="-O2 -mmacosx-version-min=10.4" \
./configure \
--prefix=[YOUR PREFIX HERE]/ppc \
--disable-shared \
--enable-static \
--build=powerpc-apple-darwin10 \
--host=powerpc-apple-darwin10
Similarly, AMD64 and PPC64 sets of dependencies can be produced, but are probably not necessary.
Use the following config.sh setup to prepare darwin-dist
. While the utils
can be readily built, they currently are not included:
./config.sh \
--platform darwin-dist \
--disable-libsdl2 \
--disable-utils \
--enable-release
You need Xcode's development tools package to have been installed. This does NOT mean you need all of the Xcode IDE, but you do need the DMG file it is installed from. This is normally included on your OS X install DVD #1. It is enough to install the UNIX tools.
NOTE: Read this section and then the following section before building.
A build for a single arch can be produced using one of the following sequences of commands:
make package ARCH=i686 PREFIX_I686=[YOUR PREFIX HERE]/i686
make distclean
make package ARCH=ppc PREFIX_PPC=[YOUR PREFIX HERE]/ppc
make distclean
These will build the i686/ppc binary and put it in the root as "mzxrun.i686" or "megazeux.ppc" or etc. It will also clean the source tree, which is VERY IMPORTANT.
The instructions above can also be repeated with ARCH=amd64
and ARCH=ppc64
for
64-bit binaries (this may improve performance, but it is not necessary).
The individual builds can then be merged using the following comand:
make lipo
All of the instructions from the previous section can be performed with a single command:
make dist \
PREFIX_I686=[YOUR PREFIX HERE]/i686 \
PREFIX_PPC=[YOUR PREFIX HERE]/ppc
The prefixes you supply (PREFIX_I686
, PREFIX_AMD64
, PREFIX_PPC
, and/or
PREFIX_PPC64
) will determine which binaries are built. After all desired
platforms are built, make lipo
will be run automatically to merge them.
After make dist
(or make lipo
if using the first method), simply do the
following:
make archive
This will output a file to the build/dist/darwin
directory at the top level.
One of these is a redistributable DMG that contains both MegaZeux and MZXRun
applications supporting the architectures you built.