Author Topic: FS2_Open Linux Mini Howto  (Read 68590 times)

0 Members and 1 Guest are viewing this topic.

Offline Amon_Re

  • 28
    • http://www.kefren.be
FS2_Open Linux Mini Howto
Incase you would like to get FS2_Open to run in linux (x86 architecture) you might find this intresting:

First grab bKtHeG's source tarball from http://ds.hamburg051.server4free.de...en_linux.tar.gz  and extract the fs2_open directory.

First do the configure script ./configure --disable-sound -disable-networking

And after that execute make.

Incase you get compiler errors in gropengl.cpp, open that file (code/graphics/gropengl.cpp), locate the line #include and above that line, add the following line:

#define GL_GLEXT_PROTOTYPES

Save the file and execute make again (from within the fs2_open directory)

Make should now finish the compilation where it left off, and create the file fs2 (located in code/), copy this file to your freespace 2 directory.

If it doesn't, and complains about not finding -lGL, don't panic, this means you don't have a symbolic link in /usr/lib towards the correct file.

Create the symlink called libGL.so and make it point to /usr/X11R6/lib/libGL.so

Again start make from within the fs2_open directory.

In that same directory, create a textfile called fs2_open.ini and make sure it contains the following:

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024x768)
Videocard=OpenGL - Primary Display Driver(1024x768)
VideoApi=OpenGL

That's all, you should now be able to start fs2 with ./fs2

Extra notes, if you installed FreeSpace 2 using eg iculus's installer and get an error "error parsing strings.tbl" or "error parsing rank.tbl", try copying over your working freespace install from your windows partition, and see if that helps.

Don't have windows installed? No biggy, install the latest wine, and you can use the installer from the FreeSpace CD's.

Incase you got an error while compiling like, eg "brace-enclosed initializer used to initialize x", it is most likely because of a whacked GCC install, check that you have binaries that match each other (don't mix files from eg 2.9.2 with 3.x), and if that doesn't help, try removing & reïnstalling GCC.

With many thanks to bKtHeG for making this available
Sig? What sig?

 

Offline Inquisitor

Ooo, this is promising :)

Does the windows compile still work? If someone says yes, we should get this into the source tree asap :)

What version of SCP is bk's build based on?
No signature.

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Yea, it is, you should see it run in X ;) Or even better, see it load! :eek2:

I have to say that it runs very, very well, but on another note, i had some very hard crashes/freezes, don't know what is causing them yet tho, will investigate.

So, where are the 3.5.5 sources? :D

PS: Life without Micro$oft is possible :ha:

Cheers
Sig? What sig?

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Quote
Originally posted by Inquisitor
Ooo, this is promising :)

Does the windows compile still work? If someone says yes, we should get this into the source tree asap :)


Don't know, the only thing i did was add a #define, bKtHeG did the hard work by making it compile on his machine.

And i can't test it on windows, i deleted it :ha:

Quote
What version of SCP is bk's build based on? [/B]


It says v3.5.5... Forget i asked for them sources ;) I'll install CVS on my machine, and download the whole thing from you guys, if that's possible

Got my intrest in coding back :D

Cheers
Sig? What sig?

 

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
Download: http://ds.hamburg051.server4free.de/20030911_fs2_open_linux.tar.bz2

Changes:
- Basic sound support (no speech in missionbriefing)
- Using last cvs version
- Some smaller changes/fixes (including the opengl fix)

Tested:
- Joystick support (seams to work)
- Inferno mod (always crashes)
- normal game (quiet unstable - but playable)

How to build it (with sound):
(recommended: last stable gcc release (3.3.1))
Code: [Select]

./configure --disable-networking
make


How to get 1024x768:
Code: [Select]

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024 x 768)
Videocard=OpenGL - Primary Display Driver(1024 x 768)
VideoApi=OpenGL

(notice the space between the "1024", "x" and "768" - if you already launched fs2_open remember to edit fs2_open.ini in your home-directory)

EDIT:
In order to compile it you need the last (cvs) version of openal.
« Last Edit: September 11, 2003, 03:28:05 pm by 1351 »

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Rats, just managed to get the cvs :)

Downloading right now :)

Cheers
Sig? What sig?

 

Offline Kamikaze

  • A Complacent Wind
  • 29
    • http://www.nodewar.com
Great stuff :yes: , I'll test it later on my machines.
Science alone of all the subjects contains within itself the lesson of the danger of belief in the infallibility of the greatest teachers in the preceding generation . . .Learn from science that you must doubt the experts. As a matter of fact, I can also define science another way: Science is the belief in the ignorance of experts. - Richard Feynman

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Mini Howto, second revision
Incase you would like to get FS2_Open to run in linux (x86 architecture) you might find this intresting:

First grab bKtHeG's source tarball from http://ds.hamburg051.server4free.de...n_linux.tar.bz2 and extract the fs2_open directory.
First do the configure script ./configure -disable-networking
And after that execute make.
Incase you get errors while compiling in ds.cpp, it is probably because you lack the  latest CVS version of openAL.

In order to get the latest version, you should first make sure you have CVS installed.
Do the following in a shell(make sure you are online):

cvs -d:pserver:[email protected]:/usr/local/cvs-repository login

This will connect to the repository, if you are asked for a password, use "guest"
Now do the following:

