You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COMPILING_osx.md
+71-17Lines changed: 71 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,13 @@
1
1
# Building Cataclysm-DDA on Mac OS X
2
2
3
-
Tested with OS X 10.8.4, Xcode 4.6.2.
4
-
I haven't played it extensively but it builds and runs.
3
+
To build Cataclysm on Mac you'll have to get XCode with command line tools (or just download them separately from https://developer.apple.com/downloads/) and Homebrew package manager.
5
4
6
-
Not sure if it compiles with older OS/XCode versions.
7
-
This worked for me, your mileage may vary.
8
5
9
6
### SDL
10
7
11
8
SDL, SDL\_image, and SDL\_ttf are needed for the tiles build.
This adds paths to find shared libraries outside of /usr and /usr/local.
49
-
Multiple `-I/...` or `-L/...` paths can be specified.
43
+
* After you build Cataclysm remember to unlink gettext and ncurses with `brew unlink gettext ncurses` if you build other software, it might conflict with OSX versions.
50
44
51
45
### Example builds:
52
46
53
47
Build a release version with SDL graphical tiles:
54
48
55
49
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 RELEASE=1 TILES=1 LOCALIZE=0
56
50
51
+
Build SDL version with shared libraries:
52
+
53
+
$ make NATIVE=osx OSX_MIN=10.6 RELEASE=1 TILES=1 LOCALIZE=0
54
+
55
+
Build a release console version without localization:
56
+
57
+
$ make NATIVE=osx OSX_MIN=10.6 RELEASE=1 LOCALIZE=0
58
+
57
59
Build a debug version with SDL ASCII:
58
60
59
61
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 SDL=1 LOCALIZE=0
60
62
63
+
64
+
61
65
## Run
62
66
63
67
$ ./cataclysm
@@ -81,3 +85,53 @@ or
81
85
`SDL=1` build the SDL version with ASCII characters.
82
86
83
87
`TILES=1` build the SDL version with graphical tiles.
88
+
89
+
### Application bundle packaging:
90
+
91
+
Create new folder and name it `Cataclysm.app`.
92
+
93
+
Put compiled binaries (`./cataclysm-tiles` and/or `./cataclysm`) with `./gfx/` and `./data/` folders inside `/Cataclysm.app/Contents/Resources/`.
94
+
95
+
To bundle SDL libs copy `SDL.framework`, `SDL_image.framework`, and `SDL_ttf.framework` to `/Cataclysm.app/Contents/Resources/libs/` or shared libs homebrew installed from `/usr/local/Cellar/sdl*/version/lib/`.
96
+
97
+
Create folder `/Cataclysm.app/Contents/MacOS` and file ./Cataclysm within it with this content:
ISSUE: crash on startup due to libint.8.dylib aborting
129
+
130
+
Basically if you're compiling on Mountain Lion or above, it won't be possible to run successfully on older OS X versions due to libint.8 / pthreads version issue.
131
+
132
+
See below (quoted form https://wiki.gnome.org/GTK+/OSX/Building)
133
+
134
+
"There's another issue with building on Lion or Mountain Lion using either "native" or the 10.7 SDK: Apple has updated the pthreads implementation to provide recursive locking. This would be good except that Gettext's libintl uses this and if the pthreads implementation doesn't provide it it fabricates its own. Since the Lion pthreads does provide it, libintl links the provided function and then crashes when you try to run it against an older version of the library. The simplest solution is to specify the 10.6 SDK when building on Lion, but that won't work on Mountain Lion, which doesn't include it. See below for how to install and use XCode 3 on Lion and later for building applications compatible with earlier versions of OSX."
135
+
136
+
Workaround: install XCode 3 like that article describes, or disable localization support in Cataclysm so gettext/libint are not dependencies. Or else simply don't support OS X versions below 10.7.
0 commit comments