SetupGuide: Difference between revisions

From Spring
Jump to navigationJump to search
Semi2 (talk | contribs)
Semi2 (talk | contribs)
Line 240: Line 240:
wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip
wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip
unzip -d ~/.spring/base base-ota-content.zip
unzip -d ~/.spring/base base-ota-content.zip
</pre><code>
</pre></code>


Note that you need to own a copy of Total Annihilation, to download this file legally.
Note that you need to own a copy of Total Annihilation, to download this file legally.

Revision as of 23:39, 9 July 2007

Linux Setup Guide

Which Version To Install

To play online, you must have the same version as everyone else in the game.

Most people should get the current release, version 0.74b3. There are usually between 100 and 200 people online in the lobby, and if you want to play with them, you need this.

Older versions should only be interesting to software archeologists.

If you want to see the bleeding edge, you can checkout svn head of spring, but it can not be used to play with people who have the release, so you are practically limited to playing against nemo. This is mainly interesting for people who want to contribute to the project, for testing, finding bugs and fixing them, and implementing new features. Head can be seriously broken from time to time, or not even compile.

Installing With Package Managers On Various Distributions

If there is a package for your distributions preferred package manager, it is recommended to use it instead of compiling the program yourself from sources.

0.74b3 For Etch (Debian 4.0 Stable) With APT

echo "deb http://www.osrts.info/~tvo/deb etch spring" >> /etc/apt/sources.list
aptitude update
aptitude install spring spring-data

Your paths are: Spring executable in /usr/games/spring and read-only data in /usr/share/games/spring.

0.74b3 For Sid (Debian Unstable) With APT

The current .deb for Sid is broken, because it depends on some boost packages of version 1.33 that are not installable on sid, which has only 1.34. A slightly more complex way to install is necessary:

echo "deb http://www.osrts.info/~tvo/deb sid spring" >> /etc/apt/sources.list
echo "deb-src http://www.osrts.info/~tvo/deb sid spring" >> /etc/apt/sources.list
aptitude update
aptitude install dpkg-dev devscripts
apt-get source spring
apt-get build-dep spring
cd spring-0.74~b3/
debuild -us -uc
debi

Your paths are: Spring executable in /usr/games/spring and read-only data in /usr/share/games/spring.

0.74b3 For Ubuntu (any version) With APT

If you have boost 1.33, then all you need is:

echo "deb http://www.osrts.info/~tvo/deb edgy spring" >> /etc/apt/sources.list
aptitude update
aptitude install spring spring-data

If you have boost 1.34, you have to do it the same way as debian unstable:

echo "deb http://www.osrts.info/~tvo/deb edgy spring" >> /etc/apt/sources.list
echo "deb-src http://www.osrts.info/~tvo/deb edgy spring" >> /etc/apt/sources.list
aptitude update
aptitude install dpkg-dev devscripts
apt-get source spring
apt-get build-dep spring
cd spring-0.74~b3/
debuild -us -uc
debi

Your paths are: Spring executable in /usr/games/spring and read-only data in /usr/share/games/spring.

0.74b3 For Gentoo With Portage

Make an overlay for portage, download the ebuilds, and extract to populate the overlay:

mkdir -p /usr/local/portage
echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf
wget http://download.berlios.de/taspring-linux/spring-ebuilds-0.74-r3.tar.bz2 ||
    wget http://download2.berlios.de/taspring-linux/spring-ebuilds-0.74-r3.tar.bz2
tar xjf spring-ebuilds-0.74-r3.tar.bz2 -C /usr/local/portage/

If you are not running unstable (~x86), do the following:

echo "games-strategy/spring               ~x86" >> /etc/portage/package.keywords
echo "games-strategy/spring-base-ota      ~x86" >> /etc/portage/package.keywords
echo "games-strategy/spring-mod-xta       ~x86" >> /etc/portage/package.keywords
echo "games-strategy/spring-mod-gundamrts ~x86" >> /etc/portage/package.keywords
echo "games-strategy/spring-mod-nanoblobs ~x86" >> /etc/portage/package.keywords

Some packages need to be built with certain use flags set, this makes sure it happens:

echo "media-libs/libsdl    X opengl"     >> /etc/portage/package.use
echo "dev-libs/boost       threads"      >> /etc/portage/package.use
emerge media-libs/libsdl dev-libs/boost

Add yourself to the group games. Don't do this as root, do this as the user you normally use to play (you have to relogin afterwards to make it work):

gpasswd -a $(whoami) games

