HOWTO: TA Spring Linux SVN Startup

HOWTO: TA Spring Linux SVN Startup

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

HOWTO: TA Spring Linux SVN Startup

Post by keithjr »

I'm going to shamelessly rip off the Ubuntu forums with the howto syntax. This is intended to be a simple, step-by-step guide to get spring downloaded, installed, and running on linux USING SVN. Deb-spring still offers a simpler solution for debian-ish users, but this is for those who want to put things together themselves. I've been meaning to put this together for a while now.

This guide is primarily based off of the wiki setup guide (http://spring.clan-sy.com/wiki/SetupGuide) but I takes a slightly different path in the locations of files and use of links. There really isn't a right or wrong to that part...

0. Get what you need
These are the packages you must first download with your package manager of choice:
build-essential subversion scons libsdl-dev libopenal-dev libglew-dev libboost-dev libboost-thread-dev libboost-filesystem-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev

May vary from distro to distro. You'll know very quickly if you've missed something, so don't fret.

1. Get the source code
Using subversion, you can check out a branch of the latest stable ("tagged") build, currently 0.74b3.
Create a new directory for source files

Code: Select all

mkdir src
cd src
Check out, using subversion, the tagged branch

Code: Select all

svn checkout https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b3/
2. Build the source

Enter the new directory and use scons (an alternative to make) to build the game.

Code: Select all

cd taspring_0.74b3
scons configure
scons
The scons configure step should end by telling you everything looks OK. If it fails, find the library it complains about and make sure you have installed the corresponding '-dev' package in step 0.

3. Put the game in its own place
This is where things start getting optional, somebody please let me know if it is unpleasant or wrong.

Create a directory for the program. I chose a hidden home directory, you don't have to. Copy the contents of the 'game' folder into this location.

Code: Select all

cd game
mkdir ~/.spring
cp -R * ~/.spring
4. Get Linux Data
Additional data required to correctly run in linux can be found here: http://prdownload.berlios.de/taspring-l ... b1.tar.bz2

Download the archive and extract the contents to the same location. It should be okay to overwrite files (can somebody confirm this? It's done me no harm and makes things very simple).

5. Symbolic links are your friend
To make things easy, you can make a symbolic link to your usr/bin directory that points to your new spring executable so that calling "spring" from a command prompt starts the program.

NOTE: YOU MAY NEED ROOT ACCESS FOR THIS. Debian users can probably use sudo, others may want to su.

Code: Select all

ln -s /home/YOUR_USER_NAME/.springdir/spring /usr/bin
5a. Tell spring where spring is
Spring looks in a few places to find out where the data directory (called the datadir) is located. So, let's inform it by placing the path into a setting file in /etc...

Code: Select all

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

6. Run, Spring, Run!

Code: Select all

spring
If all goes well, it should bring up a simple in-game menu. I recommend running the Air Combat Test on SmallDivide with XTAPE, although you have little choice at this point. Watch some planes blow each other up.

7. Get more stuff!
Check out the following places for maps and other content
http://www.ta-spring.com/maps
http://www.unknown-files.net

Also search around the forums for more content like mods and AI's.

Keep in mind that this guide refers you to how to install the tagged 0.73b1 release. If you want to be on the bleeding edge, you can replace step 1's URL with https://taspring.clan-sy.com/svn/spring/trunk and get the latest revision. However, this may be unstable or broken at any point.


Optional: Spring-gui

Our local pygtk hero hollowsoul made a very nice gui which is currently the only way to automatically set up a spring game if you download svn (deb-spring has a nice command line script but this guide assumes an svn install)

Download Spring-GUI-3.12.

Extract it into your spring directory, which in this config is $HOME/.spring

Build unitsync.so and export it to spring-gui:

Code: Select all

cd ~/src/taspring_0.73b1
scons omni
cd omni
cp unitsync.so $HOME/.spring/spring-gui-3.12
Again, symlinks are your friend...

Code: Select all

chmod a+x $HOME/.spring/spring-gui-3.12/main.py
ln -s $HOME/.spring/spring-gui-3.12/main.py /usr/bin/spring-gui
Finally, you need to edit the file "Global.py" in the spring-gui-3.12 folder to make sure that it is pointing to the right place for the spring executable and paths. This should be self-explanatory when you look at the file.

Now get your GUI on...

Code: Select all

spring-gui

*Thanks to AF, for the content links (and being awesome), and hollowsoul, for datadir settings and spring-gui (and being awesome).
Last edited by keithjr on 24 Jan 2007, 03:32, edited 13 times in total.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

btw with latest svn u dont really need to copy whole thing to home directory.
as spring now supports multi datadirs i.e u could have spring installed in

/usr/share/games/taspring-linux-svn (read-only)
$HOME/.spring (read-write)

Gonna go test it out in abit & write down what u need todo
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

This is based off of getting the tagged 0.72b1 release. This is what I figured most mainstream players would want. But this is good info, I might work it into the guide.


EDIT- added a step in main post. thanks, hollowsoul.
Last edited by keithjr on 10 Aug 2006, 22:43, edited 2 times in total.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

type

Code: Select all

mkdir -p /etc/spring
echo '$HOME/.spring' > /etc/spring/datadir
the spring binary has to find out where the spring datadir is. or u could specfy it in $HOME/.springrc aswell

Or to save hassle just install it somewhere
type

Code: Select all

chown -R root:games /path/to/spring/datadir
chmod -R g+w /path/to/spring/datadir
Now all users got read&write access to datadir. That are in the group games
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

yup I was just about to see that in Tobi's new awesome sticky post. You guys respond too fast! :wink:

With my setup, there's no setting for the location of the datadir so it uses the current working directory as default... *light dawns over marble head*
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

http://www.ta-spring.com/maps
http://www.unknown-files.net

Use them two addresses for maps, the latter hosting other stuff too.
Remember fileunvierse wont let you download maps, and the mirrors that work just point to the file on unknown-files.net
hazard
Posts: 11
Joined: 10 Aug 2006, 16:36

Post by hazard »

keithjr wrote:This is based off of getting the tagged 0.72b1 release. This is what I figured most mainstream players would want. But this is good info, I might work it into the guide.

Although last night I found a bug in my own guide... I cannot get spring to run unless I issue "spring" (or "./spring") from the ~/.spring directory... why is this? The symlink should make it independent of the current working directory...

man...
it might be easier/more effective to add ~/.spring to the $PATH varible.

echo "PATH=~/.spring:$PATH" 1>>~/.bashrc

Of course, there's no reason that the symbolic link shouldn't work (its doing the same thing, making a link to a folder which SHOULD be in your $PATH (unless /usr/bin isn't in your system's $PATH for some silly reason).
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

the problem wasn't with the symlink, the problem was with spring not being able to find the datadir without the path being specified in /etc/spring/datadir. hollowsoul's post resolves this problem.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

added blurb on getting spring-gui working, cause why not.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

This posts aims at SVN, what about tagged releases?

Not everyone wants to use the latest, greatest and probably buggiest.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

This is for tagged release.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

oops, i thought because it was SVN that it would be for the actual svn devel version, hehe, i really need to read before i post :)
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

Just a note - Game runs fine without a .springrc for me on ubuntu dapper and i don't see why you would hide the directory in your home?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

U do realise .springrc is the conf file for spring ?

edit: or maybe u meant .spring

Its nicer to not have your $HOME cluttered up :)
Just leave out the . and it wont be hidden
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

clericvash wrote:Just a note - Game runs fine without a .springrc for me on ubuntu dapper and i don't see why you would hide the directory in your home?
I think you are right, I think I was messing something else up entirely when I wrote that. Removing it for now, though it really doesn't do any harm.

And yes, anybody can feel free to do whatever they want with the location of the data directory. The modus operandi for most games is to put save files in the home folder so they can be user-dependent. Being hidden is just a choice for simplicity. It's linux. The choice is yours.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

hollowsoul wrote:U do realise .springrc is the conf file for spring ?

edit: or maybe u meant .spring
No i did mean what i said :P, he put a bit saying his spring didn't work unless he made the folder .springrc, i was pointing out mine worked without it :)
hollowsoul wrote: Its nicer to not have your $HOME cluttered up :)
Just leave out the . and it wont be hidden
Yeah, your right, i prefer to keep mine un-hidden so i don't have to view the hidden folders when i download a new map or mod to put in, that would annoy me :P
own3d
Posts: 129
Joined: 25 Aug 2006, 16:31

Ubuntu compile workaround

Post by own3d »

Bad memory, I replaced it and its working now.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Re: Ubuntu compile workaround

Post by keithjr »

own3d wrote:Bad memory, I replaced it and its working now.
I think you meant this for a different thread, per-maybe-haps?

...first post for a couple weeks and that's the best I can do? Fooey.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

I've updated the information here to point to the 0.73b1 tagged svn branch, as well as the new packages for the linux-data.

hollow, what are the new installation instructions for UnityLobby? Should they just copy the code from the svn into the spring datadir and run main.py just like in spring-gui? It seems to have unitsync.o already in there...
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

scons unitsync will put unitsync.so into the right directory thx to tvo for that.

To run

Code: Select all

python /path/to/UnityLobby/Unity.py
Rquirements
  • pygtk-2.10
    gtk-2.10
    python imaging library (PIL)
    python 2.4 (havent tried if 2.5 works yet)
Post Reply

Return to “Linux”