5 A long time ago, the DWARF FORTRESS community, led by @Baughn, made an
6 effort to get the part of DF that interfaces with the OS to be opensourced.
7 the result of that was called `libgraphics` and originally maintained on
8 Baughn's github repo, and each DF version released shipped a snapshot of that
9 in its g_src directory.
10 At some point Baughn stopped updating his repo (and also ToadyOne, the DF
11 author, never merged changes back into his copy), so de-facto the community lib
12 became a non-community lib, with people depending on what ToadyOne shipped
15 This repo here is a fork of the last community edition, and tracks the source
16 released in every DF release in branches. the `nogl` branch contains several
17 changes to the official source code. whenever a new DF release comes out,
18 we need to create a new branch based on the latest upstream source branch,
19 for example a new branch 0_43_05_official based on 0_43_04_official.
20 then the new g_src source will be copied over that (optimally without upstream
22 the resulting whitespace-change-free diff is then applied to the last
23 corresponding nogl branch (e.g. 4304_nogl) and a new branch created that has
24 the changes. alternatively the new 0_43_05_official branch can be used as the
25 base for 4305_nogl, but it needs the changes in nogl branch be merged into it.
26 using this workflow makes merging the custom changes in nogl and the latest
27 upstream source the most painless.
33 In addition to the hardware requirements (which will be the same as the other
34 platforms) your system will need these libraries installed:
42 And (optional) some kind of OpenGL implementation, so:
47 you need "scons" to build the source.
52 Dwarf Fortress binaries were compiled with GCC 4.5, so you need a similar or
53 the same compiler. i.e. one that's not too old and one that's not too new.
54 4.4, 4.5, 4.6 and 4.7 work.
56 much newer compilers probably use a much newer C++ ABI
57 (it may be possible to force the compiler to use an older ABI though,
58 for example with -D_GLIBCXX_USE_CXX11_ABI=0).
60 to compile the source, use:
61 CXX=g++-4.6 CXXFLAGS="-O3 -fomit-frame-pointer" LDFLAGS=-s \
62 scons [disable-gtk=1 disable-curses=1 disable-gl=1 disable-debug=1]
64 the options inside [] , as well as the environment variables
65 CXX, CXXFLAGS, LDFLAGS are optional.
67 if neither gtk nor curses are enabled, messageboxes displaying
68 information or asking questions such as "should the game run
69 fullscreen" ? are asked on the terminal window you started
70 df from, so be sure to keep an eye on it the first time
73 Note that all DF versions prior to 0.43.05 are 32bit only, so in order
74 to use them you need to compile all dependencies with a 32bit compiler,
75 and this here as well (unless you're using a 32bit sys anyway).
76 I'm usually doing so in a sabotage linux 32bit chroot.
82 If you're using musl libc, you need to compile libSDL with a patch to
83 increase its thread stacksize, otherwise DF will crash.
84 it is in dist/sdl-stacksize.patch.
86 you probably also will need to use the libstdc++.so that ships with
87 the compiler you used to compile libgraphics.so, and replace the copy
88 DF has in its libs directory with it.
90 you may also want to use the other things in dist/.
91 the build of 0.43.05 uses some stack check functions that are not part of
92 musl and need a compat wrapper (see comments in dist/df64).
93 you also need the program in dist/ that disables heap randomization.
99 -sound_output : sets the sound system to use. Possible values:
100 ALSA - Use the Advanced Linux Sound Architecture. (default)
101 OSS - Use the Open Sound System.
102 ESD - Use the Enlightenment Sound Daemon.
104 If you need to use one of the alternative systems and want to avoid
105 having to run from a terminal everytime, add the switch and the sound
106 system required to the df script.
114 * If the mouse cursor is enabled, and you are running fullscreen
115 it reacts strangely around the leftmost and topmost edges of the screen.
116 * Recorded movies will flicker every few frames, with artifacts on
118 * If the lock keys (caps lock, num lock, etc) do not work for you, open
119 the df file in a text editor and remove the line that reads
121 export SDL_DISABLE_LOCK_KEYS=1
123 it's a work around for a bug in the SDL package in Debian based distributions,
124 that reverses the behaviour of the above environmental variable.