diff --git a/sc2/INSTALL b/sc2/INSTALL index 8132f3314..4f4d3288f 100644 --- a/sc2/INSTALL +++ b/sc2/INSTALL @@ -39,11 +39,10 @@ SDL v1.2 Download: http://www.libsdl.org/download-1.2.php Debian package: libsdl1.2-dev (and various runtime debs) -SDL_image - An image loading library used with SDL. - Homepage: http://www.libsdl.org/projects/SDL_image/ - Download: http://www.libsdl.org/projects/SDL_image/release/ - Debian packages: libsdl-image1.2 libsdl-image1.2-dev +libpng + An image loading library. + Homepage: http://www.libpng.org/pub/png/libpng.html + Debian packages: libpng-devxs OpenAL (optional) A cross-platform spatialized audio library. diff --git a/sc2/INSTALL.macosx b/sc2/INSTALL.macosx index 8d441f009..c9c05e8a9 100644 --- a/sc2/INSTALL.macosx +++ b/sc2/INSTALL.macosx @@ -1,66 +1,28 @@ BUILDING THE UR-QUAN MASTERS ON MAC OS X -You'll need a number of libraries to build it. All are available -online: +Starting with 0.7.1, The Ur-Quan Masters will build and run when +linked against the libraries provided by brew (https://brew.sh). -SDL: http://www.libsdl.org/download-1.2.php -Only the Runtime is truly necessary, but the devel extras are nice. +To install the necessary prerequisite libraries, run this command: -SDL_image: http://www.libsdl.org/projects/SDL_image/ -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. + brew install sdl libpng libogg libvorbis To build: -- Run ./build.sh in the sc2/ directory and choose your configuration - options. The only truly important one is to use 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.) +- Run `./build.sh uqm` in the sc2/ directory and choose your + configuration options. The only truly important one is to use + Included MikMod instead of System MikMod. - 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 - /Library/Frameworks. To produce a distributable image you will need - to move the libraries into place inside the app bundle and fix up - any linkage of names. build/unix_installer/copy_mac_frameworks.pl - should do the hard work for you, but you may need to edit the - patterns it edits depending on the precise details of the computer - you are building on. +Be aware that the .app file built by this procedure still links +against brew's versions of the libraries in their install locations, +and will not run on other Macs unless they also have brew installed +with the relevant packages. To make a standalone build you will need +to build against frameworks that are properly configured to work as +part of an app bundle and then package them with the result. The +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.