Building/compiling Crawl on Ubuntu (Linux Mint)


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Tuesday, 28th July 2015, 03:29

Building/compiling Crawl on Ubuntu (Linux Mint)

I've been seeking to play latest trunk (unstable; development builds) of DCSS, on Linux. For a (single) user to play the latest offline console version, it has to be built from source (instructions adapted from https://github.com/crawl/crawl/blob/mas ... NSTALL.txt). I've spent quite some time fiddling with this, so I might as well share the steps:

[EDIT 0: FOR CLEAN STEP-BY-STEP INSTRUCTIONS ON HOW TO PLAY ONLINE CONSOLE: viewtopic.php?f=9&t=17143] [RECOMMENDED]

[EDIT 1: SEE POST #6 (viewtopic.php?p=234693#p234693) FOR A BETTER RECAP OF THESE QUITE-BULKY OFFLINE-PLAY INSTRUCTIONS.]

sudo apt-get install git build-essential libncursesw5-dev bison flex liblua5.1-0-dev libsqlite3-dev zlib1g-dev pkg-config libsdl2-image-dev
git clone https://github.com/crawl/crawl.git
cd crawl
git submodule update --init
cd crawl-ref/source
make
then, wait for a while (it might take about five minutes)

then, right click inside the terminal window, and select profiles > profile preferences
on the general tab, uncheck "use the system font", and choose "dejavu sans mono", size 21 (which is the max size fitting on 1080p screens)
on the colours tab, select the "white on black" background scheme, and the "xterm" palette scheme
on the background tab, select "solid color"
on the scrolling tab, disable the scrollbar

some of these are preference-based.

to play, open the terminal (ctrl+alt+t) and send "./crawl/crawl-ref/source/crawl" (f11 to enter full-screen mode)

there is only one thing which still eludes me. different results are produced for the fonts, depending on the steps taken. first off, choosing either "Monospace (Ubuntu Mono Regular?)" or "Dejavu Sans Mono" produces the same result.

Furthermore, if one chooses 21 as the font size, it results in a similar output than if one chooses 12 as the font size but zooms in a few times using ctrl-shift-+ (one output takes a little more space vertically, but both are identical on the x axis).
Last edited by twipley on Thursday, 6th August 2015, 18:45, edited 3 times in total.

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Tuesday, 28th July 2015, 20:23

Re: Building/compiling Crawl on Ubuntu (Linux Mint)

twipley wrote:different results are produced for the fonts, depending on the steps taken. first off, choosing either "Monospace" or "Dejavu Sans Mono" produces the same result.

Update: I've just fallen on a reddit thread, which states that:
When you select monospace you're telling the application to use whatever is set as the default fixed width font.
By default "Monospace" is linked to DejaVu Sans Mono.


All there is to know now, is which method is better (read as: "more accurate"):
a) to zoom in (thrice for 1080p screens) the 12-sized font through ctrl shift + (result)
or b) to manually change the font size to 21 (use this font for 1080p monitors; result)

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Tuesday, 28th July 2015, 23:10

Re: Building/compiling Crawl on Ubuntu (Linux Mint)

This can be solved by installing "xterm" and launching it through ctrl-alt-t and sending "xterm -fa 'Monospace' -fs 21 & exit" (switch to fullscreen using alt-enter)

the pros of using xterm:
- more accurate fonts (at least at size 21)
- no refresh or redraw problems (a big pro!)

the cons:
- the colors are quite less distinguishable from each other than gnome-terminal using the xterm profile (stangely, they differ). Which, leaves one looking for a way to integrate the gnome-terminal colours into xterm, to get the best experience (of both worlds).

EDIT: gnome-terminal colours in the first image: http://imgur.com/FlxT8FX,ffcMvFO

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Tuesday, 28th July 2015, 23:48

Re: Building/compiling Crawl on Ubuntu (Linux Mint)

Mapping the "xterm" profile of gnome-terminal over to xterm, through the command line.

