SetupGuide: Difference between revisions

From Spring
Jump to navigationJump to search
Tobi (talk | contribs)
add debian/ubuntu insns w/ debs
Tobi (talk | contribs)
rewrite part about all other linux distros, cleanup
Line 1: Line 1:
== Linux Setup Guide ==
== Linux Setup Guide ==


=== gentoo linux ===
=== Gentoo linux ===
* If you're running [http://www.gentoo.org Gentoo linux], you're lucky, because [http://developer.berlios.de/project/showfiles.php?group_id=4358 an ebuild is already available].<br>The best way to install the ebuild in gentoo would be to add an portage overlay and copy the file into the overlay. Now in detail:<br>
* If you're running [http://www.gentoo.org Gentoo linux], you're lucky, because [http://developer.berlios.de/project/showfiles.php?group_id=4358 an ebuild is already available].<br>The best way to install the ebuild in gentoo would be to add an portage overlay and copy the file into the overlay. Now in detail:<br>
:# <b>mkdir /usr/local/portage</b>
:# <b>mkdir /usr/local/portage</b>
Line 36: Line 36:
:* Afterwards do: <b>emerge taspring-linux-release</b>
:* Afterwards do: <b>emerge taspring-linux-release</b>


=== Debian & Ubuntu & derivatives ===
=== Debian, Ubuntu & derivatives ===


* Add one of the following lines to your /etc/apt/sources.list file to enable the repository with spring packages.<br><br><code>deb http://www.osrts.info/~tvo/deb edgy spring # Ubuntu Edgy Eft<br>deb http://www.osrts.info/~tvo/deb etch spring # Debian Testing<br>deb http://www.osrts.info/~tvo/deb sid spring &nbsp;# Debian Unstable<br></code>
* Add one of the following lines to your /etc/apt/sources.list file to enable the repository with spring packages.<br><br><code>deb http://www.osrts.info/~tvo/deb edgy spring # Ubuntu Edgy Eft<br>deb http://www.osrts.info/~tvo/deb etch spring # Debian Testing<br>deb http://www.osrts.info/~tvo/deb sid spring &nbsp;# Debian Unstable<br></code>
Line 48: Line 48:
* Point your browser to [http://spring.unknown-files.net/ Unknown Files]. Download at least one map from the map section (put it in ~/.spring/maps), and at least one mod from the mod section (put in ~/.spring/mods). The default maps are [http://spring.unknown-files.net/file/2106/SmallDivide/ SmallDivide] and [http://spring.unknown-files.net/file/2107/Mars/ Mars]. Default mods are either [http://spring.unknown-files.net/file/1967/XTA_v8.1/ XTA] or [http://spring.unknown-files.net/file/1977/NanoBlobs_0.64GPL_Release./ NanoBlobs] (XTA is based on Total Annihilation content, NanoBlobs is free).
* Point your browser to [http://spring.unknown-files.net/ Unknown Files]. Download at least one map from the map section (put it in ~/.spring/maps), and at least one mod from the mod section (put in ~/.spring/mods). The default maps are [http://spring.unknown-files.net/file/2106/SmallDivide/ SmallDivide] and [http://spring.unknown-files.net/file/2107/Mars/ Mars]. Default mods are either [http://spring.unknown-files.net/file/1967/XTA_v8.1/ XTA] or [http://spring.unknown-files.net/file/1977/NanoBlobs_0.64GPL_Release./ NanoBlobs] (XTA is based on Total Annihilation content, NanoBlobs is free).


* If you downloaded XTA in the previous step, or ever want to play mods that depend on Total Annihilation content (XTA, AA, BA, etc.), then do the following:<br><br><code>wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip<br>unzip -d ~/.spring/base base-ota-content.zip</code>. Note that you are legally required to own a copy of Total Annihilation if you do this.
* If you downloaded XTA in the previous step, or ever want to play mods that depend on Total Annihilation content (XTA, AA, BA, etc.), then do the following:<br><br><code>wget http://ipxserver.dyndns.org/games/spring/mods/xta/base-ota-content.zip<br>unzip -d ~/.spring/base base-ota-content.zip</code><br><br>Note that you are legally required to own a copy of Total Annihilation if you perform this last step.


=== all other linux distributions ===
=== All other linux distributions ===


==== For the impatient ====
* Make sure you have the following packages installed:<br><br><code>build-essential libsdl-dev libopenal-dev libglew-dev libboost-dev libboost-thread-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev scons subversion zip</code>


(installs everythingn to ~/spring)
* Create a working directory, we'll use this to compile spring:<br><br><code>mkdir ~/workdir<br>cd ~/workdir</code>
<pre>mkdir ~/spring; cd ~/spring
wget http://download.berlios.de/taspring-linux/spring-linux-data-0.74b1.tar.bz2
tar xfj spring-linux-data-0.74b1.tar.bz2
svn co https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b1 source
cd source
scons configure && scons
echo "SpringData=$HOME/spring/source/game:$HOME/spring/spring-linux-data-0.74b1" >> ~/.springrc</pre>


==== Instructions with explanation ====
* Download the most recent source tarball (.tar.bz2 file) from [http://developer.berlios.de/project/showfiles.php?group_id=4358 BerliOS], save it in ~/workdir.


In short, to get spring compiled under linux, make sure you've got all necessary development packages installed. On [http://www.ubuntu.com/ (K)Ubuntu linux], and maybe [http://www.debian.org/ Debian] too, this can be done by copying the following in a root terminal (or use the graphical package manager Synaptic or Adept if you can't stand commandline):<br><br><code>apt-get install build-essential subversion scons libsdl-dev libopenal-dev libglew-dev libboost-dev libboost-thread-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev zip</code><br><br>For any other distribution, grab these libraries and the base development packages too (for Gentoo, base development packages aren't needed, because everything is compiled from source: they're already installed). I've no clue about RPM based distros. But [http://www.google.com google] is your friend.
* Extract the tarball and switch to the directory (adjust version numbers if necessary):<br><br><code>tar xfj spring_0.74b3_src.tar.bz2<br>cd spring_0.74b3</code>


* Make a directory to put everything in, and change to that directory.<br>br><code>mkdir ~/spring; cd ~/spring</code>
* Configure: <code>scons configure</code><br>If this doesn't work, be sure to check you installed all dependencies, and peek at the file config.log, which may show the reason it didn't work in detail. To tune the configuration (installation paths, debugging, etc.), refer to: <code>scons -H</code>


* Grab the sourcecode for the latest release from subversion (using commandline SVN): <br><br><code>svn co https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b1</code> for the last official release.
* Compile by running: <code>scons</code><br>This can take 5-15 minutes depending on your system.


* To compile the sourcecode, switch to the taspring_0.74b1 directory created by the svn checkout in the previous step. Then type: <code>scons configure</code> to configure the build. (You can fine tune the build by passing options to this command [for enabling debugging/optimizing etc.]. Type <code>scons --help</code> to view the available options.) Now, if you really installed all development package, the scons configure will output: "Everything seems OK. Run `scons' now to build.". If it outputs with an error you've probably missing a development package.
* To install spring, run the following as root: <code>scons install</code>


* As instructed on end of previous step, type: <code>scons</code> Spring will now build including [[AAI]] and some [[GroupAI]]s. You should end up with a file <code>game/spring</code> (the executable) and some shared objects (SOs or DLLs) in <code>game/AI/Bot-libs</code> and <code>game/AI/Helper-libs</code>
* Set up spring to look in your home directory for data files (run as root):<br><br><code>mkdir -p /etc/spring<br>echo '$HOME/.spring' > /etc/spring/datadir'</code><br><br>Alternatively you can specify it in ~/.springrc (if you don't have root access):<br><br><code>echo "SpringData=$HOME/.spring" >> ~/.springrc</code>


* Now, grab [https://developer.berlios.de/project/showfiles.php?group_id=4358 the linux data tarball] and extract it somewhere. This will create a directory taspring-linux-data-0.74b1 (or higher version number).
* Now continue at the fourth (4th) step under <b>Debian, Ubuntu & derivatives</b>: "Create directories for data files".
 
* Set up data directories like this:<br><code>echo "SpringData=$HOME/spring/source/game:$HOME/spring/spring-linux-data-0.74b1" >> ~/.springrc</code>
 
* Now run spring. It'll automatically find data in the directories specified in the previous step. If you've compiled with debugging enabled, you might want to run inside gdb to provide the devs with a backtrace if spring crashes: <code>gdb ./spring</code>
** Basic commands inside gdb are:
*** <code>'''r'''un</code> - Run the program (spring)
*** <code>'''bt'''</code> - Print a backtrace
*** <code>'''q'''uit</code> - Quit
*** <code>'''help'''</code> - This one's important
 
* Be happy!


Tips:
Tips:


* Checkout [http://www.unknown-files.net Unknown Files] for much more maps & mods.
* If spring hangs/crashes while in full screen mode, you can press ctrl+alt+backspace to restart X, so no need for a reboot.
* 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)


<code>  
* 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)<br><br><code>(define devices '(alsa))<br>(define speaker-num 2)<br><br>(define alsa-out-device "hw:0,0")<br>(define alsa-in-device "hw:0,0")</code><br><br>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.
(define devices '(alsa))<br>
(define speaker-num 2)<br>
(define alsa-out-device "hw:0,0")<br>
(define alsa-in-device "hw:0,0")<br>
</code>
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...
* 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
:* Just poke any developer on IRC:
** channel <code>#taspring</code> on [http://freenode.net/ FreeNode]
::* channel <code>#taspring</code> on [http://freenode.net/ FreeNode]
** or channel <code>#sy</code> on [http://www.quakenet.org/ QuakeNet]
::* or channel <code>#sy</code> on [http://www.quakenet.org/ QuakeNet]
* post it on the forum
:* Post it on [http://taspring.clan-sy.com/phpbb/ the forum]
* or file a bug in our [http://taspring.clan-sy.com/mantis/ Bug tracking system].
:* or file a bug in our [http://taspring.clan-sy.com/mantis/ bug tracking system].


[[Category:Linux Port]][[Category:Playing]]
[[Category:Linux Port]][[Category:Playing]]

Revision as of 14:20, 29 January 2007

Linux Setup Guide

Gentoo linux

  • If you're running Gentoo linux, you're lucky, because an ebuild is already available.
    The best way to install the ebuild in gentoo would be to add an portage overlay and copy the file into the overlay. Now in detail:
  1. mkdir /usr/local/portage
  2. add this line to you /etc/make.conf
    PORTDIR_OVERLAY="/usr/local/portage"
  3. download the ebuild you want, for example: taspring-linux-release-ebuild-0.72-r1.tar.bz2
  4. mv taspring-linux-release-ebuild-0.72-r1.tar.bz2 /usr/local/portage
  5. cd /usr/local/portage
  6. tar jxvf taspring-linux-release-ebuild-0.72-r1.tar.bz2
  7. most likely you don't run a ~x86 system (unstable) so do a:
    echo "games-strategy/taspring-linux-release ~x86" >> /etc/portage/package.keywords
  8. echo "dev-libs/boost threads" >> /etc/portage/package.use
  9. You might want to have a look at the USE flags, type:
    emerge -pv taspring-linux-release
  10. finally install it with:
    emerge taspring-linux-release
  • if you get this error:
Calculating dependencies... done!
>>> Emerging (1 of 1) games-strategy/taspring-linux-release-0.72-r1 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking taspring-linux-data-0.72b1.tar.bz2 ;-)
>>> Unpacking source...
!!! ERROR: games-strategy/taspring-linux-release-0.72-r1 failed.
Call stack:
ebuild.sh, line 1539: Called dyn_unpack
ebuild.sh, line 711: Called src_unpack
taspring-linux-release-0.72-r1.ebuild, line 45: Called subversion_src_unpack
subversion.eclass, line 278: Called subversion_fetch
subversion.eclass, line 127: Called die
!!! subversion.eclass: ESVN_REPO_URI is empty.
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! This ebuild is from an overlay: '/usr/local/portage'
  • Then try: rm -Rf /usr/portage/distfiles/svn-src/spring
  • Afterwards do: emerge taspring-linux-release

Debian, Ubuntu & derivatives

  • Update your local package database by running: apt-get update
    (Or use the update feature of your favorite package manager, Synaptic, Adept, aptitude, etc.)
  • Install the spring package: apt-get install spring
  • Create directories for data files: mkdir -p ~/.spring/{maps,mods,base}
  • Point your browser to Unknown Files. Download at least one map from the map section (put it in ~/.spring/maps), and at least one mod from the mod section (put in ~/.spring/mods). The default maps are SmallDivide and Mars. Default mods are either XTA or NanoBlobs (XTA is based on Total Annihilation content, NanoBlobs is free).
  • If you downloaded XTA in the previous step, or ever want to play mods that depend on Total Annihilation content (XTA, AA, BA, etc.), then 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 are legally required to own a copy of Total Annihilation if you perform this last step.

All other linux distributions

  • Make sure you have the following packages installed:

    build-essential libsdl-dev libopenal-dev libglew-dev libboost-dev libboost-thread-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev scons subversion zip
  • Create a working directory, we'll use this to compile spring:

    mkdir ~/workdir
    cd ~/workdir
  • Download the most recent source tarball (.tar.bz2 file) from BerliOS, save it in ~/workdir.
  • Extract the tarball and switch to the directory (adjust version numbers if necessary):

    tar xfj spring_0.74b3_src.tar.bz2
    cd spring_0.74b3
  • Configure: scons configure
    If this doesn't work, be sure to check you installed all dependencies, and peek at the file config.log, which may show the reason it didn't work in detail. To tune the configuration (installation paths, debugging, etc.), refer to: scons -H
  • Compile by running: scons
    This can take 5-15 minutes depending on your system.
  • To install spring, run the following as root: scons install
  • Set up spring to look in your home directory for data files (run as root):

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


    Alternatively you can specify it in ~/.springrc (if you don't have root access):

    echo "SpringData=$HOME/.spring" >> ~/.springrc
  • Now continue at the fourth (4th) step under Debian, Ubuntu & derivatives: "Create directories for data files".

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: