Update build instructions for brew and libpng instead of SDL_image

This commit is contained in:
Michael Martin
2019-08-10 15:22:01 -07:00
parent fa32c80258
commit 00365dd5b7
2 changed files with 23 additions and 62 deletions
+4 -5
View File
@@ -39,11 +39,10 @@ SDL v1.2
Download: http://www.libsdl.org/download-1.2.php Download: http://www.libsdl.org/download-1.2.php
Debian package: libsdl1.2-dev (and various runtime debs) Debian package: libsdl1.2-dev (and various runtime debs)
SDL_image libpng
An image loading library used with SDL. An image loading library.
Homepage: http://www.libsdl.org/projects/SDL_image/ Homepage: http://www.libpng.org/pub/png/libpng.html
Download: http://www.libsdl.org/projects/SDL_image/release/ Debian packages: libpng-devxs
Debian packages: libsdl-image1.2 libsdl-image1.2-dev
OpenAL (optional) OpenAL (optional)
A cross-platform spatialized audio library. A cross-platform spatialized audio library.
+19 -57
View File
@@ -1,66 +1,28 @@
BUILDING THE UR-QUAN MASTERS ON MAC OS X BUILDING THE UR-QUAN MASTERS ON MAC OS X
You'll need a number of libraries to build it. All are available Starting with 0.7.1, The Ur-Quan Masters will build and run when
online: linked against the libraries provided by brew (https://brew.sh).
SDL: http://www.libsdl.org/download-1.2.php To install the necessary prerequisite libraries, run this command:
Only the Runtime is truly necessary, but the devel extras are nice.
SDL_image: http://www.libsdl.org/projects/SDL_image/ brew install sdl libpng libogg libvorbis
The last version of stock framework that can be used is v1.2.7.
Starting with v1.2.8, the stock framework uses ImageIO by default to
load PNG files, which strips out the PNG palettes. Later versions will
work if you build your own copy that defines
SDL_IMAGE_USE_COMMON_BACKEND.
Ogg Vorbis: http://www.xiph.org/downloads/
Theoretically optional, but necessary if you're using the 3DO music
or voices. You'll need libogg, libvorbis, and libvorbisfile. The last
two are part of the Vorbis framework.
PREPARING THE LIBRARIES
For SDL and SDL_image:
- Install the SDL and SDL_image frameworks in /Library/Frameworks as
instructed in the files. The SDL-devel extras go in their own
place, as noted in the instructions.
Unzip the libogg and libvorbis archives somewhere convenient.
For libogg:
- Go to the macosx directory, open the xcodeproj.
- Open Project->Project Settings and set the Configuration to
"Release". Ensure the Architecture is set to "i386 x86_64".
- If there are no errors, the Ogg.framework file should have turned
from red to black. Control-click it, choose "reveal in finder".
- Copy Ogg.framework to /Library/Frameworks.
For libvorbis:
- Same procedure as libogg.
To build: To build:
- Run ./build.sh in the sc2/ directory and choose your configuration - Run `./build.sh uqm` in the sc2/ directory and choose your
options. The only truly important one is to use Included MikMod configuration options. The only truly important one is to use
instead of System MikMod. Included MikMod instead of System MikMod.
- If the build fails because SDL_include.h has errors, run
./build.sh uqm clean
then
CFLAGS="-I/Library/Frameworks/SDL.framework/Headers" ./build.sh uqm config
You'll need to set that CFLAGS in that manner each time you
reconfig, but not each time you rebuild. (So, every time you clean,
you'll need to reset that CFLAGS.)
- If it builds without errors (last line is LINK uqm or LINK - If it builds without errors (last line is LINK uqm or LINK
uqm-debug), ./build.sh uqm install to build the .app. uqm-debug), `./build.sh uqm install` will build a .app file you can
run from the build directory.
- The .app that is built will link against the frameworks in Be aware that the .app file built by this procedure still links
/Library/Frameworks. To produce a distributable image you will need against brew's versions of the libraries in their install locations,
to move the libraries into place inside the app bundle and fix up and will not run on other Macs unless they also have brew installed
any linkage of names. build/unix_installer/copy_mac_frameworks.pl with the relevant packages. To make a standalone build you will need
should do the hard work for you, but you may need to edit the to build against frameworks that are properly configured to work as
patterns it edits depending on the precise details of the computer part of an app bundle and then package them with the result. The
you are building on. build/unix_installer/copy_mac_frameworks.pl script automates some of
this work, but it's not particularly user-friendly or part of a
conveniently automatable script system yet. That level of support is
forthcoming.