Revision as of 15:19, 13 August 2013 by H-hour (talk | contribs) (Compile)


(Zypper is a command-line alternative interface to the same system as YaST - see below for a one-liner that should get all dependencies)

Note that where there are packages that depend on the devel packages, they are not mentioned here, as YaST will select them for install automatically. Use YaST to install (if you haven't already):

  • gcc
  • make
  • m4
  • subversion
  • SDL-Devel
  • SDL_ttf-devel
  • SDL_mixer-devel
  • libvorbis-devel
  • libjpeg-devel
  • libpng-devel
  • libcurl-devel
  • gettext-devel
    • (this seemed to be missing from the repo - but everything seems to work ok without it. i have gettext, just no -devel. i do play in english, though. --Blondandy 17:38, 6 August 2008 (CEST))
  • libtheora-devel (configure grumbled under opensuse 11.1. when I installed ffmpeg2theora (packman repo), it was fine - no idea why this fixed it)
  • libxvidcore-devel

Some more dependencies for radiant (may be disabled via './configure --disable-uforadiant')

  • gtk2-devel
  • gtkglext-devel
  • glib2-devel
  • libgtksourceview-devel
  • libgtksourceview-2_0-0
  • openal-devel
  • libxml2-devel

You also need the X11 development packages, on 10.1 they're called xorg-X11-devel (just search for X11 and select the package with the -devel extension).

Yast will automagically sort out any dependencies.

If you have problems with Subversion, which you shouldn't, for versions upto and including 10.0, you can get v1.3.0 rpms from You will also need the correct version of libapr from the same site. 10.1 comes with 1.3.0, which should work fine. If you want 1.4.0, you'll have to download and compile from source (or search the net for RPMS), but you shouldn't need it.

You shouldn't have any version problems on 10.0 and 10.1 (can't be certain about 9.3 or earlier or SLED/S). Any problems will most likely be with SDL, which has gone through some API changes recently. Just download and build the sources yourself (which isn't unreasonable, considering you're gonna be downloading and compiling UFO:AI...)

As root, this command should install all dependencies (tested on openSuSE 11.2). I have tried to find the shortest set. zypper will find the dependencies of these dependencies and install them.

zypper install gcc gcc-c++ make zlib-devel libcurl-devel libjpeg-devel libogg-devel libvorbis-devel libtheora-devel libSDL-devel libSDL_mixer-devel libSDL_ttf-devel libpng-devel libxvidcore-devel libSDL_image-devel gtk2-devel libgtksourceviewmm-2_0-devel gtkglext-devel openal-devel

Even though I had libxvidcore, ./configure failed with

checking for xvid_decore in -lxvidcore... no
configure: error: You must have libxvidcore!!!

the configure script is missing the .so.4.2, so adding this symlink fixed it.

sudo ln -s /usr/local/lib/ /usr/local/lib/

I did this after building my own xvid, but this may work on xvid from the videolan repo.

Download the latest SVN version

Create a new directory and grab the latest SVN version:

$ mkdir ufoai
$ cd ufoai
$ svn co
$ cd trunk

This might take a while as the whole trunk package (including all the models, maps, all the textures etc.) is quite big. If the sourceforge site has any problems connecting, type

WARNING: Some music is not included in SVN trunk. You have to download it manually from the UFOAI homepage (currently and decompress it to base/music folder.

You can also get a specific 'stable' version instead of the most recent (often unstable) code. See Coding/Create Release#Get a release for more info on how to do that.



make lang

Now compile the maps:

$ make maps

WARNING: This process might take some time (even a couple of hours or so!)(Or All Day!). It is often recommended instead to use the maps-sync target, which will download the latest compiled versions of the maps from the ufoai server:

$ maps-sync

NOTE: the modification of PATH above is needed to include the ufo2map executable in our path. ufo2map is usually found in the ufoai root (trunk) directory although on some systems it might be located in releasei386 or releasex86_64 or debugi386 or debugx86_64. If this is the case on your system you may need to replace the PATH modification statement above with: PATH=$PATH:../../releasei386 (or similar)

NOTE: If you have multiple cpus/cores you might want to use the -j option to make. The number of jobs should be cpus/cores + 1, so if you have a dual-core cpu use make -j 3. You could also use -j 2 on single core/single cpu machines to speed things a little bit.


Run the game

$ ./ufo

See debugging if you happen to find a bug.

Updating SVN automatically

Here is a nice script that you can write to your /etc/cron.daily so you stay uptodate without any work. (Write it with an editor and then move it as root to the folder, and there type chmod +x file to make it executable).

#! /bin/sh
pushd /(place of ufo folder)/
svn co
cd trunk

If your UFO starts to behave strangely, like it has some MAJOR problems, then most likely something went wrong with SVN, or make. So kill the folder and restart at the top, befor writing unapt bugreports.

Updating the SVN version manually

To update to the latest SVN version:

$ cd trunk
$ svn up

Then re-compile.

Then rebuild the maps (only new or updated maps will be rebuilt so it won't take forever!).

Packaging for SUSE

See Packaging/SuSE.