1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
Adonthell on MacOS X
This file contains additional information for compiling Adonthell
under MacOS X. For general compilation instructions refer to the
INSTALL file. Even more details are found within the NEWBIE file.
Preparations:
=============
Install the Developer command line tools or XCode from
http://developer.apple.com/macosx/
or the App Store.
If you plan to create a proper application bundle for Adonthell, it is
advised to install all the required dependencies under /usr/local. If
this folder does not exist yet, you should create it now.
Open the terminal and type
sudo mkdir /usr/local/
Before installing any dependencies, you should also consider which
version of OSX to target. By default, this will be the version you
build it on (and likely newer versions). If support for older versions
are desired, this can be achieved via the MACOSX_DEPLOYMENT_TARGET
environment variable. E.g.
export MACOSX_DEPLOYMENT_TARGET=10.6
Due to limitations of recent SDL2 versions, the minimum supported
target as of June 2016 is OSX 10.6 Snow Leopard and may be higher in
the future. Use an older version of SDL2, if this proves to be an
issue.
Now you can go about installing all the dependencies listed in the
INSTALL file. Extract each archive, cd into the respective directory
and run the usual commands
./configure
make
sudo make install
Please refer to the documentation of each library for more detailed
instructions.
Note that for the official OSX binaries, the following configure
options were used instead of the default
Freetype : ./configure --with-png=no --with-bzip2=no
SDL2 : ./configure --without-x
SDL2_mixer : ./configure --disable-music-ogg-shared
Compiling Adonthell:
====================
After all libraries have been installed successfully, it just takes
another
./configure
make
sudo make install
to compile and install Adonthell locally. Repeat the same steps for
the Waste's Edge data and you are done. You can now launch Adonthell
by typing
/usr/local/bin/adonthell-0.3 wastesedge
Creating a .App bundle:
=======================
If you'd rather create nice bundle that can be placed into your Applications
folder, you can use the included make_osx_bundle.sh scripts instead of manually
compiling Adonthell and Waste's Edge. However, make sure all prerequisite
libraries are still installed under /usr/local.
Now, in the adonthell-0.3.x directory, run
./make_osx_bundle.sh
If all goes well, it should configure, build and install Adonthell into
Adonthell.app and copy and prepare all the required libs from /usr/local.
All that is mising now in the bundle is the actual game data.
Change into the wastesedge-0.3.x directory and run
./make_osx_bundle.sh ../adonthell-0.3.x/Adonthell.app
(adjusting the location to the bundle as needed). This will configure,
build and install Waste's Edge into the Adonthell.app bundle, making it
ready to use.
Codesigning and creating a disk image:
======================================
In order to distribute the app bundle created above, the usual way on OSX is
to package everything into a disk image (.dmg). In order to automate this, the
make_dmg.sh in the osx/ directory can be used. This also contains the required
commands to sign the bundle and resulting image, provided a suitable certificate
is present in your keychain. Signing of the image itself requires OSX 10.11.4 or
newer.
Creating of the disk image requires the dmgbuild Python module, available from
https://pypi.python.org/pypi/dmgbuild
Download, extract, then install by running
python setup.py install --user
In case installation fails because of conflicting pyobjc system packages, update
those by running before repeating the installation
sudo env CC=clang easy_install -U pyobjc-core
In order to enable code signing, set the environment variable CODESIGN_IDENTITY
to the name of the certificate, as shown by the Keychain Access.app, i.e.:
export CODESIGN_IDENTITY="<certificate name>"
Now change into the wastesedge-0.3.x/osx directory and run
./make_dmg.sh ../../adonthell-0.3.x/Adonthell.app
|