SetupGuide
Linux Setup Guide
Which Version To Install
0.75b2 has been released not so long ago. This affects some parts of this guide. Currently this guide is MOSTLY updated. I will remove this notice when the pages are fully up to date. Everything that is not especially marked as old should be up to date.
To play online, you must have the same version as everyone else in the game.
Most people should get the current release, version 0.75b2. There are usually between 100 and 200 people online in the lobby, and if you want to play with them, you need this.
Do not use older than current release version, unless you really know what you are doing.
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.
TODO Yokozar is the new official .deb maintainer, he should have debs for 0.75b2 in a repository sooner or later.
0.74b3 For Etch (Debian 4.0 Stable) With APT
DO NOT USE THIS, IT IS FOR OLD VERSION
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
DO NOT USE THIS, IT IS FOR OLD VERSION
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
DO NOT USE THIS, IT IS FOR OLD VERSION
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.75b2 For Gentoo With Portage
The location of the overlay will change as soon as we get this in official portage.
An overlay to use with layman is provided. If gentoo overlays and/or layman are new to you, read about them, as they are an essential part of gentoo.
This example assumes you never used layman before. If it's not your first time, you hopefully know what to do.
emerge layman
layman -f -a spring-unofficial \
-o http://svn.springlobby.info/trunk/gentoo/overlays.xml
echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
echo "games-strategy/spring ~x86" >> /etc/portage/package.keywords
emerge spring
Layman makes upgrading really easy too:
layman --sync ALL
emerge spring
Your paths are: Spring executable in /usr/games/bin/spring and
read-only data in /usr/share/games/spring.
Installing 0.75b2 From Source
You might encounter sync errors in online play if you are not using the exact same version of the compiler and same compiler settings as used for prebuilt packages!
For 0.75b2 these are: TODO add them here.
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 3.9MB tarball (recommended; v. 0.75b2) or get it from the subversion repository. Either way, the result is the same.
Downloading A Tarball
cd /tmp
wget http://spring.clan-sy.com/dl/spring_0.75b2_src.tar.bz2
tar xjf spring_0.75b2_src.tar.bz2
cd spring_0.75b2
Checking Out From Subversion
aptitude install subversion # if you are not on debian, figure it out
svn co https://spring.clan-sy.com/svn/spring/tags/spring_0.75b2 /tmp/spring_0.75b2
cd /tmp/spring_0.75b2
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. Quilted tested with ubuntu fiesty fawn on july 28 2007 WORKS.
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
aptitude install libsablevm1-dev
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
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 view unit stats of mods, this is the site for you.
Getting OTA Content
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.
Editing Settings
Defaults should be usable, so you can ignore this until you want to maximise your eye candy or fps :)
When you run spring the first time, it creates ~/.springrc which contains all the settings. It is a simple text file with name=value lines, most of which are pretty obvious and can be edited by hand.
If you want a tool for editing the file, you can use Kloot's Settings++. Untar it anywhere and open it by typing "./Settings++" and edit away.
Using LuaUI
Spring UI is scriptable with Lua. This is called LuaUI, and it is not enabled per default.
Replace LuaUI=0 with LuaUI=1 in your ~/.springrc to use LuaUI.
Lua scripts for LuaUI can be found in Unknown Files LuaUI Section.
TODO need more stuff here.
Installing Lobby Client
To setup online games, you need a lobby client. There are several options to choose from.
You can also use lobby client to setup single player matches against the AI. TODO more information about setting up tasclient to play against AI.
Recommended lobby client for linux is either SpringLobby or AFLobby. You can use them in windows and mac too.
Omni
This project has been abandoned, and you should not use it.
UnityLobby
UnityLobby has been abandoned since april 2007, and you should not use it.
SpringLobby
SpringLobby is for (at least) Windows, Linux and Mac. It's now in a usable state and has a feature set close to that of TASClient for windows. Try it out! Bug reports and feature requests are very much welcome.
Visit http://springlobby.info for all things SpringLobby.
AFLobby
This project is very promising, but is still in beta development. However, is usable for online multiplayer. See forum thread: http://spring.clan-sy.com/phpbb/viewtopic.php?t=8691
TASClient
I used to recommend wine+TASClient solution before, but now you should try SpringLobby or AFLobby first, before you go this route.
Certain newish version of wine fails with tasclient, TODO can't remember which one. It should be fixed in the very latest version of wine.
This is a windows program, but it works just fine under wine in linux, and can be used together with native linux spring. I used it myself before moving to SpringLobby.
The only two downsides in using this are that you have to use wine (which should not be a big problem) and your rank won't increase as long as you use it (also because of win-linux binary interaction).
Download the installer of Spring for Windows, and run it in wine:
wget http://spring.clan-sy.com/dl/spring_0.75b2.exe
wine spring_0.75b2.exe
No configuration of wine should be needed, if your distribution is sane.
Complete the install, and let it install to the default location, which is Program Files\Spring.
Assuming you completed the earlier step of creating the data directories, now we need to link the windows and linux data together:
WINESPRING=~/.wine/drive_c/Program\ Files/Spring
NATIVE=~/.spring
touch "${WINESPRING}/script.txt"
ln -s "${WINESPRING}/script.txt" "${NATIVE}/script.txt"
rm -r "${WINESPRING}/maps"
ln -s "${NATIVE}/maps" "${WINESPRING}/maps"
rm -r "${WINESPRING}/mods"
ln -s "${NATIVE}/mods" "${WINESPRING}/mods"
rm -r "${WINESPRING}/base"
ln -s "${NATIVE}/base" "${WINESPRING}/base"
rm -r "${WINESPRING}/demos"
ln -s "${NATIVE}/demos" "${WINESPRING}/demos"
For the windows-TASClient to be able to launch native linux spring, we need a wrapper exe in between them. Source code for wrapper exe is:
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#define NATIVE_SPRING_LOCATION TEXT("/usr/games/spring")
#define SPRING_VERSION_REPLY "Spring 0.75b2"
int main (int argc, char **argv)
{
if (argc > 1 && !strcmp(argv[1], "/V"))
{
puts(SPRING_VERSION_REPLY);
return 0;
}
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if (!CreateProcess(
_tcsdup(NATIVE_SPRING_LOCATION), // No module name (use command line)
GetCommandLine(), // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi)) // Pointer to PROCESS_INFORMATION structure
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return 1;
}
// Wait until child process exits. Wine actually does not know how to wait
// for native linux process, so this will return instantly and your gametime
// counter does not increase so you don't get any rank.
WaitForSingleObject( pi.hProcess, INFINITE );
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
return 0;
}
You might need to modify the define-lines in the beginning to match your location and version. Remember, the version reply must be exactly right, or your game just breaks totally in multiplayer or you can't even login to lobby server.
Save this code to spring.cc for example, and then we need to install a windows-crosscompiler and compile a windows binary from it inside our linux box like this:
aptitude install mingw32
i586-mingw32msvc-g++ spring.cc -o ~/.wine/drive_c/Program\ Files/Spring/spring.exe
This assumed debian for installing the crosscompiler, but mingw32 is probably simple to install on other distributions as well.
TODO should provide binary packages for this launcher, as all people don't have the possibility to set up cross compiler.
Then you should make a script for launching TASClient. The script can be named tasclient for example, and just put it somewhere in your path and make it executable. The script code is:
#!/usr/bin/env sh
cd ~/.wine/drive_c/Program\ Files/Spring
wine TASClient.exe
Now you should be able to type tasclient on the command line, and the lobby appears. This cd operation is necessary. If your working directory is not the same as TASClient.exe's location, it will just give access violations to you.
Note that every time when you have added new maps, the lobby client caches them and this will take some time, or a long time if you downloaded many maps since last time. Just wait patiently.
Then you should register an account and login with it, and you should be ready to join an online multiplayer game from the list that appears.
It's likely that you don't have the correct map or mod at this point, so just get them and join the game. You don't need to restart your lobby client after downloading the files.
It's recommended that you spectate a couple of high rank games first, to get some idea of how the game should be played. Some hosts don't allow spectators, but most do.
Troubleshooting
Missing Default Cursor
This or any similar error of not being able to find a specific file are usually because the mod you are using needs ota content, download & install as explained earlier in this document.
game dies with sounds/button9.wav "cant find wav file"
Same problem as above.
GL_ARB_texture_compression not found
This can be an issue with your gpu drivers. TODO add solutions. Anyone?
If You Still Have Problems
Join to #taspring on Freenode and tell me (semi_) that you have problems with installing, and I'll try to improve this guide to solve your problem, if I have time.
However, generic linux problems not really related to installing this should be asked elsewhere.
Prepare to tell me your distribution, which installation method you used, and what exactly is the error. Don't ask if I'm here or not, just state your problem there and I'll look into it when I come back.
Other common problems and solutions coming soon.
Can't See Configure Options Before Configuring
If you want to see the configure options, because of a bug in the buildsystem you have to have spring configured first. But if configure fails, you are out of luck. So I have listed the options here:
$ scons --help
scons: Reading SConscript files ...
make: Nothing to be done for `all'.
Succes building streflop!
Updating bitmaps.sdz
Updating springcontent.sdz
scons: done reading SConscript files.
platform: Set to linux, freebsd or windows
default: None
actual: linux
debug: Set to yes to produce a binary with debug information
default: 0
actual: 0
syncdebug: Set to yes to enable the sync debugger
default: False
actual: False
optimize: Enable processor optimizations during compilation
default: 1
actual: 2
profile: Set to yes to produce a binary with profiling information
default: False
actual: False
cpppath: Set path to extra header files
default: []
actual:
libpath: Set path to extra libraries
default: []
actual:
fpmath: Set to 387 or SSE on i386 and AMD64 architectures
default: 387
actual: 387
prefix: Install prefix used at runtime
default: /usr/local
actual: /usr/local
installprefix: Install prefix used for installion
default: /usr/local
actual: /usr/local
datadir: Data directory (relative to prefix)
default: share/games/spring
actual: share/games/spring
bindir: Directory for executables (rel. to prefix)
default: games
actual: games
libdir: Directory for AI plugin modules (rel. to prefix)
default: lib/spring
actual: lib/spring
strip: Discard symbols from the executable
(only when neither debugging nor profiling)
default: True
actual: True
disable_avi: Set to no to turn on avi support
default: False on windows, True otherwise
actual: True
use_tcmalloc: Use tcmalloc from goog-perftools for memory allocation
default: False
actual: False
use_mmgr: Use memory manager
default: False
actual: False
cachedir: Cache directory (see scons manual)
default: None
actual:
Use scons -H for help about command-line options.
LuaUI Crash Ingame
LuaUI can crash during game, because some lua script you use has a bug. 0.75 should be resistant to this problem, but 0.74b3 is not. After crash, you won't see the bottom left tooltip box and top right resource bar anymore. Fear not, help is near:
/resbar 1
/tooltip 1
These might not be necessary in 0.75 anymore at all.
Also, you won't be able to change the build menu page with mouse anymore, but keys , and . do the trick.
Tips
This section contains just some old crap I didn't write, and shouldn't be necessary.
- 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:
- Post it on the forum
- or file a bug in our bug tracking system.