View topic - Generic Spring SVN install script.


All times are UTC + 1 hour


Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: 03 Sep 2006, 11:16 

Joined: 12 Aug 2006, 20:35
requires: svn, wget
Usage (after examining):

> sh spring_build.sh

Code:

#!/bin/sh
# Assuming you have all compiletime dependencies installed,
# this downloads and builds spring svn in $TLD.
# version Mon Mar  5 10:49:56 CET 2007

TLD=~/spring

# Update existing svn build to current.
if [[ -d $TLD/svn/trunk && -f $TLD/game/spring && -f $TLD/UnityLobby/client/unitsync.so ]]
then
  cd $TLD/svn/trunk
  svn up | tee svn.log
  if $(tail -n1 svn.log | grep -q '^At')
  then
    clear
    tail -n1 svn.log
    echo "Already Up to date."
    exit
  else
    scons -c
    scons configure && scons
    cp -rf game/*  $TLD/game
    cp -rf UnityLobby $TLD
    rm $TLD/game/AI/AAI/cfg/mod/xtape.cfg        2>1&> /dev/null
    rm $TLD/game/AI/AAI/log/BuildTable_XTAPE.txt 2>1&> /dev/null
    clear
    tail -n1 svn.log
    echo "Up to date."
    exit
  fi

else

# Setup directories.
mkdir -p $TLD/svn


# Download free game data (includes Nanoblobs mod.)
cd $TLD
wget http://download2.berlios.de/taspring-linux/spring-linux-data-0.74b1.tar.bz2
tar -jxf spring-linux-data-0.74b1.tar.bz2
mv spring-linux-data-0.74b1 game
rm spring-linux-data-0.74b1.tar.bz2


# Download non-free data (includes XTA mod.)
# Comment out if you do not want non-free mod/data.
cd $TLD/game/base
wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip
unzip base-ota-content.zip
rm base-ota-content.zip
cd $TLD/game/mods
wget http://ipxserver.dyndns.org/games/spring/mods/xta/XTAPE.sd7


# Download svn source.
echo -e "\n\n$0 says: Choose p upon certificate misconfiguration trouble.\n"
cd $TLD/svn
svn co https://taspring.clan-sy.com/svn/spring/trunk


# Build spring engine and AI and copy them to the game tree.
cd $TLD/svn/trunk
scons configure && scons
cp -rf game/*  $TLD/game


# Some cleanup for AAI/XTA
cd $TLD/game/AI/AAI/cfg/mod/
wget http://ipxserver.dyndns.org/games/spring/mods/xta/XTAPE.cfg -O XTAPE.cfg
rm $TLD/game/AI/AAI/cfg/mod/xtape.cfg        2>1&> /dev/null
rm $TLD/game/AI/AAI/learn/mod/XTAPE.dat      2>1&> /dev/null
rm $TLD/game/AI/AAI/log/BuildTable_XTAPE.txt 2>1&> /dev/null

# Copy Unity spring trayicon frontend.
cd $TLD/svn/trunk
cp -rf UnityLobby $TLD


# Setup a Unity default profile.
cat > $TLD/UnityLobby/profiles/default.profile <<EOF
[SETUP]
PROFILE_NAME = $USER
SPRING_DATADIR = $TLD/game
SPRING_BINARY = $TLD/game/spring
UNITSYNC_LOCATION = $TLD/UnityLobby/client
EOF


# Some guidance.
clear
cat <<EOF

Remove existing  ~/.springrc ~/.unity-lobby unless you know what you are doing.

To start spring directly:
  > cd $TLD/game && ./spring

To start spring with the Unity trayicon frontend:
  > cd $TLD/UnityLobby && ./Unity.py
  (Upon Unity errors, make sure you are using the latest gtk/gdk/pango/pygtk/librsvg.)"

To update an earlier install wih this script in $TLD to the latest SVN engine version:
  > sh $0

Comments at:
   http://spring.clan-sy.com/phpbb/viewtopic.php?p=119032

EOF

fi


Last edited by pheldens on 05 Mar 2007, 13:22, edited 4 times in total.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 04 Mar 2007, 23:58 

Joined: 12 Aug 2006, 20:35
Updated to present situation and versions.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 00:00 
User avatar

Joined: 05 Oct 2004, 00:05
Well done, i think this will help quite a few people :), or just save time for lazy people. Mabye this should be stickied?
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 00:22 

Joined: 06 Jun 2006, 18:49
Note with UnityLobby in spring svn
Its possible to automate the setup, so user doesnt need togo through the setup
Have a look at both files
Code:
trunk/UnityLobby/profiles/README
trunk/UnityLobby/profiles/example.profile
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 01:29 

Joined: 12 Aug 2006, 20:35
thx, fixed.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 08:40 
User avatar

Joined: 24 Feb 2007, 14:43
Great stuff! I just tried it out, works like a charm.

Should be stickied.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 13:30 

Joined: 12 Aug 2006, 20:35
Updated
- Autodetected svn updates and subsequent building.
- Added https cert warning instruction.
- Changed unitsync.so handling to new situation
(built into Unitylobby/client already)
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 14:02 
Damned Developer
User avatar

Joined: 15 Sep 2004, 17:56
Location: Lahti, Finland
gotta try this :) going to try in opensuse too ^^
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 15:40 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
Be aware that svn trunk builds will most likely desync with windows users and people who use the debian packages.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 16:31 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Yeah don't use trunk Spring builds if you want to stay compatible.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Mar 2007, 17:17 

Joined: 12 Aug 2006, 20:35
yes, backup your existing ~/.springrc and ~/.unity-lobby, for the rest it's isolated into it's own directory.

If you want to return to stable, or other previous install, remove $TLD, and restore ~/.springrc and ~/.unity-lobby.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 20 Mar 2007, 17:40 

Joined: 28 Sep 2006, 14:02
I'm lost, I can't understand what is wrong...
I run the script and it was fine, but I can't manage to run the game.


Code:
maxim@maxim:~/spring/game$ && ./spring
bash: syntax error near unexpected token `&&'
maxim@maxim:~/spring/game$ ./spring
bash: ./spring: No such file or directory
maxim@maxim:~/spring/game$ spring
I: workdir is '/home/maxim/.springdir/maxim:0.0'
I: type spring-setup to configure spring
sh: /usr/bin/spring.bin: not found
maxim@maxim:~/spring/game$ spring-setup
E: Unable to determine default mod.
maxim@maxim:~/spring/game$ spring setup
I: workdir is '/home/maxim/.springdir/maxim:0.0'
I: type spring-setup to configure spring
sh: /usr/bin/spring.bin: not found


I use Ubuntu Edgy...
except the old debrpring nothing works for me.
I removed it before I run the script.
I don't know what to do at this point.

P.S
you should update the svn to the newest version 0.74c
Top
 Offline Profile  
 
 Post subject:
PostPosted: 20 Mar 2007, 18:27 

Joined: 06 Jun 2006, 18:49
@ Maxddark
Looks like something is still left from debspring.
Why u install a package thats over 1/2 year old ?
Top
 Offline Profile  
 
 Post subject:
PostPosted: 20 Mar 2007, 18:42 

Joined: 28 Sep 2006, 14:02
at that time this was the easiest way to install spring under Ubuntu.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 21 Mar 2007, 01:20 

Joined: 12 Aug 2006, 20:35
If you just tried updating the data package for your exisiting install, that wont work; differing versions and wrong install path. I linked you here for the url to the data files you requested. Contact an ubuntu spring user if you want to continue with the ubuntu/debian specific install.


If you ran this script, or decide to continue with this script;
It didn't build a spring executable by the looks of it. You need all dependencies for it to work (gcc/svn/dev libs etc). And delete your old spring install and old spring config. This would then be an incompatible latest svn install, solely suited for offline play, or online play against users using the same checkout.
Top
 Offline Profile  
 
 Post subject: Debian only?
PostPosted: 25 Mar 2007, 11:31 

Joined: 03 Feb 2007, 13:15
It seems that this only work with deb distros, tryed this on OpenSUSE and it will install it but "... && ./spring" command dont start anything, because there is no spring bin.

And this script should be updated to new beta 3 version....
Top
 Offline Profile  
 
 Post subject:
PostPosted: 25 Mar 2007, 22:20 

Joined: 12 Aug 2006, 20:35
I just checked, and 74b1 seems to be the most recent game data for linux.

The script is distro neutral (I dont use debian or clones), it's just what you would normally do by hand to build spring svn. If it doesn't build the binary, you can check why by executing the scons build step manually. Your distro install probably doesn't meet the spring build requirements. (install all spring deps with dev packages as is stated)

I will add a warning and stop to make this clearer.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 27 Mar 2007, 08:08 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
I discontinued making data packages, as I think it's now easy enough to grab some mods & maps from http://spring.unknown-files.net and use the base data that's in the SVN.
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.