Compile for Linux

From UFO:AI

Contents

General

Just run ./configure and make to compile the game.

We also have Kdevelop project files.

Requirements

In order to compile UFO:Alien Invasion under Linux you need to install some packages. First of all make sure, that you have gcc installed.

  • gcc
  • OpenGL-header files (usually comes with your graphic card drivers; or you may use the 'mesa' source package)
  • ogg vorbis header
  • libjpeg6 header
  • libpng header
  • libcurl header
  • SDL (including the package 'sdl-ttf')
    • SDL version >= 1.2.10
    • SDL_ttf version >= 2.0.7
  • make

For the Debian and Debian-based distributions (Ubuntu etc.), refer to the Debian page. Suse users might want to look here.

Getting the source

Have a look at our SVN section to find out how to obtain the code.

Compile

(This method only applies to version >= 2.1 - see the #2.0 branch section if you want to compile 2.0 or any 2.0 release candidate)

There are some options available on how to compile the code. Please have a look at the ./configure --help. After compiling there will be a debugARCH/ dir (where ARCH may be i386) which includes the binaries. They are copied by the makefile to the right folders. Now you are ready to run the game by typing ./ufo at the svn root directory.

If you use a recent SVN snapshot with no separate data package, remember to compile the maps, too (as described in the document for Debian). You can also grab pre-compiled maps from mattn.ninex.info

Compile for development

After getting the code you just need to do:

$ ./configure
$ make

Compile for release

After getting the code you just need to do:

$  ./configure --enable-release
$ make

2.0 branch

Unfortunately the build-system for 2.0 branch is slightly broken and involves some manual steps!!:

cd src && make clean && make
cp ufoded ufo2map ufo snd_sdl.so snd_oss.so snd_arts.so snd_alsa.so ref_sdl.so ref_glx.so ../ && cp game.so ../base
cd .. 

Distribution notes

project-navigation