Added cURL to the list of dependecies
[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 * cURL <http://curl.haxx.se/libcurl/>
53
54 Note: We tried to write our code clean, portable and platform neutral,
55 so it should be possible to compile it on a wide range of platforms
56 and also with other compilers than gcc. However we have no resources
57 to test other setups and it is likely that you hit small problems.
58 Reports and binary compiled packages are of course always welcome.
59 Send them to supertux-devel@lists.lethargik.org
60
61
62 Installing under Linux/UNIX using CMake
63 ---------------------------------------
64
65 SuperTux uses CMake to generate a set of Makefiles for the build
66 process. To generate these Makefiles and build SuperTux, perform the
67 following steps:
68
69 1. `cd' to the directory where you unpacked the SuperTux source
70    archive, i.e. to the directory containing `src' and `data'.
71
72 2. Create and change to a new, empty build directory by running `mkdir
73    build', `cd build'.
74
75 3. Run `cmake ..' to create the Makefiles needed to build SuperTux
76    with standard options. If you are missing any libraries needed to
77    build SuperTux, install those first, then try running CMake again.
78    See below for instructions on how to change to standard options.
79
80 4. Type `make' to start the build process.
81
82 5. Type `make install' to install the programs and any data files and
83    documentation. (You should be a root user on Linux systems. You can
84    become a root user with the `su' command or by using `sudo make
85    install') Note that there is no uninstall target, so you might wish
86    to create a package or other system-specific installation instead.
87    
88 6. The game should work now and you can remove the source directory.
89
90 You can customize the build process by setting additional options for
91 CMake. The easiest way to do this is to use run `ccmake ..` instead of
92 `cmake ..` to bring up the curses-based user interface of CMake.
93 Select an option using the arrow keys, change the selected option by
94 pressing the Enter key, then hit the `c` (repeatedly, if necessary) to
95 apply your changes and bring up new options resulting from your newly
96 set ones. When you are done, press the `g` key to generate a new set
97 of Makefiles and exit.
98
99 Alternatively, you can pass options to `cmake ..' via the command
100 line. Some common command line switches are:
101
102 `-DCMAKE_VERBOSE_MAKEFILE=ON`
103 : Generates Makefiles that print all commands prior to executing them.
104
105 `-Dxxx_LIBRARY=/path/to/library.so -Dxxx_INCLUDE_DIR=/path/to/headerfiles`
106 : Manually specify the installation directory of a library.
107
108 `-DCMAKE_BUILD_TYPE=DEBUG`
109 : Enables debug mode and compiles extra debug symbols into the SuperTux
110 executable. This is useful when sending in bug reports to the
111 developers.
112
113 `-DCMAKE_BUILD_TYPE=RELEASE`
114 : Enables release mode and compiles some sanity checks out of the build.
115
116 Note for GIT users: SuperTux does not need to be installed on the
117 system, you can run it from its own directory.
118
119
120 Support
121 -------
122
123 You can contact us at [supertux-devel@lists.lethargik.org](mailto:supertux-devel@lists.lethargik.org)
124 and in the [#supertux](irc://chat.freenode.net/supertux) channel on
125 the chat.freenode.net IRC server.