This page (http://linux.die.net/man/1/xterm) seems to note (search for "These specify the colors for the ISO-6429 extension") how to customize the colours to be displayed by xterm.

I believe the colours used by the "xterm" profile of gnome-terminal are as follows:
  Code:
#000000000000:#CDCB00000000:#0000CDCB0000:#CDCBCDCB0000:#1E1A908FFFFF:#CDCB0000CDCB:#0000CDCBCDCB:#E5E2E5E2E5E2:#4CCC4CCC4CCC:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#46458281B4AE:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF
(this is what I've found through using gconf-editor)

I've been looking for ways to specify to xterm the right colours to be used. It seems that some sort of conversion is needed. However, I'm at a loss here as I'm not quite versed in these matters.
https://gist.github.com/MicahElliott/719710
http://www.perpetualpc.net/6429_colors.html
http://www.javascripter.net/faq/hextorgb.htm

To the ones interested in furthering the console experience, a hand would be much welcomed!~

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Wednesday, 29th July 2015, 15:39

Re: Building/compiling Crawl on Ubuntu (Linux Mint)

I think I advanced in this...

I've done:

sudo apt-get install xtermcontrol
gedit .xtermcontrol

added the following lines in the file:

color0="#000000000000"
color1="#CDCB00000000"
color2="#0000CDCB0000"
color3="#CDCBCDCB0000"
color4="#1E1A908FFFFF"
color5="#CDCB0000CDCB"
color6="#0000CDCBCDCB"
color7="#E5E2E5E2E5E2"
color8="#4CCC4CCC4CCC"
color9="#FFFF00000000"
color10="#0000FFFF0000"
color11="#FFFFFFFF0000"
color12="#46458281B4AE"
color13="#FFFF0000FFFF"
color14="#0000FFFFFFFF"
color15="#FFFFFFFFFFFF"

which hopefully will permit colour changing to these values.


However, I am at a loss telling xterm to use these values. I do not know how to evocate xtermcontrol. For example, (xtermcontrol --font="xft:DejaVu Sans Mono:pixelsize=21") does not even launch xterm, nor does anything apparent.

I'll be back later...

Lair Larrikin

Posts: 29

Joined: Wednesday, 22nd July 2015, 16:50

Post Wednesday, 29th July 2015, 21:17

Re: Building/compiling Crawl on Ubuntu (Linux Mint)

Ok, guys! I think we have it here. "We?" Anyways, to hidden readers and to future ones.

It remains to be tested extensively, but it appears to be a better experience than what most people have been sticking with (being, the default one).

So, for the sake of an update:

to build latest trunk:
sudo apt-get install git build-essential libncursesw5-dev bison flex liblua5.1-0-dev libsqlite3-dev zlib1g-dev pkg-config libsdl2-image-dev xterm xtermcontrol
git clone https://github.com/crawl/crawl.git
cd crawl
git submodule update --init
cd crawl-ref/source
make
then, wait for a while (it might take about five minutes)

then, to launch crawl:
open gnome-terminal using ctrl+alt+t
xterm -fa 'DejaVu Sans Mono' -fs 21 & exit (paste using ctrl+shift+v)
put xterm in full-screen mode using alt+enter
  Code:
xtermcontrol --color0=rgb:0000/0000/0000 --color1=rgb:cdcb/0000/0000 --color2=rgb:0000/cdcb/0000 --color3=rgb:cdcb/cdcb/0000 --color4=rgb:1e1a/908f/ffff --color5=rgb:cdcb/0000/cdcb --color6=rgb:0000/cdcb/cdcb --color7=rgb:e5e2/e5e2/e5e2 --color8=rgb:4ccc/4ccc/4ccc --color9=rgb:ffff/0000/0000 --color10=rgb:0000/ffff/0000 --color11=rgb:ffff/ffff/0000 --color12=rgb:4645/8281/b4ae --color13=rgb:ffff/0000/ffff --color14=rgb:0000/ffff/ffff --color15=rgb:ffff/ffff/ffff

(the above line can be pasted to xterm using shift+insert, or retrieved using the arrow keys if has been sent in the past)
run crawl by sending: crawl/crawl-ref/source/crawl

voilà!

one gets: no redraw nor refresh problems (which seem to plague gnome-terminal), and both accurate font zoom and, more importantly, what seems to be better colours than xterm's defaults.

EDIT: sending a single line to launch crawl using modified colours:
  Code:
xtermcontrol --color0=rgb:0000/0000/0000 --color1=rgb:cdcb/0000/0000 --color2=rgb:0000/cdcb/0000 --color3=rgb:cdcb/cdcb/0000 --color4=rgb:1e1a/908f/ffff --color5=rgb:cdcb/0000/cdcb --color6=rgb:0000/cdcb/cdcb --color7=rgb:e5e2/e5e2/e5e2 --color8=rgb:4ccc/4ccc/4ccc --color9=rgb:ffff/0000/0000 --color10=rgb:0000/ffff/0000 --color11=rgb:ffff/ffff/0000 --color12=rgb:4645/8281/b4ae --color13=rgb:ffff/0000/ffff --color14=rgb:0000/ffff/ffff --color15=rgb:ffff/ffff/ffff && crawl/crawl-ref/source/crawl

...and, alt+f4 to close xterm when the crawling session is finished.

EDIT2: the following line, while still producing the same results, might be more future-proof:
  Code:
xtermcontrol --color0=rgb:0000/0000/0000 --color1=rgb:cdcd/0000/0000 --color2=rgb:0000/cdcd/0000 --color3=rgb:cdcd/cdcd/0000 --color4=rgb:1e1e/9090/ffff --color5=rgb:cdcd/0000/cdcd --color6=rgb:0000/cdcd/cdcd --color7=rgb:e5e5/e5e5/e5e5 --color8=rgb:4c4c/4c4c/4c4c --color9=rgb:ffff/0000/0000 --color10=rgb:0000/ffff/0000 --color11=rgb:ffff/ffff/0000 --color12=rgb:4646/8282/b4b4 --color13=rgb:ffff/0000/ffff --color14=rgb:0000/ffff/ffff --color15=rgb:ffff/ffff/ffff && crawl/crawl-ref/source/crawl


EDIT3: what it looks like, in real-time: https://www.youtube.com/watch?v=d6t8EwSQ1Kk

EDIT9: one can download a stable .deb file instead of building from trunk: http://crawl.develz.org/debian/pool/

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 29 guests

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