# Downloading and Running the game

**URL:** https://discourse.cataclysmdda.org/t/downloading-and-running-the-game/33
**Category:** The Garage
**Created:** [January 2, 2013, 2:32am UTC](https://discourse.cataclysmdda.org/t/downloading-and-running-the-game/33 "2013-01-02T02:32:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![The\_Darkling\_Wolf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/the_darkling_wolf/32/828_2.png) [@The\_Darkling\_Wolf](https://discourse.cataclysmdda.org/u/The_Darkling_Wolf)
#### Post date: [January 2, 2013, 2:32am UTC](https://discourse.cataclysmdda.org/t/downloading-and-running-the-game/33/1 "2013-01-02T02:32:15Z")

</div>

[size=36pt]Windows[/size]  
There are a few ways to run Cataclysm in windows.

[size=14pt]Code::Blocks Method[/size]  
Grab the [Code::Blocks MinGW package](http://www.codeblocks.org/downloads/26) and install it.  
Download the source using git, or just download the zip from [here](https://github.com/CleverRaven/Cataclysm-DDA/archive/master.zip)  
Unzip the archive somewhere and open it, doubleclick on CataclysmWin.cbp to open it up in CodeBlocks and then hit the compile button.

[size=14pt]Cygwin Method[/size]  
Start off by downloading cygwin from [the official site](http://www.cygwin.com/)  
Follow the download instructions on the site, and select all of the following packages when prompted to:  
make  
G++  
libncurses-dev  
libncursesw-dev  
git

Once it’s finished installing, run the program which should open a terminal window, from there, type

```auto

```

Wait for it to finish downloading, then type `cd Cataclysm-DDA`, once in the folder type `make`, at this point, Cataclysm should begin compiling. Once it finishes compiling, type `./cataclysm` in order to run it.

Note: In order to run Cataclysm in the future, you need to open Cygwin, type `cd Cataclysm-DDA` and type `./cataclysm`.

To update, simply open the folder and type `git pull` then `Make clean` and `make`

[size=14pt]MinGW&Msys Method[/size]  
To start, you’ll need the MinGW+MSYS bundle. Get it here: [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/](http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/)  
Afterwards, grab the source from [https://github.com/CleverRaven/Cataclysm-DDA](https://github.com/CleverRaven/Cataclysm-DDA) and unpack in somewhere.

Now, you’ll need to make a small edit. In the source code’s directory, open up “Makefile.Windows” in Notepad or something and change this:  
“CXX = i486-mingw32-g++” to “CXX = g++”.  
(Warning though, MS Notepad is shit and will jumble up the lines. It might even corrupt the makefile. Advanced editors like Notepad++ are recommended, but don’t use word processors like MS Word.)

Run the MinGW shell, navigate to the code directory and type “make -f makefile.windows”. Executable will be in that directory.  
Run and play afterwards! (To redistribute, you only need the data folder and executable.)

[size=36pt]Linux[/size]  
First, open the terminal. On Ubuntu, it is accessible under Applications / Accessories.  
Now, let’s install the dependencies we’ll need. It may ask you to type in your password or Y to confirm. Do it and continue.

“sudo apt-get install libncurses5-dev libncursesw5-dev g++ git-core”

This is it. Now to pull the source. You’re likely in your “home” or “root” directory in the terminal. You can use “ls” to list the directories and “cd” to move into them.  
Once you are where you want the source to be, type “git clone git://github.com/CleverRaven/Cataclysm-DDA.git”. This’ll make a directory called Cataclysm-DDA and pull the source into it. It might take a while.

Type “cd Cataclysm-DDA” to move into the directory. Now type “make” to compile it. If it fails, try “make clean”.

If it works, try running the game with “./cataclysm”. If that also works, you’re ready to mod.

To update the game, move into the game directory and write “git pull”. Afterwards, type “make clean” (which clears all object files and such) and “make”. There, updated!

[size=36pt]Mac[/size]  
Note: Mac is the least supported platform, due to almost nobody owning one. Still, it seems it’s pretty much solid, some errors notwithstanding.

[quote=“Riesen”]Got a Mac build to successfully compile. I can also tell you how to fix the player\_activity issue… and the strlen segfault (at least in some cases).

First off. Assuming you’ve got all the source code and everything, and you’re trying to compile, and you get errors along the lines of:

```auto
error: no matching function for call to `player_activity::player_activity(player_activity)'
note: candidates are: player_activity::player_activity(player_activity&)
```

This is due to non-const copy constructors (see [http://stackoverflow.com/questions/9622089/g-and-non-const-copy-constructor-issue](http://stackoverflow.com/questions/9622089/g-and-non-const-copy-constructor-issue)), which some C++ compilers just kludge for you with auto pointer magic… and others don’t (like recent XCode GCC). But either way, the copy constructor doesn’t actually modify the original in any way, so you might as well go fix the code to how it should be anyway, changing

```auto

```

…to…

```auto

```

You’ll also need to fix:

```auto

```

…to…

```auto

```

The next one took me an hour to figure out. The segfault in strlen? Everything in setvector.cpp takes a variable number of arguments… and in teasing apart those arguments with va\_arg() calls, it assumes that the size of a pointer is always ‘int’ on your platform. (And when you trace the error in gdb… come on, people, post the output of ‘info stack’ too, the actual error info by itself is useless!) Sometimes pointers are int-sized… but it’s not guaranteed, and on x86\_64 systems this will be… um… less-likely to happen.

Anyway, on my OS/X 10.8 platform, I just bypassed having to fix everything by just forcing a 32-bit executable, and got a game that launched and works great (so far):

```auto

```

Worked great for me, but I’m not sure that’d work for everybody on all platforms. If it doesn’t… well, you could also fix every incorrect va\_arg call in the program (should need 13 corrections in setvector.cpp and one in trapdef.h to be totally correct). I thought about doing this, but A: I’m lazy, and B: I was worried that there were lots of other pointer-size assumptions hidden throughout the game elsewhere, things that will cause it to blow up in random places at weird-ass times. Since adding the -m32 compile-time argument seemed to have enforced int-sized pointers… well, it kinda takes care of that potential cropping up anywhere.

Hope this helps! My two hours of research (and dredging up what I remember of C++ from years ago) boils down to three quick changes to three lines and should save some time for some of you. =)[/quote]

Mac OS doesn’t have apt-get, so you’ll need something like [Fink](http://www.finkproject.org/) or [MacPorts](http://www.macports.org/) to get that.  
Other than that, the setup is pretty much the same as with Linux.

Now, let’s install the dependencies we’ll need. It may ask you to type in your password or Y to confirm. Do it and continue.

“sudo apt-get install libncurses5-dev libncursesw5-dev g++ git-core”

This is it. Now to pull the source. You’re likely in your “home” or “root” directory in the terminal. You can use “ls” to list the directories and “cd” to move into them.  
Once you are where you want the source to be, type “git clone git://github.com/CleverRaven/Cataclysm-DDA.git”. This’ll make a directory called Cataclysm-DDA and pull the source into it. It might take a while.

Type “cd Cataclysm-DDA” to move into the directory. Now type “make” to compile it. If it fails, try “make clean”.

If it works, try running the game with “./cataclysm”. If that also works, you’re ready to mod.

Note: Mac OS’s terminal is normally set to 8-bit colors. Set it to 16-bit colors to get the colors needed for Cataclysm.  
An alternative may be to check the “display bright colours for bold text” on in terminal preferences / text tab.

To update the game, move into the game directory and write “git pull”. Afterwards, type “make clean” (which clears all object files and such) and “make”. There, updated!

Thanks to Griffinhart for providing the Cygwin Method, and FunctionZero for providing the other three

Note: These are all pulled from the other forums, so I can’t verify them as working, but I have no reason to believe they won’t.

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [August 12, 2015, 6:45am UTC](https://discourse.cataclysmdda.org/t/downloading-and-running-the-game/33/2 "2015-08-12T06:45:19Z")

</div>

This is out of date, so un-stickying.
