Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

SetupGuide: Difference between revisions

From FIGHTORDER
imported>Tobi
m add root before terminal
imported>Hoehrer
some links , code tags + restructuring
Line 1: Line 1:
== Linux Setup Guide ==
* If you're running [http://www.gentoo.org Gentoo linux], you're lucky, because [http://download.berlios.de/taspring-linux/taspring-linux-svn-ebuild-0.67-r3.tar.bz2 an ebuild is already available]. If not, a short walk-trough to compile, run and debug spring on provided below.
* If you're running [http://www.gentoo.org Gentoo linux], you're lucky, because [http://download.berlios.de/taspring-linux/taspring-linux-svn-ebuild-0.67-r3.tar.bz2 an ebuild is already available]. If not, a short walk-trough to compile, run and debug spring on provided below.


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


* To grab the sourcecode from SVN (using commandline SVN), refer to [https://developer.berlios.de/svn/?group_id=4358 this berlios page about SVN]. Use one of the two anonymous checkout methods (upper two) unless you're a spring developer (but in that case you wouldn't be reading this, right?).  
* To grab the sourcecode from SVN (using commandline SVN), refer to [https://developer.berlios.de/svn/?group_id=4358 this berlios page about SVN]. Use one of the two anonymous checkout methods (upper two) unless you're a spring developer (but in that case you wouldn't be reading this, right?).  
Line 7: Line 8:
* To compile the sourcecode, switch to the trunk 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're probably missing a development package.  
* To compile the sourcecode, switch to the trunk 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're probably missing a development package.  


* As instructed on end of previous step, type: <code>scons</code> Spring will now build including NTAI, JCAI and a few GroupAIs. You should end up with a file trunk/game/spring (the executable) and some shared objects (SOs or DLLs) in trunk/game/aidll.
* As instructed on end of previous step, type: <code>scons</code> Spring will now build including [[NTAI]], [[JCAI]] and a few [[GroupAI]]s. You should end up with a file <code>trunk/game/spring</code> (the executable) and some shared objects (SOs or DLLs) in <code>trunk/game/aidll</code>


* Now, grab [https://developer.berlios.de/project/showfiles.php?group_id=4358 the linux data tarball from berlios] and extract it somewhere (or use your windows datafiles for this step if you can acces them from linux). mkdir (make directories) game/base, game/maps and game/mods and put respectively the base files, the mod file(s) and your map file(s) in it. Note that you now also need [http://fileuniverse.com/?p=showitem&ID=2372 XTA Pimped Edition], because the default mod changed in SVN.
* Now, grab [https://developer.berlios.de/project/showfiles.php?group_id=4358 the linux data tarball from berlios] and extract it somewhere (or use your windows datafiles for this step if you can acces them from linux).
* <code>mkdir</code> (make directories) the following directories and put respectively the base files, the mod file(s) and your map file(s) in it. Note that you now also need the newes [[XTA]] -> [http://fileuniverse.com/?p=showitem&ID=2372 XTA Pimped Edition], because the default mod changed in SVN.
** <code>game/base</code>
** <code>game/maps</code>
** <code>game/mods</code>


* Now run spring by cd'ing (change dir) to the trunk/game directory and typing: <code>./spring</code> 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><br>Basic commands inside gdb are:  
* Now run spring by <code>cd</code>'ing (change dir) to the <code>trunk/game</code> directory and typing: <code>./spring</code> 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>
** <b>r</b>un - Run the program (spring)  
** Basic commands inside gdb are:  
** <b>bt</b> - Print a backtrace  
*** <code><b>r</b>un</code> - Run the program (spring)  
** <b>q</b>uit - Quit  
*** <code><b>bt</b></code> - Print a backtrace  
** <b>help</b> - This one's important   
*** <code><b>q</b>uit</code> - Quit  
*** <code><b>help</b></code> - This one's important   


* Be happy!
* Be happy!
Line 21: Line 27:
Even a tip: If spring hangs/crashes while in full screen mode, you can press ctrl+alt+backspace to restart X, so no need for a reboot.
Even a tip: 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 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 (channel #taspring on FreeNode or channel #sy on QuakeNet), post it on the forum, or file a bug in our [http://taspring.clan-sy.com/mantis/ BTS].
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
** channel <code>#taspring</code> on [http://freenode.net/ FreeNode]
** or channel <code>#sy</code> on [http://freenode.net/ QuakeNet]
* post it on the forum
* or file a bug in our [http://taspring.clan-sy.com/mantis/ Bug tracking system].

Revision as of 17:01, 2 March 2006

Linux Setup Guide

  • In short, to get spring compiled under linux, make sure you've got all necessary development packages installed. On (K)Ubuntu linux, and maybe 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):

    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

    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 google is your friend.
  • To grab the sourcecode from SVN (using commandline SVN), refer to this berlios page about SVN. Use one of the two anonymous checkout methods (upper two) unless you're a spring developer (but in that case you wouldn't be reading this, right?).
  • To compile the sourcecode, switch to the trunk directory created by the svn checkout in the previous step. Then type: scons configure to configure the build. (You can fine tune the build by passing options to this command [for enabling debugging/optimizing etc.]. Type scons --help 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're probably missing a development package.
  • As instructed on end of previous step, type: scons Spring will now build including NTAI, JCAI and a few GroupAIs. You should end up with a file trunk/game/spring (the executable) and some shared objects (SOs or DLLs) in trunk/game/aidll
  • Now, grab the linux data tarball from berlios and extract it somewhere (or use your windows datafiles for this step if you can acces them from linux).
  • mkdir (make directories) the following directories and put respectively the base files, the mod file(s) and your map file(s) in it. Note that you now also need the newes XTA -> XTA Pimped Edition, because the default mod changed in SVN.
    • game/base
    • game/maps
    • game/mods
  • Now run spring by cd'ing (change dir) to the trunk/game directory and typing: ./spring If you've compiled with debugging enabled, you might want to run inside gdb to provide the devs with a backtrace if spring crashes: gdb ./spring
    • Basic commands inside gdb are:
      • run - Run the program (spring)
      • bt - Print a backtrace
      • quit - Quit
      • help - This one's important
  • Be happy!

Even a tip: 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 you really can't figure out how to get spring compiled, or you think there's a bug in the code or the buildsystem...