v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

v0.31:Installation

From Dwarf Fortress Wiki
Revision as of 02:35, 2 November 2011 by 216.158.121.153 (talk) (→‎Mac)
Jump to navigation Jump to search

Download

You can always get Dwarf Fortress as Toady One, the developer, released it from the Bay12 site (check the top of the page).

You can also download the latest version here: Template:News/Mirrors/50.14 Windows users: Use the "Main" version unless there's some reason not to.

Third-Party Packages

The Dwarf Fortress community often creates custom Template:L and Template:L. They're like graphical mods that make DF look prettier or just different. A lot of people pack the game folder with the tileset installed and everything already set up, so all you have to do is extract and play. Among the most popular of these are Ironhand's Graphics Set and Phoebus' Graphic Set.

There's also the (Windows only) Lazy Newb Pack which has several tilesets and utilities gathered together to make it easier for new players to get started and to experiment with the different tilesets. The only disadvantage to downloading LNP is that there is usually some lag time between when a new version of the game is released and when the LNP is updated to include it. So, if a new version of the game has just been released it may not be in the LNP yet.

Also see Template:L for a long list of utilities that people have created, including the incredibly useful Template:L, something that many people won't play the game without.

Installation

Also see: Template:L

Windows

There is no installer for the game. Simply extract the archive file to a folder somewhere and run the game from within the folder.

Make sure to actually extract the archive; do not just open the archive and run the game from the window that appears. If you do this then it may appear to work, but your save game data will get discarded. This is the cause of many "my saved games keep getting deleted" complaints. The game also needs to be able to write to its own folder, so do not install it in C:\Program Files if you are running Windows Vista or later.

Mac

The Mac version is not a single application bundle, but like the Windows version it consists of a folder containing the application along with data files and there is no installer. The entire folder can be dragged into the Applications folder or placed elsewhere. As with the Windows version, the game must be able to write to its own folder.

To start the game exicute the launch script "df".

Note: Users using Mac OS X 10.7 Lion you must edit this code. Open a text editor (TextEdit is standard on the Mac)

Then change

export DYLD_FALLBACK_LIBRARY_PATH=${PWD}/libs
export DYLD_FALLBACK_FRAMEWORK_PATH=${PWD}/libs

To

export DYLD_LIBRARY_PATH=${PWD}/libs
export DYLD_FRAMEWORK_PATH=${PWD}/libs

Linux

The Linux version of the game is shipped as a compiled 32-bit x86 (Intel/AMD) application. It will also run on a system with a 64-bit AMD or Intel processor and a 64-bit kernel, provided that you have the (32-bit) shared libraries available that the program needs.

Dwarf Fortress for Linux is meant to be run from a terminal (command-line) interface, and so the instructions here will assume you know how to login and get to a command prompt. At least in the default mode, however, Dwarf Fortress is an X client program, so you should be in a terminal inside an X session before starting the game. Dwarf Fortress will create a new X window outside of the terminal window, so don't worry about the size of the terminal.

  • Unpacking: Dwarf Fortress is shipped as a (bzip2) compressed tar archive. It will extract into a new directory called df_linux. So, cd to wherever you want the game to be unpacked, and then run tar xjf /path/to/df_XX_YY_linux.tar.bz2 (where df_XX_YY_linux.tar.bz2 is the filename). Then run cd df_linux to change into the new directory.
  • Running: Run ./df to execute the Dwarf Fortress wrapper script.
  • Troubleshooting: If you get an error like this:
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0:
cannot open shared object file: No such file or directory
it means that your system is missing one or more shared libraries. See below.
  • Upgrading: Since every new version of Dwarf Fortress unpacks in a directory named df_linux you have to manage upgrades yourself. You should not unpack a new version of DF on top of an old version's directory -- this will cause things to break, usually in subtle and mysterious ways. Instead, you should either delete or rename the old df_linux directory first, before extracting the new version.

32-bit vs. 64-bit systems

Modern desktop PCs (of the Intel/AMD persuasion) contain CPUs that can run in either 32-bit or 64-bit modes. When you install Linux, you choose one of these architectures. The programs on your system will then be compiled either for the 32-bit (i386, x86) arch, or the 64-bit (amd64, x86_64) arch. If you've forgotten which one you have, you can check:

$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs),
for GNU/Linux 2.6.18, stripped

The above would indicate a 64-bit system. Here's one from a 32-bit system:

$ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs),
for GNU/Linux 2.6.18, stripped

Dwarf Fortress is compiled for 32-bit systems, so if you're on a 32-bit system, things will be slightly easier. If you are getting errors about missing SDL_image libraries (etc.) then you simply need to install them. Use your distribution's package manager for this -- details will be extremely distribution-specific. You don't need the development versions of the packages with the headers (although that won't hurt) -- you just need the runtime versions, with the actual shared libraries.

If you're on a 64-bit system, then things get a bit trickier. Since DF is a 32-bit application, it needs 32-bit versions of the shared libraries. Some Linux distributions provide these in one or more packages that you can download. For example, in Debian, the ia32-libs package contains most of the common 32-bit libraries, including libSDL. Unfortunately, it does not include the SDL add-on libraries such as libSDL_image and libSDL_ttf. If your distribution does not include these, then you may have to supply them manually.

If this is the case, then the first step is to figure out where you will be putting them. Check to see where your other 32-bit libraries are already installed; for example, on Debian, some are in /lib32 and others are in /usr/lib32. Since libSDL is in /usr/lib32 on a Debian system, that's where we'll want to put libSDL_image and libSDL_ttf. On other distributions, the path could be different.

The second step is to get the 32-bit libraries. You can typically do this by downloading them directly from your distribution's 32-bit package repository. Again using Debian as our example, we can perform a search at http://packages.debian.org/ for files containing the word libSDL_image for the Intel x86 architecture. This takes us to a results page from which we can proceed to the libsdl-image1.2 package page with a list of download links arranged by architecture. Grab the i386 package from here, and repeat this for the libSDL_ttf package, and whatever other library you are missing. Store these package files somewhere convenient.

The third step is to extract the libraries from the packages and get them in the proper location. You probably won't be able simply to install the packages using your package manager, because they are for the wrong architecture. Instead, you'll probably have to extract them by hand. The steps for doing this are distribution-specific, so when in doubt consult your distribution's help resources. I'll show the steps for a .deb package.

  • cd into some temporary working directory such as /tmp
  • Extract the files from the .deb archive, which is in ar(1) format:
 ar x /path/to/libsdl-image1.2*_i386.deb
This creates three files: debian-binary, control.tar.gz and data.tar.gz. We only care about data.tar.gz.
  • Extract data.tar.gz:
 tar xzf data.tar.gz
This creates a subdirectory named usr with various files inside it. We only care about usr/lib/libSDL_image-1.2.so.0.8.2 (or whatever precise version yours has).
  • Move the shared library into place:
 sudo mv usr/lib/libSDL_image-1.2.so.* /usr/lib32/
  • Create a symlink to it:
 cd /usr/lib32
 sudo ln -s libSDL_image-1.2.so.0.* libSDL_image-1.2.so.0
 cd -

Repeat this for libSDL_ttf and whatever other libraries are required.

Documentation

Fortunately the documentation on this wiki is very detailed and extensive. You may want to start out with:

Then move on to: