# Cataclysm 0.8 Mac App bundle with Tiles support (and ASCII!)

**URL:** https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486
**Category:** The Lab
**Created:** [October 13, 2013, 12:26pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486 "2013-10-13T12:26:51Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![daD](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@daD](https://discourse.cataclysmdda.org/u/daD)
#### Post date: [October 13, 2013, 12:26pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/1 "2013-10-13T12:26:51Z")

</div>

Hi chaps, i successfully compiled Cataclysm 0.8 for Mac (since official release is broken), and put it as an App bundle (with SDL libs inside so you don’t have to do anything, just launch the app).

By default it launches SDL version with tiles but you can modify this behaviour to launch ncurses version with terminal emulator (i recommend [iTerm2](http://www.iterm2.com) but default is Mac Terminal) if you edit [tt]Cataclysm.app/Contents/Resources/cataclysm-launcher[/tt] file, it has all instrucions inside!

Enjoy!

[center][[size=18pt]DOWNLOAD[/size]](http://www.mediafire.com/download/0nhhmhc6313qube/CataclysmDDA.0.8.Stable.SDL.Mac.zip)[/center]

---

<div class="post-metadata">

### Author: ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)
#### Post date: [October 13, 2013, 6:48pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/2 "2013-10-13T18:48:10Z")

</div>

Sweet! If this ends up working properly would you mind us linking to it on the front page as the official mac build? Also just checking since this seems to run kinda slow, but did you remember to do -03?

---

<div class="post-metadata">

### Author: ![daD](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@daD](https://discourse.cataclysmdda.org/u/daD)
#### Post date: [October 13, 2013, 9:27pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/3 "2013-10-13T21:27:23Z")

</div>

i compiled with RELEASE=1, unless makefile is broken this compile should be fine. But i’ve also noticed that SDL version is running a little slow =/

Sure, post it on MP, i’d be only glad 😃

UPDATE: I’ve double checked - yes, it’s compiled with -O3. I’ll try to update gcc to 4.8 release (from 4.2), might work better, no?

---

<div class="post-metadata">

### Author: ![Sloot](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Sloot](https://discourse.cataclysmdda.org/u/Sloot)
#### Post date: [October 16, 2013, 12:05am UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/4 "2013-10-16T00:05:54Z")

</div>

Crashes on me as soon as I try to drive anything. Thanks for putting this together but the idea of Cata without cars just makes me deeply sad. Everything else seemed fine though.

---

<div class="post-metadata">

### Author: ![daD](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@daD](https://discourse.cataclysmdda.org/u/daD)
#### Post date: [October 16, 2013, 3:56pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/5 "2013-10-16T15:56:45Z")

</div>

Update: Now i use stable version from 0.8 branch (previous was experimental, and seems some things were broken) compiled and merged SDL, and main game was compiled with gcc 4.9. Feels and runs a bit faster than previous release.

Updated link in the first post and here - [http://www.mediafire.com/download/0nhhmhc6313qube/CataclysmDDA.0.8.Stable.SDL.Mac.zip](http://www.mediafire.com/download/0nhhmhc6313qube/CataclysmDDA.0.8.Stable.SDL.Mac.zip)

---

<div class="post-metadata">

### Author: ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)
#### Post date: [October 17, 2013, 12:24am UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/6 "2013-10-17T00:24:53Z")

</div>

Nice. Now do you want to do us a really big favor? COuld you go to the [how to compile](http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile#Mac) page on the wiki and write down detailed steps of exactly what you need to do to compile your own version of this? One of the problems with having a transient dev base is that we can lose information if it’s not stored in an accessible place when someone leaves (and in fact was one of the reasons why this whole mac fiasco happened in the first place) and we would feel much better if we knew the exact steps to replicate if something horrible were to happen to you (which hopefully never does, but better safe then sorry :P).

---

<div class="post-metadata">

### Author: ![daD](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@daD](https://discourse.cataclysmdda.org/u/daD)
#### Post date: [October 17, 2013, 12:43pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/7 "2013-10-17T12:43:35Z")

</div>

COMPILING\_osx.md has all the basic instructions, there has to be just a few additional steps if you use [homebrew](http://brew.sh/) package manager (witch is the one every Mac dev/power user should use).

Here is updated instructions:

[tt]

# Building Cataclysm-DDA on Mac OS X

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/](https://developer.apple.com/downloads/)) and Homebrew package manager.

### SDL

SDL, SDL\_image, and SDL\_ttf are needed for the tiles build.

Option (1):  
[**SDL framework**](http://www.libsdl.org/download-1.2.php)  
[http://www.libsdl.org/release/SDL-1.2.15.dmg](http://www.libsdl.org/release/SDL-1.2.15.dmg)

[**SDL\_image framework**](http://www.libsdl.org/projects/SDL_image/)  
[http://www.libsdl.org/projects/SDL\_image/release/SDL\_image-1.2.12.dmg](http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.dmg)

[**SDL\_ttf framework**](http://www.libsdl.org/projects/SDL_ttf/)  
[http://www.libsdl.org/projects/SDL\_ttf/release/SDL\_ttf-2.0.11.dmg](http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.dmg)

Copy `SDL.framework`, `SDL_image.framework`, and `SDL_ttf.framework`  
to `/Library/Frameworks` or `/Users/name/Library/Frameworks`.

Option (2):  
Alternately, shared libraries (libsdl, libsdl\_image, libsdl\_ttf) can be used  
instead of frameworks. Install with a package manager (Fink, MacPorts,  
Homebrew, pkgsrc) or build and install from source.

For Homebrew:  
`brew install sdl sdl_image sdl_ttf`

### ncurses, gettext

ncurses and gettext are needed for localization.  
Install with a package manager, or build from source and install.

- ncurses needs wide character support enabled.

For Homebrew:  
`brew tap homebrew/dupes`  
`brew install gettext ncurses`  
`brew link --force gettext ncurses`

- 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.

### Example builds:

Build a release version with SDL graphical tiles:

```
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 RELEASE=1 TILES=1 LOCALIZE=0

```

Build SDL version with shared libraries:

```
$ make NATIVE=osx OSX_MIN=10.6 RELEASE=1 TILES=1 LOCALIZE=0

```

Build a release console version without localization:

```
$ make NATIVE=osx OSX_MIN=10.6 RELEASE=1 LOCALIZE=0

```

Build a debug version with SDL ASCII:

```
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 SDL=1 LOCALIZE=0

```

## Run

```
$ ./cataclysm

```

or

```
$ ./cataclysm-tiles

```

### Make Options

`FRAMEWORK=1` use frameworks; omit to use libsdl, libsdl\_image, libsdl\_ttf.

`LOCALIZED=0` disable localization; enabled by default (requires gettext and ncurses with wide character support).

`NATIVE=osx` build for OS X.

`OSX_MIN=version` set `-mmacosx-version-min=` (for OS X \> 10.5 set it to 10.6 or higher); omit for 10.5.

`RELEASE=1` build an optimized ‘release’ version.

`SDL=1` build the SDL version with ASCII characters.

`TILES=1` build the SDL version with graphical tiles.

### Application bundle packaging:

Create new folder and name it `Cataclysm.app`.

Put compiled binaries (`./cataclysm-tiles` and/or `./cataclysm`) with `./gfx/` and `./data/` folders inside `/Cataclysm.app/Contents/Resources/`.

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/`.

Create folder `/Cataclysm.app/Contents/MacOS` and file ./Cataclysm within it with this content:

#!/bin/sh  
PWD=`dirname "${0}"`  
OSREV=`uname -r | cut -d. -f1`  
if [“$OSREV” -ge 11] ; then  
export DYLD\_LIBRARY\_PATH=${PWD}/…/Resources/libs  
export DYLD\_FRAMEWORK\_PATH=${PWD}/…/Resources/libs  
else  
export DYLD\_FALLBACK\_LIBRARY\_PATH=${PWD}/…/Resources/libs  
export DYLD\_FALLBACK\_FRAMEWORK\_PATH=${PWD}/…/Resources/libs  
fi  
cd “${PWD}/…/Resources/”; ./cataclysm-tiles

// TODO: Write Applescript with version selector and Terminal/iTerm launcher for curses version.[/tt]

Don’t put code tags in spoilers, yo. -The MGMT, GlyphGryph

---

<div class="post-metadata">

### Author: ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)
#### Post date: [October 17, 2013, 9:19pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/8 "2013-10-17T21:19:35Z")

</div>

You might want to edit that post to not use both the code and spoiler tags, when you use them both together they end up breaking horribly. The code tags will automatically shorten it to a reasonable length, so those should be enough.

---

<div class="post-metadata">

### Author: ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)
#### Post date: [October 17, 2013, 9:29pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/9 "2013-10-17T21:29:00Z")

</div>

Or you could just use the [tt] tags. Which is what I did to go in and fix it.

I really should dive in and fix the stupid broken css for the code tags. Unrelated to this thread though, I’ll stop tangentiating!

---

<div class="post-metadata">

### Author: ![phaethon](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/phaethon/32/981_2.png) [@phaethon](https://discourse.cataclysmdda.org/u/phaethon)
#### Post date: [October 18, 2013, 2:25am UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/10 "2013-10-18T02:25:58Z")

</div>

Thank you for the great instructions! We’ve needed to package this as an app for a while, but I for one haven’t done that before.

---

<div class="post-metadata">

### Author: ![daD](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@daD](https://discourse.cataclysmdda.org/u/daD)
#### Post date: [October 18, 2013, 11:15am UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/11 "2013-10-18T11:15:42Z")

</div>

Guys, switch links on the main page for the new build pls. Its build from the stable branch.

---

<div class="post-metadata">

### Author: ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)
#### Post date: [October 18, 2013, 4:05pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-0-8-mac-app-bundle-with-tiles-support-and-ascii/3486/12 "2013-10-18T16:05:32Z")

</div>

Will do it when I get home tonight.
