SetupGuide: Difference between revisions

From Spring
Jump to navigationJump to search
Tobi (talk | contribs)
Jobarjo (talk | contribs)
added snap installation method
 
(387 intermediate revisions by 52 users not shown)
Line 1: Line 1:
== Linux Setup Guide ==
=Linux/Unix Setup Guide=


=== gentoo linux ===
{{#css:
* 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>
  table.glossy {
:# <b>mkdir /usr/local/portage</b>
    margin: 4px; padding:10px;
:# add this line to you /etc/make.conf<br> <b>PORTDIR_OVERLAY="/usr/local/portage"</b>
    border: 1px solid rgba(0,0,0,0.5);
:# download the ebuild you want, for example: taspring-linux-release-ebuild-0.72-r1.tar.bz2
    border-radius: 10px 10px 10px 10px;
:# <b>mv taspring-linux-release-ebuild-0.72-r1.tar.bz2 /usr/local/portage</b>
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
:# <b>cd /usr/local/portage</b>
    text-align: center;
:# <b>tar jxvf taspring-linux-release-ebuild-0.72-r1.tar.bz2</b>
   }
:# most likely you don't run a ~x86 system (unstable) so do a:<br> <b>echo "games-strategy/taspring-linux-release ~x86" >> /etc/portage/package.keywords</b>
   /*table.glossy:hover {
:# <b>echo "dev-libs/boost threads" >> /etc/portage/package.use</b>
    background: rgba(160,160,220,0.4);
:# You might want to have a look at the USE flags, type:<br><b>emerge -pv taspring-linux-release</b>
  }*/
:# finally install it with:<br><b>emerge taspring-linux-release</b>
}}
:* 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: <b>rm -Rf /usr/portage/distfiles/svn-src/spring</b>
:* Afterwards do: <b>emerge taspring-linux-release</b>


=== all other linux distributions ===


==== For the impatient ====


(installs everythingn to ~/spring)
{| style="width:70%; margin-left:15%; margin-right:15%;" |
<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 ====
|{{Template:LinuxSetupGuideButton|name=From Source|link=Build_from_source|icon=Git.png}}


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-filesystem-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev</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.
|{{Template:LinuxSetupGuideButton|name=Snaps|link=Snaps_install }}


* Make a directory to put everything in, and change to that directory.<br>br><code>mkdir ~/spring; cd ~/spring</code>
|{{Template:LinuxSetupGuideButton|name=Ubuntu|link=Ubuntu_install|icon=Distributions-ubuntu.png}}


* 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.
|{{Template:LinuxSetupGuideButton|name=Gentoo|link=Gentoo_install|icon=Distributions-gentoo.png}}


* 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.
|-


* 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>
|{{Template:LinuxSetupGuideButton|name=Slackware|link=Slackware12_install|icon=Distributions-slackware.png}}


* 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).
|{{Template:LinuxSetupGuideButton|name=Debian|link=Debian_install|icon=Distributions-debian.png}}


* Set up data directories like this:<br><code>echo "SpringData=$HOME/spring/source/game:$HOME/spring/spring-linux-data-0.74b1" >> ~/.springrc</code>
|{{Template:LinuxSetupGuideButton|name=Mandriva|link=Mandriva_install|icon=Distributions-mandriva_linux.png}}


* 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!
|{{Template:LinuxSetupGuideButton|name=openSUSE|link=openSUSE_install|icon=Distributions-opensuse_linux.png}}


Tips:
|{{Template:LinuxSetupGuideButton|name=Fedora|extlink=http://projects.springlobby.info/projects/springlobby/wiki/Install#Fedora-10|icon=Distributions-fedora.png}}


* Checkout [http://www.unknown-files.net Unknown Files] for much more maps & mods.
|{{Template:LinuxSetupGuideButton|name=FreeBSD|link=FreeBSD_install|icon=Distributions-freebsd.png}}
* 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>
(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...
<span style="float:right">[[Linux:Packaging | Package Maintainers]]</span>
* just poke any developer on IRC
** channel <code>#taspring</code> on [http://freenode.net/ FreeNode]
** or channel <code>#sy</code> on [http://www.quakenet.org/ QuakeNet]
* post it on the forum
* or file a bug in our [http://taspring.clan-sy.com/mantis/ Bug tracking system].


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

Latest revision as of 21:56, 11 February 2019