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

0 Members and 1 Guest are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
FS2_Open Linux Discussion
taylor DevIL has no problem with PCXes
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
taylor DevIL has no problem with PCXes
Well I think it's more the code than DevIL so I'm not really passing blame.  Are you trying the code I posted or something else?  The code I posted has it turned off for PCX, uncomment the USE_DEVIL_PCX define in openil/il_func.h to turn it on.

I can't get any TGAs to load, I get an IL_FILE_READ_ERROR but I'm not sure from where.  It only happens with TGAs though and everything else will load fine.

I still have a few issues with DevIL though.  You have to load the entire image just to get width and height which just wastes resources/time the way I'm using it in the game (which may not be best but reduces the amount of DevIL code throughout the source and doesn't require rendering changes).  Also with DDS files I can't figure out how to stop DevIL from decompressing the image data, it gives a pointer to the compressed data but also decompresses it and give a pointer to that as well.  This really wastes memory.  Also ilDeleteImages() doesn't free everything and using one DDS planet will lose about 18Meg of RAM.  All of these things are known by the way (except for the TGA problem, which could be me), I've been reading the DevIL forums and bug list and these were easy complaints to find.

On a slightly unrelated note, the HT&L problems all look like merge errors.  I've got most of it fixed and models are showing up now but there is still some random flakiness that I haven't tracked down yet.

 

Offline redmenace

  • 211
FS2_Open Linux Discussion
hey do you get the y targeting bug in linux?
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
FS2_Open Linux Discussion
i am speaking from using devil elsewhere - like PCS
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
i am speaking from using devil elsewhere - like PCS

Must be something I'm doing wrong then.  I'll get to work on it.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
hey do you get the y targeting bug in linux?

Umm... no.  I tried it with a bunch of ships in the reticle and then some debris.  I tried pressing it really fast a bunch and just holding it down and letting it cycle a few dozen times.  Never crashed or slowed down.  Is there another way to try and reproduce this, certain missions maybe?

 

Offline redmenace

  • 211
FS2_Open Linux Discussion
hmm looks like this is a windows specific bug. We will get it eventually.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 
FS2_Open Linux Discussion
uhm, some dude tracked it down to some assembler code, he even wrote a fix. they only need to test that and throw it in CVS, AFAIK IIRC.

do a search for assembler in this forum, it;s the second result or something.
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

 
Humm.  I tried building it.  Even though I added `--disable-networking' in the ./configure, and the `-DNO_NETWORK' is in the flags... it /is/ supposed to be ``-DNO_NETWORK=1', right?

Here's where it errored out.
Code: [Select]
if /usr/bin/gcc -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.5\" -DPACKAGE_STRING=\"fs2_open\ 3.5\" \
-DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNO_NETWORK=1 -DNO_STANDALONE=1 -DMORE_SPECIES=1 \
-DNO_SOFTWARE_RENDERING=1 -DNDEBUG=1  -I. -I.    -fexceptions -I/c/dx8/include -Wno-missing-braces -Wno-multichar -Wno-deprecated \
-fsigned-char -DNO_DIRECT3D -DUSE_OPENGL -g -O2 -I/usr/include/SDL -D_REENTRANT -MT freespace.o -MD -MP -MF ".deps/freespace.Tpo" \
  -c -o freespace.o `test -f 'freespace2/freespace.cpp' || echo './'`freespace2/freespace.cpp; \
then mv -f ".deps/freespace.Tpo" ".deps/freespace.Po"; \
else rm -f ".deps/freespace.Tpo"; exit 1; \
fi
freespace2/freespace.cpp: In function `int game_hacked_data()':
freespace2/freespace.cpp:9547: `Om_tracker_flag' undeclared (first use this
   function)
freespace2/freespace.cpp:9547: (Each undeclared identifier is reported only
   once for each function it appears in.)
freespace2/freespace.cpp:9567: `ml_printf' undeclared (first use this function)
make[1]: *** [freespace.o] Error 1
make[1]: Leaving directory `/home/atalhlla/freespace2-ppclinux-test/fs2_open-2004-03-01/fs2_open/code'
make: *** [all-recursive] Error 1
Should I just try manually removing anything that would normally be ifdef'd out?

~Atal
Mertakk monae ki ienikk du bellou zhello.
Kuek mertakk monae ienikk divakkou zhello.

What does it mean if the most fun you had all night was blowing up asteroids...?

