What sort of setup do I need to get crawl to compile?


Questions, Explanations, Howtos

User avatar

Halls Hopper

Posts: 72

Joined: Wednesday, 5th January 2011, 21:48

Post Saturday, 19th February 2011, 23:52

What sort of setup do I need to get crawl to compile?

I'm interested in writing some patches. While I have a good bit of experience writing C some years ago (these days I mostly use perl and python for my work), I've been reluctant for years in getting involved with crawl development because setting up a C++ compiler on windows has always been a phenomenal pain - or at least it was the last time I tried several years ago. So, how easy would it be to get a compilable version of crawl up and running?

Thanks!
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 20th February 2011, 08:00

Re: What sort of setup do I need to get crawl to compile?

It's quite easy. Follow the instructions in INSTALL.txt which tells you to install msysgit. Also, we've recently switched repository, and some of the doc haven't been updated. So to checkout the source, you have to do:
  Code:
git clone git@gitorious.org:crawl/crawl.git

You might want to read some of the docs in docs/develop too. Notably patch_guide.txt and coding_conventions.txt.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Vestibule Violator

Posts: 1533

Joined: Thursday, 16th December 2010, 20:52

Post Wednesday, 23rd February 2011, 19:51

Re: What sort of setup do I need to get crawl to compile?

You could dual-boot linux which comes with the compiler pre-installed. You can even install linux to a container file on a Windows partition so you don't even need to re-partition / re-format your drive.

Temple Termagant

Posts: 11

Joined: Monday, 10th January 2011, 18:06

Post Thursday, 24th February 2011, 23:36

Re: What sort of setup do I need to get crawl to compile?

In a similar vein -running "make TILES=y" compiles fine in Debian, however the game is exceeding slow. Amping up the values for "tile_update_rate" and "tile_runrest_rate" in tiles_options.txt isn't having any effect. Any advice on how to get a native build running smooth would be much appreciated.

Running "crawl-tiles-0.7.2" Windows version under Wine on the same system, it flies... :?

Thanks.

Temple Termagant

Posts: 11

Joined: Monday, 10th January 2011, 18:06

Post Thursday, 24th February 2011, 23:54

Re: What sort of setup do I need to get crawl to compile?

GermanJoey, under Debian / Ubuntu do this -at least, it works for me. ;-)

Install Git using Synaptic Package Manager. Also make sure you have the "make" package installed.
From a terminal: "sudo apt-get install libpng3 bison libpng12-dev g++ libx11-dev flex". This installs the necessary dependencies.
Then: "git clone git@gitorious.org:crawl/crawl.git". You'll now have a copy of the source in your home folder.
Then go to the "source" directory (using "cd"). Something like: "cd ~/crawl/crawl-ref/source"
Then: "make" and hit return. This will compile crawl. Type "make TILES=y" for a tiles build.

Just (stone) soupy slow for me.

Edit: I neglected to read you said Windows, that'll learn me. As Galehar says:

http://gitorious.org/crawl/crawl/blobs/ ... NSTALL.txt
User avatar

Vestibule Violator

Posts: 1533

Joined: Thursday, 16th December 2010, 20:52

Post Friday, 25th February 2011, 05:43

Re: What sort of setup do I need to get crawl to compile?

lk1d wrote:In a similar vein -running "make TILES=y" compiles fine in Debian, however the game is exceeding slow. Amping up the values for "tile_update_rate" and "tile_runrest_rate" in tiles_options.txt isn't having any effect. Any advice on how to get a native build running smooth would be much appreciated.

Running "crawl-tiles-0.7.2" Windows version under Wine on the same system, it flies... :?

Thanks.


It runs fine on my debian-based system (Linux Mint). Sounds like maybe a graphics libraries or driver issue?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 25th February 2011, 11:10

Re: What sort of setup do I need to get crawl to compile?

danr wrote:
lk1d wrote:In a similar vein -running "make TILES=y" compiles fine in Debian, however the game is exceeding slow. Amping up the values for "tile_update_rate" and "tile_runrest_rate" in tiles_options.txt isn't having any effect. Any advice on how to get a native build running smooth would be much appreciated.

Running "crawl-tiles-0.7.2" Windows version under Wine on the same system, it flies... :?

Thanks.


It runs fine on my debian-based system (Linux Mint). Sounds like maybe a graphics libraries or driver issue?

Yes, it does sound like a graphic driver issue. Make sure you have proper drivers installed for your graphic card and that your X server is able to properly do accelerated openGL.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 11

