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

0 Members and 2 Guests are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
FS2_Open Linux Discussion
Well, everything but gnome-vfs2 is available from the Yoper apt tree. I'm force-compiling kdevelop (make -k, woo) now, but I'm not real optimistic about it working. :p

I use KDE mostly because it looks nicer and Gnome doesn't seem to have any edge in speed/size. (From what I've heard; I haven't used it in awhile)

Although my requirements for a desktop are pretty low - a fast way to access programs, and stability/speed. I'd love a minimalist WM like Fluxbox, but with an icon list. It'd probably cut my system's startup time in half.

Actually, I guess there is one other thing - consistent style. I love consistent style, globally settable from the control panel. Most excellent at night. ;)
-C

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Strangely those are the reasons I use Gnome.  In my experience it's slightly faster (in feel at least) than KDE.  The themes are great so you can make it look as strange or as clean as you want (http://art.gnome.org) and it's pretty flexible in it's layout.  The Gnome HIG helps make sure apps will have a consistent look and feel though it is voluntary and older apps never used it in the first place.  KDE has done a lot of work in the area too but without having used a recent version very much I can't give a good comparison.  KDE exposes a lot more settings to the user than Gnome does though so in it you would have to do a bit more hunting for all of those cool options.

Did you ever try Xfce (http://www.xfce.org)?  It's a lot smaller than Gnome and KDE but still follows the same basic app design and functionality guidelines (freedesktop.org).  It's sort of OSX meets CDE which has an appeal.

 
FS2_Open Linux Discussion
Hmm. Would it be possible to have a FS2 Open Linux Forum? I think this thread got quite big.

 

Offline Darwood

  • 22
FS2_Open Linux Discussion
Quote
Originally posted by taylor
Working x86 and x86_64 Linux support will be done initally and Linux/PPC and OSX support should be ready the first half of next week.  Online play has not been tested so I can't say whether or not FS2netD will work but it should.  If not it will be fixed pretty quickly.


So how is the work going on the OS X port?  Using the CVS source I was able to get a compile done for OS X with a few issues.  OpenGl HT&L doesn't appear to compile to well (it seems ./configure doesn't like OS X's opengl since some procedures are missing from the header) which I think is the reason that other features (collisions, weapon effects, etc.) are missing (of course this could be due to how the compile from the ./configure is set up)  Another thing I noticed is I couldn't get fs to work in full screen.

I'm just interested in which of these issues are already fixed and not in CVS so I don't go about trying to fix something that is already fixed.

Thanks

Also is there a good place that OS X info is shared?  I couldn't find too much on the forums here.
« Last Edit: March 20, 2005, 11:10:30 pm by 2681 »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by mrduckman
Would it be possible to have a FS2 Open Linux Forum?

I was thinking the same thing last week.  I've been meaning to ask Goober about that but I have pretty much zero time for FS2_Open hacking lately so it's not high on my todo list.

Quote
Originally posted by Darwood
So how is the work going on the OS X port?

There is a working version but I'm going to have it for download until after a little more testing is done.  tigital is working on it, as he's a bit more OSX friendly than I, and we have this rather strange delay between e-mails.  It's something of a long standing joke.  Since CVS keeps breaking for the Linux/OSX side it takes a bit of time for me to update him on the fixes and him to get back to me.

The only real problem at this point is Apple's OGL support.  You pretty much need 10.3.6 to get the thing to work right and that's not cool.  We're trying to work on the exact requirements and get it all tested.  Maybe tigital will respond here but if not I'll try and do a bit better job of keeping you in the loop.

 

Offline Darwood

  • 22
FS2_Open Linux Discussion
Quote
Originally posted by taylor
The only real problem at this point is Apple's OGL support.  You pretty much need 10.3.6 to get the thing to work right and that's not cool.  We're trying to work on the exact requirements and get it all tested.  Maybe tigital will respond here but if not I'll try and do a bit better job of keeping you in the loop.


Great, thanks for the response.  Also let me know if there is anything that I could help with.  Unfortunately I don't know as much as I should about OS X programming and OpenGL but I need to learn.  All the java programming I do makes Darwood a dull boy.

So from your response I take it that the changes aren't in CVS yet?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Darwood
So from your response I take it that the changes aren't in CVS yet?

All but a few minor changes are already in CVS.  The main problem is that it just doesn't build properly from the makefile.  If you make a project for it in ProjectBuilder or XCode then it should run basically ok.  I'm still missing the float swaps (total of 2 lines) in CVS though I have it right in my local code tree.  The networking code is still not compatible but I think tigital might fill in the few bits that are still missing there.

If you want to make the project file for yourself then PM me and I'll get you the missing float swaps and the fixes for Linux/OSX building that I haven't put in CVS yet.  I just don't have time to get everything updated but if you want to do a little grunt work on your side then I'll get you the other changes so that you can have single player at least.  Just remember to have and up-to-date 10.3 for everything to be enabled.

 

Offline Darwood

  • 22
FS2_Open Linux Discussion
Quote
Originally posted by taylor
If you want to make the project file for yourself then PM me and I'll get you the missing float swaps and the fixes for Linux/OSX building that I haven't put in CVS yet.  I just don't have time to get everything updated but if you want to do a little grunt work on your side then I'll get you the other changes so that you can have single player at least.  Just remember to have and up-to-date 10.3 for everything to be enabled.


Thanks again for the response.  I have no problems with making my own project file or doing some grunt work.  Once I get things set up and running I'll PM you.

 
FS2_Open Linux Discussion
Quote
Originally posted by taylor

I was thinking the same thing last week.  I've been meaning to ask Goober about that but I have pretty much zero time for FS2_Open hacking lately so it's not high on my todo list.
 


I'll take care of this, then, taylor. :)

BTW, I'll be back online in the next ~2 hours when I'll be at work.

 

Offline tigital

  • 23
FS2_Open Linux Discussion
Quote
Originally posted by taylor

All but a few minor changes are already in CVS.  The main problem is that it just doesn't build properly from the makefile.  If you make a project for it in ProjectBuilder or XCode then it should run basically ok.  I'm still missing the float swaps (total of 2 lines) in CVS though I have it right in my local code tree.  The networking code is still not compatible but I think tigital might fill in the few bits that are still missing there.


Hey ya'll!

...long time since I've been able to work on freespace, but I've managed to sneak in some time on it the last week...basically, you can build it via configure and hand editing the makefile, but that doesn't produce a very usable app:  the windows never get "focus"...so, I went ahead and made an xcode project, and it runs (thanks for the files taylor!), but I'm not seeing any models, and it crashes...

...last night I did some heavy searching, and am now focusing on the modelread code, especially the glow/vertex_buffer/speculartexture stuff:  since this is new to this project, maybe that's where the problem lies?

...anyway, taylor, which float swaps are you talking about being missed?  This could explain alot!  Also, the latest cvs has some call to auxSphereSolid(), which seems to be a windows only glaux.h call...I've just #ifdef'ed it out for the moment...

...looking forward to get this out there!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by tigital
...anyway, taylor, which float swaps are you talking about being missed?  This could explain alot!

The ones for cfread_float() and cfwrite_float().  I think that's about it.  I'll get that added to CVS later today but you can go ahead and make that change to see if it's the only model reading problem.  I got everything else that I could find.  Only had bounding box issues in my last real test build.  There are probably a few new modelread things that could need new swaps but I didn't notice anything offhand.  Most everything should be swapped already.  Everything new that I've added will use the cf* functions and so will already be swapped correctly and most everything else that's new also uses those.


Quote
Also, the latest cvs has some call to auxSphereSolid(), which seems to be a windows only glaux.h call...I've just #ifdef'ed it out for the moment...

Yeah I cringed when it hit CVS a couple of days ago.  I think that particular function is only used by FRED2 right now though so the regular game should be fine without it.  I'll try and replace it or just ifdef the whole thing out.

 

Offline Darwood

  • 22
FS2_Open Linux Discussion
Quote
Originally posted by taylor
Yeah I cringed when it hit CVS a couple of days ago.  I think that particular function is only used by FRED2 right now though so the regular game should be fine without it.  I'll try and replace it or just ifdef the whole thing out.


I was just about to post this.  auxSphereSolid was giving me quite a head ache.  

Another thing I had some problems with was sounds/ogg/ogg.h.  I probably don't have my -I 's set up right but it was causing issues with the ogg.h I have from my ogg/vorbis libraries.  I wound up renaming the thing to make the compile happier.

 
FS2_Open Linux Discussion
I get this error since a few days:
Quote
graphics/gropengltnl.cpp: In function `int opengl_get_new_state_block_internal()':
graphics/gropengltnl.cpp:828: Fehler: name lookup of `i' changed for new ISO `for' scoping
graphics/gropengltnl.cpp:823: Fehler:   using obsolete binding at `i'
graphics/gropengltnl.cpp: In function `void gr_opengl_draw_htl_sphere(float)':
graphics/gropengltnl.cpp:877: Fehler: `auxSolidSphere' undeclared (first use this function)
graphics/gropengltnl.cpp:877: Fehler: (Each undeclared identifier is reported only once for each function it appears in.)


The for-thing is easy to fix, but the "auxSolidSphere"...

I hope I could program in C(++) and so on...
If I could, I would be glad to help...

But ATM I can only program VERY easy stuff in C...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
The for-thing is easy to fix, but the "auxSolidSphere"...

I'm working out a few bugs in the new bmpman fixes but then I'll start merging in everything (been awake all night).  In the meantime though, since I'll probably fall asleep before I actually get to commit, I'll go ahead and post the auxSolidSphere fix.  Basically the aux stuff is long since depreciated, replaced by GLUT.  I don't want to rely on yet another API though since distros, depending on release date and policys, will have the original glut libs (non-free), no glut at all, or freeglut.  Too much of a pain.  With a tiny bit more code it can be done with just GLU.

This will get into CVS at some point today so you can wait or just use this so you can get playing now.  Please ignore the comments, I've been awake a really long time :D :

Code: [Select]
void gr_opengl_draw_htl_sphere(float rad)
{
if (Cmdline_nohtl)
return;

GLUquadricObj *quad = NULL;

// FIXME: before this is used in anything other than FRED2 we need to make this creation/deletion
// stuff global so that it's not so slow (it can be reused for multiple quadratic objects)
quad = gluNewQuadric();

Assert(quad != NULL);

if (quad == NULL)
return;

glColor3ub(gr_screen.current_color.red, gr_screen.current_color.green, gr_screen.current_color.blue);

// FIXME: opengl_check_for_errors() needs to be modified to work with this at
// some point but for now I just don't care so it does nothing
gluQuadricCallback( quad, GLU_ERROR, NULL );

// FIXME: maybe support fill/wireframe with a future flag?
gluQuadricDrawStyle( quad, GLU_FILL );

// assuming unlit spheres, otherwise use GLU_SMOOTH so that it looks better
gluQuadricNormals( quad, GLU_NONE );

// we could set the slices/stacks at some point in the future but just use 16 now since it looks ok
gluSphere( quad, (GLdouble)rad, 16, 16 );

// FIXME: I just heard this scream "Globalize Me!!".  It was really scary.  I even cried.
gluDeleteQuadric( quad );
}

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Update to current CVS!!  Do it NOW!! :D

Thanks to a patch to the icculus.org freespace2 mailing list there is now streaming audio under Linux.  Music, briefing voices, OGG, everything.  Dude by the name of Pierre made a patch against the icculus.org CVS but with a few copy-pastes I was able to get it into the newest version of the streaming code for OpenAL.  This new code is a bit different since it's designed to replace the Windows version too at some point.  It's 64-bit compatible as well and OSX ready.  Any bugs should be reported, obviously.

Oh and the build system should be fixed now too so that you can actually build the thing from straight CVS. :)  I did forget your slowdown fix Alpha0 but I add that tonight after I grab some much needed food.  And Darwood, that ogg header problem should be fixed now as well.

EDIT:  Ok, so what got into CVS wasn't quite perfect ;)   Only WMCoolmon (and myself) has complained though so perhaps every sane person is asleep right now.  I do recommend doing a 'make distclean' after you update to current CVS if you already have a full or partial build.  This will help make sure that the correct Makefile changes get used.  Also put in your change Alpha0 though I haven't tested it myself.  If there are any problems then scream at the top of your lungs. :)
« Last Edit: March 27, 2005, 02:53:42 am by 1252 »

 
FS2_Open Linux Discussion
Great! Music and Voice is working perfectly!
But I have a few little problems:
1. Radio-Messages are playing too fast...
Not Helium-like... I mean the delay between the messages is too short...
One message is played and before it's finished the second message is played... (overlayed).

2. Now there are a few more keys on my keyboard, that don't work... Well.. I hope it's only one, but it could be more...
Until now only the escape-button doesn't work!
So I have to exit with options>end game...

And this leads to
3. I hope it was the only time it occures, but fs2_open didn't exit...
The screen blanks but I have to kill fs2_open from another console... And this restarts my X-Server...

But for now, I can live with it :D

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
Great! Music and Voice is working perfectly!
But I have a few little problems:
1. Radio-Messages are playing too fast...
Not Helium-like... I mean the delay between the messages is too short...
One message is played and before it's finished the second message is played... (overlayed).

Haven't noticed that myself though I didn't test in mission that much.  OpenAL will now be initialized with a sample rate that you can specify.  I didn't test that really well.  Edit ~/.fs2_open/fs2_open.ini and in the [Default] section add or change this line "SoundSampleRate=22050" and see if that helps or not.  You can try 44100 too.

EDIT: nope, I screwed up.  I changed snd_time_remaining() to be less stupid but it was I that was stupid.  It's checking with the wrong handle so that's why the voices are getting cut off early.  Working on a fix now.

Quote
2. Now there are a few more keys on my keyboard, that don't work... Well.. I hope it's only one, but it could be more...
Until now only the escape-button doesn't work!
So I have to exit with options>end game...

Deffinitely didn't notice that one.  Works ok for me and none of my changes affect the keyboard.  Some work was done on the keyboard stuff but I think that was just to cheat code workings.  If you get anymore info let me know, until then I'll try and figure out what might have changed.

Quote
And this leads to
3. I hope it was the only time it occures, but fs2_open didn't exit...
The screen blanks but I have to kill fs2_open from another console... And this restarts my X-Server...

Ehh, I get that too.  I thought it was just me though so I haven't really tried to fix it.  It's a race condition between pthread and the OpenAL closeout stuff.  If you don't use sound then it will work fine, but who wants that.  I'm using a slightly hacked version of OpenAL CVS, which is when it started messing up for me, so I thought that's all it was.  What backend are you using for OpenAL? (native, sdl, oss, alsa?)
« Last Edit: March 27, 2005, 10:45:55 am by 1252 »

 
FS2_Open Linux Discussion
Okay... My Escape-Key IS working... Only this one time it wasn't...

Exiting freespace works now, too.. But it takes some time...

Quote
What backend are you using for OpenAL? (native, sdl, oss, alsa?)

Uhm... Where can I check/set this?

 
FS2_Open Linux Discussion
there should be a config.log there.
Otherwise, what cmdline for the configure did you run?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
Uhm... Where can I check/set this?

If you've got a ~/.openalrc then it's in there.  If not the it's default which I think is in order depending on what backends are enabled: native, oss, alsa, sdl.

I've left mine for several hours before waiting for it to exit cleanly but it never happened.  Anyway, I'll work on getting that to be handled better.