cvs -d:pserver:[email protected]:/usr/local/cvs-repository co openal

This will download the repository into your current directory, so make sure you are in a temporary directory first!
Change to the directory, and read the docs for openAL.
Basicly, you'll have to do the following from within the openal directory:

cd linux
./configure --prefix=/usr/local
make
make install

Make sure you replace the old libraries in /usr/lib and that you eighter copy or link the new ones to /usr/lib

Now go back to the fs2_open directory, and run make again.

Make should now finish the compilation, and create the file fs2 (located in code/), copy this file to your freespace 2 directory.
If it doesn't, and complains about not finding -lGL, don't panic, this means you don't have a symbolic link in /usr/lib towards the correct file.
Create the symlink called libGL.so and make it point to /usr/X11R6/lib/libGL.so

Again start make from within the fs2_open directory.

In that same directory, create a textfile called fs2_open.ini and make sure it contains the following:

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024 x 768)
Videocard=OpenGL - Primary Display Driver(1024 x 768)
VideoApi=OpenGL

That's all, you should now be able to start fs2 with ./fs2

Extra notes, if you installed FreeSpace 2 using eg iculus's installer and get an error "error parsing strings.tbl" or "error parsing rank.tbl", try copying over your working freespace install from your windows partition, and see if that helps.
Don't have windows installed? No biggy, install the latest wine, and you can use the installer from the FreeSpace CD's.
Incase you got an error while compiling like, eg "brace-enclosed initializer used to initialize x", it is most likely because of a whacked GCC install, check that you have binaries that match each other (don't mix files from eg 2.9.2 with 3.x), and if that doesn't help, try removing & reïnstalling GCC.

With many thanks to bKtHeG for making this available
« Last Edit: September 13, 2003, 07:14:21 am by 1139 »
Sig? What sig?

 

Offline Inquisitor

is this the most recent?
No signature.

 

Offline Inquisitor

Update:

It compiles and links on windows, after a few updates:

in gropengl.cpp

bk has:

#include
#include
#include

I had to change the pathing to:

#include "gl/gl.h"
#include "gl/glu.h"
#include "gl/glext.h"

And the it compiled the ogl stuff.

Another error was in localization.cpp, I had to comment out the include for unistd.h

With that, this compiles, runs, and can load the first SP training mission.

Also had to replace the code/make file stuff with what is in CVS, so there is an issue there we'll have to resolve.

Good stuff! What can we do to get this into CVS!?!
« Last Edit: September 18, 2003, 10:25:23 am by 122 »
No signature.

 

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
Quote

...
Also had to replace the code/make file stuff with what is in CVS, so there is an issue there we'll have to resolve.


Do you mean code/Makefile? This file is heavily modified in order to work 100% under linux. What error did you get?

The opengl-stuff needs to be placed in #ifdef's because linux needs the .

 

Offline Inquisitor

Yeah, the code makefile, I figured it was VS being stupid, I htink our DSW is using a makefile as well, I'll switch it to a different name.

what about the unistd.h stuff?
No signature.

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Sorry that i didn't read this sooner, but in the includes...

#include etc, condidering that Linux's filesystems are case sensitive this might pose a *BIG* problem.

Normally on windows you shouldn't have this problem, did you test it if you change the  directory name to uppercase on your system? Does it still nag about it?

If it does, then i suggest we use some #ifdefs or something simular so that the compiler always gets the correct files.

As for the makefile, i haven't even looked at that one yet, i'm new to linux :)

Cheers
Sig? What sig?

 

Offline Inquisitor

yeah, it looks like a stupid pathing issue, not a show stopper ;)
No signature.

 

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
I've got enought time to do a quick update on the linux tree. Mainly merges between SCP and my own tree but also some smaller patches (I don't know exacty what changes I've done since the last version).

Download: here

 
erm, i can't really understand this, why can't you distribute a binary?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
binary means problems - thats the reason

You need a matching gcc-version and matching libs and I don't think you have the same versions as me (because some are cvs-versions - no official releases).

Under linux it is much simplier to compile fs2_open yourself even if the howto sounds difficult. Just try it....

 
i did.

but i might have done something wrong, and i really don't have the time to play around with it, school is starting again tomorow.
i'll see what i can do in some weekend, but i doubt i'll have any time left over before christmas.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Setekh

  • Jar of Clay
  • 215
    • Hard Light Productions
- Eddie Kent Woo, Setekh, Steak (of Steaks), AWACS. Seriously, just pick one.
HARD LIGHT PRODUCTIONS, now V3.0. Bringing Modders Together since January 2001.
THE HARD LIGHT ARRAY. Always makes you say wow.

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Hi there...

Well, I got it to compile until the gropengl.o stuff, but then I get the following error:

"graphics/gropengl.cpp:3039: implicit declaration of function `int glCompressedTexImage2D(...)'
make[1]: *** [gropengl.o] Error 1
make[1]: Leaving directory `/home/elias/fs2_open/fs2_open/code'
make: *** [all-recursive] Error 1"

So, has anyone an idea, what's causing this error ?

And yes, I used the newer tarball, which has the "#define  GL_GLEXT_PROTOTYPES" line already in it.
I think I have all necessary OGL libraries installed, because other OGL stuff works perfectly.
Btw, I'm using Debian with a g++ 2.95
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea