6bee39d81ecdd3483aa4bb2d16058c73e93f276e
[supertux.git] / INSTALL
1 - Install instructions for SuperTux -
2 http://supertux.lethargik.org/
3
4 Last update: December 20, 2007 by Christoph Sommer 
5
6 BINARIES
7 --------
8     
9   We try to provide precompiled binaries of SuperTux for a number of platforms.
10   You should check
11
12     http://supertux.lethargik.org/wiki/Download
13     
14   for the packages and instructions on how to install them. If there are no
15   prebuilt binaries for your platform, then you might still be able to compile
16   the source code yourself. In this case read the next sections.
17
18 REQUIREMENTS
19 ------------
20
21   To build SuperTux from source, you need to have a number of tools and
22   libraries installed. Note that most of these things should already be
23   available prepackaged and optimized for your distribution, it is recommended
24   that you check your distribution first before downloading from the websites.
25   You can also check
26
27     http://supertux.lethargik.org/wiki/Building_SuperTux
28
29   for up-to-date build instructions for a variety of different platforms and
30   distributions.
31
32 * Linux development tools (your distribution should come with these):
33     - gcc compiler version 3.2 or newer (you need the c++ compiler g++)
34         http://gcc.gnu.org
35     - gnu binutils
36         http://www.gnu.org/software/binutils
37     - a shell and POSIX commandline tools
38
39 * CMake 2.4.7 or later (if you do not want to use jam)
40     Download: http://www.cmake.org/HTML/Download.html
41     Homepage: http://www.cmake.org/
42  
43 * perforce jam 2.5 or later (if you do not want to use CMake)
44     Download: ftp://ftp.perforce.com/pub/jam
45     Homepage: http://www.perforce.com/jam/jam.html
46
47 * OpenGL headers and libraries
48     OpenGL libraries and headers are specific to your graphics card. Make sure
49     that you have hardware accelerated OpenGL drivers installed. Software
50     renderers like Mesa will make SuperTux unplayable slow.
51
52 * SDL 1.2.5 or later (1.2.8 is recommended on Mac OS X)
53     http://www.libsdl.org
54
55 * SDL_image (any version)
56     http://www.libsdl.org/projects/SDL_image
57
58 * PhysicsFS (1.0.0, the development branch 1.1.x is buggy and does not work,
59              1.2.0 and later should work when it is released)
60     http://www.icculus.org/physfs
61
62 * OpenAL
63     There are no official Linux releases of OpenAL yet, you should grab the
64     latest CVS snapshot (any snapshot from 2005 should work, earlier snapshots
65     tend to have bugs). OpenAL 1.0 or later implementations on other systems
66     like Mac OS X or windows should work.
67     
68     http://www.openal.org
69
70   Note: We tried to write our code clean, portable and platform neutral, so it
71   should be possible to compile it on a wide range of platforms and also with
72   other compilers than gcc. However we have no resources to test other setups
73   and it is likely that you hit small problems. Reports and binary compiled
74   packages are of course always welcome. Send them to
75   supertux-devel@lists.lethargik.org
76
77 INSTALLING UNDER LINUX/UNIX USING CMAKE
78 ---------------------------------------
79
80   This section details how to build SuperTux using CMake. If you want to use 
81   perforce jam to build SuperTux, please skip to the appropriate section.
82
83   SuperTux uses CMake to generate a set of Makefiles for the build process. To
84   generate these Makefiles and build SuperTux, perform the following steps:
85
86     1. `cd' to the directory where you unpacked the SuperTux source 
87        archive, i.e. to the directory containing `src' and `data'.
88
89     2. Create and change to a new, empty build directory by running
90        `mkdir build', `cd build'.
91
92     3. Run `cmake ..' to create the Makefiles needed to build SuperTux with 
93        standard options. If you are missing any libraries needed to build
94        SuperTux, install those first, then try running CMake again. See below
95        for instructions on how to change to standard options.
96
97     2. Type `make' to start the build process.
98
99     3. Type `make install' to install the programs and any data files and
100        documentation. (You should be a root user on Linux systems.
101        You can become a root user with the `su' command or by using
102        `sudo make install')
103
104     4. The game should work now and you can remove the source directory.
105
106   You can customize the build process by setting additional options for CMake.
107   The easiest way to do this is to use run `ccmake ..' instead of `cmake ..' 
108   to bring up the curses-based user interface of CMake. Select and option using the
109   arrow keys, change the selected option by pressing the Enter key, then
110   hit the `c' (repeatedly, if necessary) to apply your changes and bring
111   up new options resulting from your newly set ones. When you are done, press 
112   the `g' key to generate a new set of Makefiles and exit.
113
114   Alternatively, you can pass options to `cmake ..' via the command line. 
115   Some common command line switches are:
116
117     -DCMAKE_VERBOSE_MAKEFILE=ON
118         Generates Makefiles that print all commands prior to executing them.
119     -Dxxx_LIBRARY=/path/to/library.so -Dxxx_INCLUDE_DIR=/path/to/headerfiles
120         Manually specify the installation directory of a library.
121     -DDEBUG=ON
122         Enables debug mode and compiles extra debug symbols into the SuperTux
123         executable. This is useful when sending in bug reports to the
124         developers.
125
126 Note for SVN users:
127   SuperTux does not need to be installed on the system, you can run it from
128   its own directory.
129
130 INSTALLING UNDER LINUX/UNIX USING JAM
131 -------------------------------------
132
133   SuperTux uses a normal Autoconf configure script. The simplest way to compile
134   this package is:
135
136     1. `cd' to the directory containing the package's source code and type
137        `./configure' to configure the package for your system.  If you're
138        using `csh' on an old version of System V, you might need to type
139        `sh ./configure' instead to prevent `csh' from trying to execute
140        `configure' itself.
141
142        If no configure script exists (e.g. in case you've retrieved SuperTux
143        from SVN), just run the autogen.sh script. You'll need Autoconf
144        for this.
145
146        Running `configure' takes awhile.  While running, it prints some
147        messages telling which features it is checking for.
148
149     2. Type `jam' to compile the package.
150
151     3. Type `jam install' to install the programs and any data files and
152        documentation. (You should be root user on Linux systems.
153        You can become root user with the `su' command or by using
154        `sudo jam install')
155
156     4. The game should work now and you can remove the source directory
157
158   You can customize the build process by specifying additional parameters for
159   the configure script. Type `./configure --help' for additional informations.
160   Some common options are:
161
162     --prefix=$HOME/.local
163         Installs SuperTux in your HOME directory in the .local folder.
164         This avoids the need for system administrator privileges when
165         installing the game
166     --with-XXX=Prefix
167         Manually specify the installation directory of a library
168     --enable-debug
169         Enables debug mode and compiles extra debug symbols into the SuperTux
170         executable. This is useful when sending in bug reports to the
171         developers.
172
173 Note for SVN users:
174   SuperTux does not need to be installed on the system, you can run it from
175   its own directory.
176
177 ICON FILE
178 ---------
179
180   A 32x32, XPM-format icon file is available if you wish to use
181   an icon for a menu entry for this game.
182
183   The file is "supertux.xpm", and can be found in the
184   data/images/engine/icons/ directory.
185
186 SUPPORT
187 -------
188
189   You can contact us at supertux-devel@lists.lethargik.org and in the #supertux
190   channel on the irc.freenode.net IRC server.
191