"Its a Babylon Space 2 HercFury!" --mikhael on seeing my first fighter design.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Oopps!  Sorry about that.  I've fixed it now and will be doing a new release this weekend with other fixes all well.  Both ml_printf() and Om_tracker_flag are provided only if built with networking support.  If you don't use --disable-networking then it should build so try that.  Networking isn't  going to work yet (with x86 machines) on PPC since I haven't brought over all of the multimsgs.cpp changes but I'm in the process of doing that now.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
For the entertainment value:


This is with the TGA version of the Hi-Res planets and the 32-bit background nebula from Lightspeed.  One of the problems with the TGA loading was with one of the IL->CFILE callbacks that the TGA loader was hitting.  It was passing an illegal value to cfread() and I was "correcting" it.  After figuring out exactly what it was doing it only took a one line fix.  The other issues with PCX and TGA files not showing up correctly turned out to be the absence of 32-bit support which I somehow managed to overlook.

D3D has support for 32-bit images but with it's own version of bmpman.  The bmpman used by OpenGL didn't but then the OpenGL renderer didn't support 32-bit images anyway.  That has now changed.  OpenGL should now support whatever you throw at it and bmpman is getting a quick little facelift.  Along with 32-bit support bmpman will now load files in the following order: TGA, JPG, (if -jpgtga is used), DDS (if compression is supported), PCX, old-style TGAs.  All of these formats are available under Linux only if DevIL is used.  It's still a work in progress but after some cleanup today/tonight it should be ready for everyone to try.

DevIL supports 16-bit versions of jack **** which added to the problem as well.  I think that everything in DevIL has to be either 8, 24 or 32-bit with 16-bit files being converted to at least 24-bit.  This should all be handled correctly now.  I've removed DevIL loading of PCX files since the internal code worked fine and DevIL was actually slower in most cases.  Using TGA planets is also much better than DDS since they load faster and use less memory because of the way DevIL handles DDS files at the moment.  There also looks to be a transparency problem with DDS images but since I don't much about the format I'm not sure if that's just DDS or something that's not done right in OpenGL or my usage of DevIL.

Just thought I've give an update.  All of this should be ready tomorrow.  If this message was the highlight of your day then I suggest that you stop whatever in the hell you're doing and go outside, just like I'm fixing to do.

 
FS2_Open Linux Discussion
/me is a linux n00b unable to use the command line for anything, using RH9 and Knoppix.

Is it possible for someone to tell me exactly how to install this, in instructions going as close as:
point at the bottom left of your screen, then click once.
now, go one line higher, doubleclick once.

and instructions on how to make a Knoppix disc with Freespace on it? if that would work i could destribute a bootable CD with FS on it, making it awesome at LAN parties and stuff.
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 taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Everyone/Anyone:  I'm about ready for a new release but I need a couple of people to volunteer to test something for me.  DevIL support is now working fine and the -jpgtga and -pcx32 options work with the Linux version.  HT&L works much better now as well though there are a couple of small glitches that are general in nature.  The problem is that I've got a couple of crashes that I can't find a good cause for.  These crashes only happen with HT&L and on particular missions.  This problem appears to be video driver related but I need help figuring that out for sure.  If you have an non-nVIDIA card or are using older nVIDIA drivers please send me a message ([email protected]) and I'll tell you what you need to do.

kasperl:  If you dual boot or have a Windows machine then it's much easier to install as all you would do is install the Windows version and update it to 1.20 then copy all of the VPs and the "data" directory to a folder on your Linux box.  It gets a little more complicated after this, but you will need to download a linux release from this thread and compile it.  I recommend downloading the one I posted last week (20040301_fs2_open_linux.tar.bz2) and then extracting it.  If you use a recent version of Gnome or KDE then just double-click on the file and it should open the file and have an option to extract it's contents.  Open a terminal window and change to the directory you extract the above file to, then you basically need to do this: ./autogen.sh && make

After that's done copy the file code/fs2 to the directory you copied the game VPs to and, still from the terminal window, type ./fs2 and it should run.  It's probably not as simple as you wanted but I am going to work on an installer for pre-built binaries this week so it should be a lot easier for people new to Linux to play the game.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
FS2_Open Linux Discussion
you have write access correct?
32bit texture suport for OGL is one of the things we realy still need, that and getting specmapping to work
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
FS2_Open Linux Discussion
Taylor : Heh, okay, that's cool.  And the screenie is just tantilizing.  One problem, though.  If I install XF86 from source (This time the actual 4.4.0 release, not dev builds.) (after removing the Mesa libs), I have DRI... Again, only sorta.  I did try playing the older FS2 build, but it hard crashed my computer and I had to change the font dir in the XF86 config file to make it start up correctly again for some reason I can't fathom.  I tried re-compiling it, but it dies on trying to link all the object code.  That really threw me for a loop.
I haven't figured this out, and might just spring for installing linux on my dad's desktop. If his doesn't have an ATI, that is. (And he lets me.. :P)

