Compiling Doomsday on Mac OS X
Compiling with Xcode
The native Mac OS X version of Doomsday has been built using Xcode 2.1 and gcc 4.0. Using earlier versions of Xcode and gcc may or may not induce crashes and other issues; upgrading to 2.1 is recommended.
Xcode can be downloaded from
Apple's Developer website.
Requirements
You will need the
.frameworks for SDL, SDL_net, and SDL_mixer. These can be downloaded from
http://www.libsdl.org/. You will also find the frameworks inside the binary Mac OS X Doomsday distribution packages, although I haven't ascertained if they contain all the needed files.
The Xcode project file
Doomsday.xcodeproj
can be found the deng CVS. Note that the project is in Xcode 2's format, not the old
.xcode
format.
After you have checked out a copy of the sources, correct the paths of the linked SDL frameworks. The paths in the CVS version of the project are valid only on my system.
Launching Doomsday from inside Xcode
Running the game from inside Xcode requires a number of command line arguments that tell all the relevant paths to the engine. The following arguments should be helpful:
-
-appdir ..
-
-gl drOpenGL.bundle
-
-game jDoom.bundle
-
-basedir /Users/MyName/Doomsday/
(points to where you have checked out the CVS working copy)
-
-file <your IWAD path>
-
-wnd
(for running in windowed mode; debugging in fullscreen mode can easily lock up your system, requiring a reboot)
UNIX-Style Compilation with Fink (Mac OS X 10.3.5)
The Doomsday UNIX source code package
deng-X.Y.Z.tar.gz can be configured and compiled on Mac OS X, providing the necessary tools and libraries have been installed. At the moment there is no GUI launcher available, so the game has to be started UNIX-style from the command line.
- Get the latest Doomsday source code package.
- The first thing you need to install is Fink. It is a collection of open source UNIX software for Mac OS X.
- Use fink to install autoconf2.5, automake1.7 and libtool14.
- Make sure you have Apple's X11 SDK installed. It is a part of Xcode Tools.
- Download the SDL source code packages from http://www.libsdl.org/. You will need the SDL_net and SDL_mixer libraries in addition to the main SDL library.
- Extract, build, and install SDL, SDL_net, and SDL_mixer. Be sure to use Fink's /sw as the installation prefix (./configure --prefix=/sw) so that the SDL libraries will become a part of your Fink installation.
- Check that you now have sdl-config on your path. It should have been installed as /sw/bin/sdl-config.
- Follow the instructions in Doomsday's Build/COMPILING, with the exception that configure should be run like this (in the Build directory):
../configure CPPFLAGS="-I/usr/X11R6/include -I/sw/include" \
LDFLAGS="-L/sw/lib" --prefix=$HOME/deng
--
JaakkoKeranen - 27 Aug 2004
Discussion
(Jaakko, I'm interested to know who's OGL files you used...when I could get it to compile, the exe would spit out "DD_InitDGL: Rendering DLL libdropengl is incompatible". Giving configure the --withoutopengl and compiling, and using -dedicated -server return "bus error"...)
--
MatthewParsons - 28 Aug 2004
What happens if you try following the steps I've listed above?
The error about an incompatible rendering DLL is caused by missing symbols in the renderer library. Perhaps the library was not built correctly.
AFAICT, I'm using Apple's OpenGL libraries, but the header files are Mesa's (version 4.0.4). This is naturally a temporary solution until everything can be compiled using Apple's OpenGL framework.
The key point is that when you compile SDL yourself from the source package, it will be linked against Apple's OpenGL framework. The SDL packages in Fink are unfortunately out-of-date, and the binary Mac OS X installation from
http://www.libsdl.org/ does not include support for Autoconf. The only option left is to build the SDL libraries yourself. They can easily be installed as a part of Fink's /sw directory hierarchy.
My response to Jaakko
Same error. I purged all the fink SDL packages, though I don't think they were the problem, as SDL was detected just fine during comp. even the first time through. I was mistaken about the OpenGL headers, I was using the same ones you are, I just assumed they were out of date - but apparently Mesa 4.04 is what Apple's shipping w/ their X11 SDK. (Mesa's currently at 6.0x) Interestingly, during one of the steps, it looked like it wasn't finding the smpeg files, though I checked the directory it was looking in, and they were there... It's been a few days since I messed w/ all this, so I'll probably try and delete everything and start over. (I don't know how to force everything to clean and rebuild...) Thanks for the detailed instructions, it's helping me learn...
to top