
This file describes how to build and install thrust.

If you have the binary distribution, skip to 4.

1. What you need to build and install thrust

  * You will need a ANSI C compiler.
  * You will need a make that can handle text transforming functions,
    e.g the GNU Make utility.
  * You will also need X and/or svgalib 1.2 or later to compile the
    source. The X version of the game will only run on 8 bpp
    pseudocolor visuals.
  * Root permissions so that svgalib can open the graphics display.
    No root access needed for the X version.

  Some files are prebuilt in the distribution, but if you would like to
  change anything in the source of these files you will need the
  following to rebuild these files

  * pod2man is used to build the man-page from the pod file. pod2man is a
    part of perl. Version 5.001 of perl is known to work.
  * The netpbm package so that the small utility based on it the can be
    compiled. The small utility is used to transform the graphics of
    the titlescreen to a C data structure which can be compiled into the
    program.

2. Configuring thrust

  A configure script is included, configure with:

      ./configure

  Note that the binary distribution is built with:

      ./configure --bindir=/usr/local/games --sharedstatedir=/var/games

  The configure script takes the following arguments:

  Configuration:
    --cache-file=FILE       cache test results in FILE
    --help                  prints a help message
    --no-create             do not create output files
    --quiet, --silent       do not print `checking...' messages
    --version               the version of autoconf that created configure
  Directory and file names:
    --prefix=PREFIX         install architecture-independent files in PREFIX
                            [/usr/local]
    --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                            [same as prefix]
    --bindir=DIR            user executables in DIR [EPREFIX/bin]
    --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                            [PREFIX/com]
    --mandir=DIR            man documentation in DIR [PREFIX/man]
  Features and packages:
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --enable and --with options recognized:
    --enable-sound          try to include sound
    --with-x                use the X Window System
    --x-includes=DIR        X include files are in DIR
    --x-libraries=DIR       X library files are in DIR
    --with-svga             use SVGAlib
    --enable-svga-includes=DIR
                            SVGAlib include files are in DIR
    --enable-svga-libraries=DIR
                            SVGAlib library files are in DIR
    --with-pbm              use pbm, required to rebuild datasrc/title.c
    --enable-pbm-includes=DIR
                            pbm include files are in DIR
    --enable-pbm-libraries=DIR
                            pbm library files are in DIR

3. Building thrust

  * In the directory that this file is in, type `make'. This will build
    one or both of `thrust' and `xthrust', depending on how thrust was
    configured.
  * At the top of the file `src/thrust.h' the speed of the game and the
    relative weight of the blob can be changed. You can fiddle with these
    settings if you are not satisfied with the feel of the steering.

4. Installing thrust

  * Become root.
  * Then as root, type `make install'. This will copy one or both of
    the programs `thrust' and `xthrust' to `--bindir'. For the binary
    distribution, both programs are copied to /usr/local/games/. When
    `thrust' is installed, the setuid flag will be set as is required
    by all svgalib programs.
    It will also change the permissions of the highscore file (for the
    binary distribution, this is `/var/games/thrust.highscore') so that
    all users can write to it. The highscore file will be created with
    the correct permissions if it does not exist.
  * Also type `make install-man' and a man page `thrust.6' will be
    installed. For the binary distribution, this is installed in
    `/usr/local/man/man6/'.
  * If you have the binary distribution and are not happy about the
    default locations, these can easily be changed within the Makefile.

Security concerns

  * All programs that use svgalib must be started as root. Either root
    starts the program, or the program is suid root so that everybody
    can run it as if they were root. A normal svgalib application give
    up its root priviliges right after the graphics have been initilized.
    Root priviliges are given up within the call to vga_init().