Also, I tried installing Mesa from the CVS source, and no beans.  I didn't have DRI.  Though, it might have to do with not trying to comment out the r200 drivers.  Unfortunately, I'm spending some time back on the Mac side of my disk since I felt the sudden urge to mess around with Photoshop.

So, I'll be glad to test as always, but I might not actually be able to provide any useful feedback, as it 'll either run really slow (softwear renderer... :< ) or most likely hardcrash.  Although I've yet to build it when not having Mesa installed, so I'll need to try that.  Ofcourse, there is the off chance that I missed something and messed it all up... I seriously hope not, though.

Cheerio!
~Atal
Mertakk monae ki ienikk du bellou zhello.
Kuek mertakk monae ienikk divakkou zhello.

What does it mean if the most fun you had all night was blowing up asteroids...?

"Its a Babylon Space 2 HercFury!" --mikhael on seeing my first fighter design.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
you have write access correct?

Insuisitor was setting it up, I'm not sure if he's done or not.

Quote
32bit texture suport for OGL is one of the things we realy still need, that and getting specmapping to work

There were only a few OGL changes required but it's bmpman.cpp that needed the update.  I've moved on to bug fixing at the moment but bmpman.cpp should only need a little cleaning up to be CVS ready.  I haven't made any changes that are Linux specific in either case so it does need to be tested on Windows first.  I'm using DevIL to load Targas and Jpegs and that should work under Windows without changes.  I'm not sure if you want the Windows version using DevIL though so whatever you want to do about that is fine with me.  It does require -DUSE_DEVIL=1 to include DevIL support.

What was the deal with specmapping?  I think I've only seen bits of those conversations, something about requiring newer nVIDIA cards?  The mantis bug is all that I know of the problem so what's missing?  I could never be confused with a OpenGL expert but I'll look into this a little deeper and see if there is something I can do.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Atalhlla, what Linux distro are you using?  Yellowdog has hardware 3D support for a few computer/vidcard combos.  You can get the full list from the Yellowdog website.  One of the RedHat guys does a lot of work with ATI support in the RedHat releases of XFree86 if that's an option for you.  I don't know if it would help you but it's two things that might be worth looking in to.

If you want to test then send me an e-mail and I'll get you the link for the new test release.  Reproducing the bug is easy and if you hit it then you'll never get off the interface.  One thing though is that you would have to have completed the first real (non-training) mission at least once to test.  I'm not sure if you've had it working that much yet or not though.  If your dad has a Windows desktop then you could install a current release of FSO on it and play past the first mission then copy the pilot files to your Linux/PPC box and test it that way as it should have saved your progess.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Don't know where it's happening, don't know why it's happening, but I now know what's causing the previously mentioned crash.  It's one of the glowmaps, Fighter01-01a-glow.pcx specifically.  'file' lists it as the only file that has 300x300dpi with the others maxing out at 256x256dpi.  Could be something to that.

Anyway, I'm going to test this a little bit more this morning and if that fixed both reproduceable crashes then I'll put out an updated release before the day is over.  There are still three (two possibly related) OGL HT&L rendering bugs that I'm going to start focusing on: jump nodes don't show correctly, full nebulas only have a fog color with the actual bitmap floating off in the corner somewhere, and the hud will sometimes disappear until you fire your primary weapons or move around enough.

It's coming together nicely though.  Won't be much longer before it's caught up with the Windows version graphically.  How many people are actually using this Linux version by the way?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
New release: 20040310_fs2_open_linux.tar.bz2

Except for some known anomalies, HT&L should be good and playable now.  Shields are working again and 32-bit texture support, including the -jpgtga and -pcx32,  is fully functional.  Some more work on the networking side especially for PPC but this isn't complete yet.  A fix for the viewport being squashed in some places and a little better memory management are there as well.

There seems to be a bigger problem with the crashing and the glowmaps.  All glowmaps should work now but the problem is somewhere in the VBO stuff.  I have disabled that for now but will try to narrow down what is giving the video drivers hell and get a proper fix in there soon.  If whoever wrote that code has any insights I'd appreciate knowing what they are.

I think that all of the Linux stuff is there and working well now and it will just be bug hunting and fixes for the few remaining OpenGL bugs left to do.  If anyone has any problems post here or in Mantis since I'm checking it regularly now.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
FS2_Open Linux Discussion
i don't see any reason why we shouldn't use DevIL
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir