Building the linux port

Building the linux port

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Building the linux port

Post by AF »

I cannot find any information as to how to do this, all the links in the wiki are faulty exept the mailing list which I'm already signed up to. Could we fix this problem and perhaps shove some stuff here? And fix the wiki at BerliOS?
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

The first link on the wiki is right.
( http://developer.berlios.de/projects/taspring-linux/ )
You can find an svn repository there. It will need some library and it is build with scons.
Last edited by Torrasque on 24 Jan 2006, 16:58, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It will not some library and it is build with scons.
We need a decent wiki tutorial, or the existing one to be made available again. I havent a clue how scons works, or howto compile anything under linux, I dont know howto setup tortoise SVN to work with the berliOS svn, and that sectence with the bit about library was utterly wrong grammatically, I'm guessing it means something like "it is missing some libraries".

Please, for someone who has only ever programmed in a win32 environment, explain in simpler terms.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

What you're asking is basically how to get packages/libraries and compiling working under linux, I don't think the spring community will be very helpful for that.
I tried linux some years ago but didn't have a good net connection back then, so I never really worked with all the packages or ebuilds or whatever they are called. but for something like Ubuntu, I think most of the libraries are a matter of simply installing them from the package.

- You would need to get svn,
- Use svn to connect to berlios to create "working copy" of the spring code
- Install a bunch of library packages like boost and SDL if they're not installed already (They probably are)
- Use scons to build on of the build targets for spring...

In any case, getting used to a linux programming environment is not something that can be explained in a few sentences, it involves spitting through a lot of howto's and wandering through readmes
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

Maybe you could take one step at the time and also write a wiki while you do this (for example I have already a working environment and I use linux for 3 years, so maybe I'm not the perfect man to write a simple tutorial)

So, have you managed to get the sources from svn ?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Sometimes the wiki does work, just retry until it works. But I agree we either need to fix this or move to another (taspring) wiki.
  • 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 terminal (or use the graphical package manager if you can't stand commandline :wink: )

    Code: Select all

    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).
  • To compile the sourcecode, switch to the trunk directory created by the svn checkout in the previous step. Then type:

    Code: Select all

    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:

    Code: Select all

    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 (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). Make game/base, game/maps and game/mods and put respectively the base files, the mod file(s) and your map file(s) in it. Don't copy your pathing data from windows, I don't know if it will work.
  • Now run spring by cd'ing (change dir) to the trunk/game directory and typing:

    Code: Select all

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

    Code: Select all

    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!
A even a tip :wink:: 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 me (tvo) or any other dev on IRC (#taspring on FreeNode or #sy on QuakeNet).]
Last edited by Tobi on 19 Feb 2006, 20:32, edited 2 times in total.
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

For gentoo system you can download the ebuild from : http://download.berlios.de/taspring-lin ... r3.tar.bz2 and install it as it will automaticly install the dependencies (haven't tested lately though, but it should work).
[/code][/list]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

In my floozy illness I came across internet commands trying to install programming packages on ubuntoo, I have no net access whatsoever on that machine. (Well I could get a few hours of internet accesss but at the cost of never being able to use this internet connection for as long as I live).

However that was helpful, and I'm sure it'll help other people, or me if I get to a point where I have an programming IDE in ubuntu, and the necessary libraries...
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I have no net access whatsoever on that machine.
Hmm, that sucks. Linux without any internet = :cry: imho

For ubuntu, you may be able to grab packages from packages.ubuntu.com, and maybe there are even some scripts on the web to do it automagically for you. I don't know about gentoo, but I guess the ebuild won't work too because it checks out SVN all by itself (thus requires internet).
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

Don't have my gentoo at hand, but i think he could use "emerge -f" which only fetches packages, put them on cd and install at home.

Of course this will work for the dependencies, but if you want to modify spring you won't compile it from the ebuild.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I wish it where that easy.
I did a little searching and got the following addresss from which I can get all those packages, but getright browser insist I buy the full version before it parses sub directories.

http://archive.ubuntu.com/ubuntu/pool/

Otherwise this computer is XP home edition and my stepdad would never consider installing an OS after the last time (I installed XP Pro on his old crappy system after telling him it'd get internet working even though I said his computer was too unstable to run it, then he blamed me when XP and his graphics card didnt like eachother).
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

You really need to move out...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I really need a decent job first
Post Reply

Return to “Engine”