
This file describes how to build and install thrust.


1. What you need to build and install thrust

  * You will need a ANSI C compiler.
  * You will also need GGI and/or DirectX and/or 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 other backends.

  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

  * Configure with the option --enable-maintainer-mode.
  * 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.
  * awk, and possibly GNU awk is specifically required. I'm not sure here.

2. Configuring thrust

  A configure script is included, configure with:

      ./configure

  Check ./configure --help for a list of arguments for configure.

3. Building thrust

  * In the directory that this file is in, type `make'. This will build one or
    more of `thrust', `xthrust', `dxthrust' and `svgathrust' depending on how
    thrust was configured and what features configure located.
  * 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. If you
    do, the demo run will likely not work as expected.

4. Installing thrust

  * Become root.
  * Then as root, type `make install'. This will copy the built programs
    `thrust', `xthrust', `dxthrust' and/or `svgathrust' to `--bindir'. You
    will have to manually arrange for `svgathrust' to have the required
    permissions to access the graphics subsystem.
    You will want thrust, xthrust, dxthrust and svgathrust to have write
    access to the highscore file. This can be solved in two ways (at least).
    The simplest way is to give everybody write access to the file
    (chmod ugo=rw). A slightly more refined way is to set the sgid flag on
    the binaries (chmod g+s) and then make the binaries and the highscore file
    belong to the same group (chgrp). When doing it this way, there is no need
    for the highscore file to be world writeable (chmod ug=rw).
    Note that if you want to keep an old highscore file, you will have to
    arrange for it to not be overwritten by `make install'.

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 gives up its root priviliges
    right after the graphics have been initilized. For the case of svgathrust,
    root priviliges are given up early, within the call to vga_init().
