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