(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):
- (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)
Some more dependencies for radiant (may be disabled via './configure --disable-uforadiant')
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 ftp://ftp.suse.com/pub/projects/apache/subversion/ 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/libxvidcore.so.4.2 /usr/local/lib/libxvidcore.so
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 https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk $ 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 http://prdownloads.sourceforge.net/ufoai/music.tar.bz2?download) 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.
./configure make 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:
$ make 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
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 https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk cd trunk make popd
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 rebuild the maps (only new or updated maps will be rebuilt so it won't take forever!).
Packaging for SUSE