And finally emerge spring itself, along with some datafile packages (ignore the use flags for spring ebuild):

emerge unzip spring spring-base-ota spring-mod-xta spring-mod-gundamrts
emerge spring-mod-nanoblobs
etc-update

Your paths are: Spring executable in /usr/games/bin/spring and read-only data in /usr/share/games/spring.

Installing 0.74b3 From Source

If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.

Getting The Source

You can either download the source as a 4.7MB tarball (recommended) or get it from the subversion repository. Either way, the result is the same for 0.74b3.

Downloading A Tarball
cd /tmp
wget http://download.berlios.de/taspring-linux/spring_0.74b3_src.tar.bz2 ||
    wget http://download2.berlios.de/taspring-linux/spring_0.74b3_src.tar.bz2
tar xjf spring_0.74b3_src.tar.bz2
cd spring_0.74b3
Checking Out From Subversion
aptitude install subversion # if you are not on debian, figure it out
svn co https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b3 /tmp/spring_0.74b3
cd /tmp/spring_0.74b3

Getting The Dependencies

For Etch (debian 4.0 stable) and Sid (debian unstable), I've confirmed the following to be the minimal set that is necessary to get. I have not tested with any version of Ubuntu, but the line is probably almost identical if not the same.

aptitude install scons build-essential zlib1g-dev libfreetype6-dev
aptitude install libsdl1.2-dev libopenal-dev libglew-dev libboost-dev
aptitude install libboost-thread-dev libboost-regex-dev libdevil-dev
aptitude install python2.4-dev zip

This has been tested to work with a clean install of gentoo 2007.0:

emerge dev-util/scons \>=media-libs/freetype-2.0.0 \>=media-libs/libsdl-1.2.0
emerge media-libs/openal =dev-lang/python-2.4\* media-libs/glew dev-libs/boost
emerge media-libs/devil app-arch/zip

Users of other distributions should be able to figure out the correct package names from this. The scons configure will whine if you forget something, but it does not check if you remembered to install zip, even though you still need it.

Building And Installing

The build will spew out warnings like the following, which you can safely ignore:

warning: division by zero
warning: 'q' may be used uninitialized in this function

Configure, build and install:

scons configure
scons
scons install
mkdir -p /etc/spring/datadir
echo '$HOME/.spring' > /etc/spring/datadir

Your paths are: Spring executable in /usr/local/games/spring and read-only data in /usr/local/share/games/spring.

Finalizing installation

Now all the things you needed to run as root have been done. Some stuff needs to be done by the user who is going to play spring.

I'm assuming bash here, but you can use anything you like to do it of course.

Making Data Directories

mkdir -p ~/.spring/{base,maps,mods}

Getting Maps

You need at least one map to succesfully run spring.

Go to Unknown Files, Map Section and download at least one map. Save it under ~/.spring/maps/ without unpacking the file in any way.

Hint: If you know the map name you want, there is a Quick Search in the top right corner of the page. Just write a part of the name, like one word, and you'll easily find what you were looking for.

Getting Mods

You need at least one mod to successfully run spring.

Go to Unknown Files, Mod Section and download at least one mod. Save it under ~/.spring/mods/ without unpacking the file in any way.

Hint: If you know the mod name you want, there is a Quick Search in the top right corner of the page. Just write a part of the name, like one word, and you'll easily find what you were looking for.

If you want to play mods based on Total Annihilation, for example XTA, AA, BA, then you have to do the following:

wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip
unzip -d ~/.spring/base base-ota-content.zip

Note that you need to own a copy of Total Annihilation, to download this file legally.

==

Tips:

  • If spring hangs/crashes while in full screen mode, you can press ctrl+alt+backspace to restart X, so no need for a reboot.
  • Spring uses OpenAL for sound, Config your sound output i.e esd / arts / oss / alsa by editing /etc/openalrc or ~/.openalrc, example: ("'(" is not a typo)

    (define devices '(alsa))
    (define speaker-num 2)

    (define alsa-out-device "hw:0,0")
    (define alsa-in-device "hw:0,0")


    Adventurous people with an emu10k1 based card (sblive) can try the accelerated openal version. http://www.lost.org.uk/openal.html , don't submit audiobugs if you do.
  • If you really can't figure out how to get spring compiled, or you think there's a bug in the code or the buildsystem...
  • Just poke any developer on IRC:

Settings Editing

the .springrc file is difficult to edit by hand, and the windows settings editor won't change your settings, so use Kloot's Settings++. untar it anywhere and open it by typing "./Settings++" and edit away.

<- Back to Main page