Improved markdown syntax so it's more readable on command line, fixes #1057
[supertux.git] / INSTALL.md
1 Install instructions for SuperTux - <http://supertux.lethargik.org/>
2 ====================================================================
3 Last update: December 20, 2007 by Christoph Sommer
4
5 Binaries
6 --------
7
8 We try to provide precompiled binaries of SuperTux for a number of
9 platforms. You should check <http://supertux.lethargik.org/wiki/Download>
10 for the packages and instructions on how to install them. If there are
11 no prebuilt binaries for your platform, then you might still be able
12 to compile the source code yourself. In this case read the next
13 sections.
14
15
16 Requirements
17 ------------
18
19 To build SuperTux from source, you need to have a number of tools and
20 libraries installed. Note that most of these things should already be
21 available prepackaged and optimized for your distribution, it is
22 recommended that you check your distribution first before downloading
23 from the websites. You can also check
24 <http://supertux.lethargik.org/wiki/Building_SuperTux> for up-to-date
25 build instructions for a variety of different platforms and
26 distributions.
27
28 * Linux development tools (your distribution should come with these):
29   - gcc compiler suite version 3.2 or newer (you need the c++ compiler
30     g++) <http://gcc.gnu.org>
31   - gnu binutils <http://www.gnu.org/software/binutils>
32   - a shell and POSIX commandline tools
33 * CMake 2.6 or later:
34   [Download](http://www.cmake.org/HTML/Download.html);
35   [Homepage](http://www.cmake.org/)
36 * OpenGL headers and libraries: OpenGL libraries and headers are
37   specific to your graphics card. Make sure that you have hardware
38   accelerated OpenGL drivers installed. Software renderers like Mesa
39   will make SuperTux unplayable slow.
40 * SDL 1.2.5 or later (1.2.8 is recommended on Mac OS X)
41   <http://www.libsdl.org>
42 * SDL_image (any version that includes PNG and JPEG support)
43   <http://www.libsdl.org/projects/SDL_image>
44 * PhysicsFS (1.0.x or 2.0.x) <http://www.icculus.org/physfs>
45 * OpenAL: There are no official Linux releases of OpenAL yet, you
46   should grab the latest CVS snapshot (any snapshot from 2005 should
47   work, earlier snapshots tend to have bugs). OpenAL 1.0 or later
48   implementations on other systems like Mac OS X or windows should
49   work. <http://www.openal.org>
50 * GLEW <http://glew.sourceforge.net/>
51 * Boost's smart_ptr and format headers <http://www.boost.org/>
52
53 Note: We tried to write our code clean, portable and platform neutral,
54 so it should be possible to compile it on a wide range of platforms
55 and also with other compilers than gcc. However we have no resources
56 to test other setups and it is likely that you hit small problems.
57 Reports and binary compiled packages are of course always welcome.
58 Send them to supertux-devel@lists.lethargik.org
59
60
61 Installing under Linux/UNIX using CMake
62 ---------------------------------------
63
64 SuperTux uses CMake to generate a set of Makefiles for the build
65 process. To generate these Makefiles and build SuperTux, perform the
66 following steps:
67
68 1. `cd' to the directory where you unpacked the SuperTux source
69    archive, i.e. to the directory containing `src' and `data'.
70
71 2. Create and change to a new, empty build directory by running `mkdir
72    build', `cd build'.
73
74 3. Run `cmake ..' to create the Makefiles needed to build SuperTux
75    with standard options. If you are missing any libraries needed to
76    build SuperTux, install those first, then try running CMake again.
77    See below for instructions on how to change to standard options.
78
79 4. Type `make' to start the build process.
80
81 5. Type `make install' to install the programs and any data files and
82    documentation. (You should be a root user on Linux systems. You can
83    become a root user with the `su' command or by using `sudo make
84    install') Note that there is no uninstall target, so you might wish
85    to create a package or other system-specific installation instead.
86    
87 6. The game should work now and you can remove the source directory.
88
89 You can customize the build process by setting additional options for
90 CMake. The easiest way to do this is to use run `ccmake ..` instead of
91 `cmake ..` to bring up the curses-based user interface of CMake.
92 Select an option using the arrow keys, change the selected option by
93 pressing the Enter key, then hit the `c` (repeatedly, if necessary) to
94 apply your changes and bring up new options resulting from your newly
95 set ones. When you are done, press the `g` key to generate a new set
96 of Makefiles and exit.
97
98 Alternatively, you can pass options to `cmake ..' via the command
99 line. Some common command line switches are:
100
101 `-DCMAKE_VERBOSE_MAKEFILE=ON`
102 : Generates Makefiles that print all commands prior to executing them.
103
104 `-Dxxx_LIBRARY=/path/to/library.so -Dxxx_INCLUDE_DIR=/path/to/headerfiles`
105 : Manually specify the installation directory of a library.
106
107 `-DCMAKE_BUILD_TYPE=DEBUG`
108 : Enables debug mode and compiles extra debug symbols into the SuperTux
109 executable. This is useful when sending in bug reports to the
110 developers.
111
112 `-DCMAKE_BUILD_TYPE=RELEASE`
113 : Enables release mode and compiles some sanity checks out of the build.
114
115 Note for GIT users: SuperTux does not need to be installed on the
116 system, you can run it from its own directory.
117
118
119 Support
120 -------
121
122 You can contact us at [supertux-devel@lists.lethargik.org](mailto:supertux-devel@lists.lethargik.org)
123 and in the [#supertux](irc://chat.freenode.net/supertux) channel on
124 the chat.freenode.net IRC server.