Debian
From UFO:AI
Contents |
Prerequisites
For Debian and Debian-based distributions (Ubuntu etc.), you first need to install the standard GNU gcc stuff and SVN. Open your favourite console and type:
$ sudo apt-get install make gcc subversion
You also need the following development packages (hope I didn't forget any - if make fails, that's probably the reason):
$ sudo apt-get install \ libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libvorbis-dev zlib1g-dev gettext libtheora-dev \ libjpeg62-dev libpng12-dev libncurses5-dev libcurl3-dev libsdl-mixer1.2-dev \ libxml2-dev libopenal-dev p7zip-full
You need these development packages if radiant should be built. This can be disabled via './configure --enable-uforadiant=no'.
$ sudo apt-get install \ libglib2.0-dev libgtk2.0-dev libgtkglext1-dev libgtksourceview2.0-dev
If you plan to compile version prior to 2.2 you maybe also need libxxf86vm-dev and libxxf86dga-dev.
If you have issues with finding 'GL/gl.h' (later in the build) the following may also help
$ sudo apt-get --reinstall install mesa-common-dev
Note: You also need to install gettext to compile languages (following the standard procedure on Ubuntu without that results in almost no texts in game). Wrwrwr 03:04, 7 December 2007 (CET)
Note: An easy way to get all build deps is to install the ubuntu/debian packages "equivs" and "devscripts" and run the following commands : (this will also provide the option to make the .deb files for ufoai later) --Ranyardm 00:16, 1 May 2010 (UTC)
mk-build-deps sudo dpkg -i ufoai-build-deps_1.0_all.deb sudo apt-get install -f
For Ubuntu 8.04 LTS users, simply use the following: (--Stmok 02:18, 14 October 2009 (UTC))
$ sudo apt-get install \ make gcc subversion libsdl1.2-dev libsdl-ttf2.0-dev libvorbis-dev zlib1g-dev gettext libtheora-dev libjpeg62-dev libpng12-dev libncurses5-dev \ libcurl4-openssl-dev libsdl-mixer1.2-dev libxml2-dev libopenal-dev libglib2.0-dev libgtk2.0-dev libgtkglext1-dev mesa-common-dev gettext \ libxvidcore4-dev libgtksourceview2.0-dev
If the game's sound is choppy, goes fast, and dies soon after starting, install libsdl1.2debian-pulseaudio. Set PulseAudio to use an internal sample rate of 48000 Hz by adding this line to /etc/pulse/daemon.conf:
default-sample-rate = 48000
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 approximately 500MB+.
WARNING: Some music is not included in SVN trunk (because of their license restrictions). You have to download it manually from the UFOAI homepage and decompress it to base/music folder.
You can also get a specific 'stable' version instead of the most recent (often unstable) code. See Releases/SVN for more info on how to do that.
Compile
Compile the game with:
$ ./configure $ make $ make lang
Now compile the maps (see also Mapping/Compile):
$ make maps
WARNING: Compiling maps takes some time (even a couple of hours! - for example more than 6 hours on Athlon64 3000+, 6.3120075 hours on Athlon64 3500+, around 16 hours on Pentium IV 1.5GHz).
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.
make pk3 make uforadiant
sudo make install
install maps and data
sudo make install_data
Running
In trunk run the ufo executable:
$ ./ufo
The Debugging section also provides useful advice if something goes wrong.
Updating the SVN version
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!).
Problems
If a black screen occurs and if you previously have installed the game : remove the ufoai directory (~/.ufoai) in your home directory:
$ rm -R ~/.ufoai
Building Debian packages
sudo apt-get install devscripts
Just type:
$ make deb
This will build all maps and compile the game (if not already done) and create deb packages (you need the devscripts package, too). If you want to build the maps with this command, make sure, that you already have ufoai-tools installed. To install them before creating the maps you can type:
$ make debbinary
and install the ufoai-tools package via:
$ dpkg -i ufoai-tools[...].deb
You also have the ability to create only the data packages by typing:
$ make debdata

