1 D2DF-SDL for MAC OS X
2 ---------------------
4 Doom 2D Forever ported to Mac OS X 10.4+.
6 Building
7 --------
9 Requirements:
10 * Prebuilded libaries (you can get it from d2df-binlib.git)
11 * OpenDarwin cctools and fpc crosscompiler (if you want to cross compile)
12 * Mac OS X SDK >= 10.4u
13 * genisoimage from cdrkit (if you want to package to dmg)
15 Copy Doom2DF.app.base to Doom2DF.app
16 Copy dynamic libraries to Doom2DF.app/Contents/MacOS
17 Copy game resources to Doom2DF.app/Contents/Resources
19 Build on target machine:
20 ```
21 rm -rf tmp
22 mkdir -p tmp
23 cd ../src/game
24 fpc -g -gl -gs -O3 -dUSE_SDL -dUSE_OPENAL -dUSE_MODPLUG -dUSE_MPG123 \
25 -FU../../macosx/tmp \
26 -FE../../macosx/Doom2DF.app/Contents/MacOS \
27 -Fl../../macosx/Doom2DF.app/Contents/MacOS \
28 -oDoom2DF \
29 Doom2DF.lpr
30 ```
32 Or cross compile:
33 ```
34 rm -rf tmp
35 mkdir -p tmp
36 cd ../src/game
37 ppcrossppc -g -gl -gs -O3 -dUSE_SDL -dUSE_OPENAL -dUSE_MODPLUG -dUSE_MPG123 \
38 -Tdarwin -Xd -XPpowerpc-apple-darwin- \
39 -XR${MACOS_SDK} \
40 -Fu${MACOS_SDK}/usr/lib \
41 -Fu"${MACOSX_BINLIB_STATIC}" \
42 -Fu"${MACOSX_BINLIB_DYNAMIC}" \
43 -FE../../macosx/Doom2DF.app/Contents/MacOS \
44 -FU../../macosx/tmp \
45 -oDoom2DF \
46 Doom2DF.lpr
47 ```
49 Than fix library paths:
50 ```
51 powerpc-apple-darwin-install_name_tool -change \
52 /usr/local/lib/libSDL-1.2.0.dylib @executable_path/libSDL-1.2.0.dylib \
53 ../../macosx/Doom2DF.app/Contents/MacOS/Doom2DF
54 powerpc-apple-darwin-install_name_tool -change \
55 /usr/local/lib/libmodplug.1.dylib @executable_path/libmodplug.1.dylib \
56 ../../macosx/Doom2DF.app/Contents/MacOS/Doom2DF
57 powerpc-apple-darwin-install_name_tool -change \
58 /usr/local/lib/libmpg123.0.dylib @executable_path/libmpg123.0.dylib \
59 ../../macosx/Doom2DF.app/Contents/MacOS/Doom2DF
60 powerpc-apple-darwin-install_name_tool -change \
61 /usr/local/lib/libenet.7.dylib @executable_path/libenet.7.dylib \
62 ../../macosx/Doom2DF.app/Contents/MacOS/Doom2DF
63 ```
65 Make Apple DMG:
66 ```
67 mkdir -p Doom2DF.root
68 cp -r Doom2DF.app Doom2DF.root
69 genisoimage -D -V "Doom 2D Forever" -no-pad -r -apple -file-mode 0555 \
70 -o Doom2DF.dmg Doom2DF.root
71 ```