Joined: Monday, 10th January 2011, 18:06

Post Friday, 25th February 2011, 13:04

Re: What sort of setup do I need to get crawl to compile?

Thanks guys, beginning to suspect X myself -it's an older ATI card (X300) and I think that support for it has been removed from the fglrx proprietary driver. If I sort it (before loosing the will to live ;-)) I'll post what it was.
User avatar

Vestibule Violator

Posts: 1533

Joined: Thursday, 16th December 2010, 20:52

Post Friday, 25th February 2011, 17:33

Re: What sort of setup do I need to get crawl to compile?

minmay wrote:For the OP: you don't need to use git if you don't want to. Gitorious lets you download the source in your browser. It's probably less painful to install and learn git if you plan to update often, though.



Thanks, that's good to know. I did finally get the hang of git anyway.

I think this should be added to the crawl.develz.org/trunk page, and possibly the downloads page, just to make it a bit easier for us people who use linux but are not experienced programmers.

Here's a project I might be able to take on - start maintaining a regular trunk build for linux. I don't know what's involved in creating a .deb installer but it would be a good thing for me to learn.

It always seems a bit odd to me that for Windows you can get zips and installers of trunk and stable. For Linux the only thing offered at CDO downloads is the source for stable. If you want trunk you are told to install git etc. Either way you have to compile it yourself (typically this also means installing some more packages as well).

Isn't distributing a trunk tarball / deb package the kind of thing that could be easily automated? How do the regularly updated windows binaries get "regularly updated"?

Temple Termagant

Posts: 11

Joined: Monday, 10th January 2011, 18:06

Post Saturday, 26th February 2011, 14:11

Re: What sort of setup do I need to get crawl to compile?

It seems I needed to enable the non-free repository for Debian 6 with:

aptitude install firmware-linux-nonfree

Also the 3D driver libs:

aptitude install libgl1-mesa-dri

Xorg.conf isn't used anymore, X configures itself. I'm not sussed enough to figure out how / if X is detecting an using the non-free driver in preference.

Anyhoo, I'm Crawling at a fair old clip again. Thanks all.

This was the page I found useful:

http://wiki.debian.org/AtiHowTo
Last edited by lk1d on Saturday, 26th February 2011, 14:21, edited 1 time in total.

Temple Termagant

Posts: 11

Joined: Monday, 10th January 2011, 18:06

Post Saturday, 26th February 2011, 14:20

Re: What sort of setup do I need to get crawl to compile?

danr wrote:[quote="minmay"It always seems a bit odd to me that for Windows you can get zips and installers of trunk and stable. For Linux the only thing offered at CDO downloads is the source for stable. If you want trunk you are told to install git etc. Either way you have to compile it yourself (typically this also means installing some more packages as well).

Isn't distributing a trunk tarball / deb package the kind of thing that could be easily automated? How do the regularly updated windows binaries get "regularly updated"?


Guess with all the flavours of linux and installer types it's easier have folk roll their own? Crawl stable is already in the Ubuntu / Debian repositories and maybe others.

Dungeon Dilettante

Posts: 2

Joined: Monday, 28th February 2011, 20:23

Post Monday, 28th February 2011, 20:40

Re: What sort of setup do I need to get crawl to compile?

Hi, I am trying to compile in XCode on OS X, but it doesn't seem like the freetype-library is building properly.

Image

This is the only cryptic error I get:

Image

I have tried to download and install Freetype myself, but I am unable to figure out how to add it to the project.
User avatar

Zot Zealot

Posts: 1060

Joined: Tuesday, 21st December 2010, 17:22

Location: United Kingdom

Post Thursday, 3rd March 2011, 10:18

Re: What sort of setup do I need to get crawl to compile?

Ahh, I found that one trying to build with XCode as well - the problem appears to be a hardcoded reference to a Framework from an older version of MacOS, or something along those lines. I forgot to log a bug at the time!

I really don't get along with XCode, so instead of working through it I ended up building with GNU make and gcc (both installed with MacPorts, though if I were doing it again I would go with Homebrew), which worked fine.
I am sure I played flawflessly. This was an utmost unfair death. -- gorbeh

Dungeon Dilettante

Posts: 2

Joined: Monday, 28th February 2011, 20:23

Post Thursday, 3rd March 2011, 14:51

Re: What sort of setup do I need to get crawl to compile?

Basically following the unix compilation instructions?

Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.