Author Topic: MVE conversion tips, please?  (Read 4871 times)

0 Members and 1 Guest are viewing this topic.

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Here is a SRPM that I use: http://icculus.org/~taylor/misc/openal-0.0.8-0.cvs.20050329.1.src.rpm

If your user isn't setup for it's own RPM building then you'll have to "su -", enter the root password, and "rpmbuild --rebuild openal-0.0.8-0.cvs.20050329.1.src.rpm".  I didn't really intend for anyone other than myself to use it so the spec file changes aren't listed.  It shouldn't be system specific though and should work without modification on SuSE but if it doesn't let me know.

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
I'm probably still missing a dependency, but I'm not sure. I didn't see any critical errors, yet when I searched for it, I didn't find anything except in the source dirs and on my Windows drive.

I'll try this either later tonight or tomorrow evening. I should be able to use kpackage to install this, I think. Possibly even YaST.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
MVE conversion tips, please?
Mmm, too bad you're not using a debian machine or you could use checkinstall to build a custom package file from source downloads.

There might be a similar tool for RPMs though.
-C

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
There are, but I'm not sure I have all the deps. I found the correct openal-devel package, but I got a couple other errors the last time I tried to compile from source. Something about multi.cpp? I don't remember. I'll have to delete and try to compile again so I can get the errors to show all y'all.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
First of all, I haven't tried the rpm. I wanted to see if any of these errors might have made it so that it didn't install from compiling the source.

Although the gcc seems to think they're trivial, as it continues compiling, the first significant set of errors are:

network/multimsgs.cpp: In function ‘void send_turret_fired_packet(int, int, int)’:
network/multimsgs.cpp:3645: warning: statement has no effect
network/multimsgs.cpp: In function ‘void send_ai_info_update_packet(object*, char)’:
network/multimsgs.cpp:5383: warning: statement has no effect
network/multimsgs.cpp: In function ‘void send_NEW_primary_fired_packet(ship*, int)’:
network/multimsgs.cpp:7911: warning: statement has no effect
network/multimsgs.cpp: In function ‘void send_flak_fired_packet(int, int, int, float)’:
network/multimsgs.cpp:8322: warning: statement has no effect
network/multimsgs.cpp: In function ‘void send_player_pain_packet(net_player*, int, float, vec3d*, vec3d*)’:
network/multimsgs.cpp:8436: warning: statement has no effect


Then it goes for a little while and gives this:

network/multi_dogfight.cpp: In function ‘void multi_df_debrief_init()’:
network/multi_dogfight.cpp:400: warning: unused variable ‘rescode’                                                                        


Then again it goes for a little while and gives:

network/multi_obj.cpp: In function ‘int multi_oo_pack_data(net_player*, object*, ubyte, ubyte*)’:
network/multi_obj.cpp:408: warning: statement has no effect
network/multi_obj.cpp:414: warning: statement has no effect
network/multi_obj.cpp:422: warning: statement has no effect
network/multi_obj.cpp:428: warning: statement has no effect
network/multi_obj.cpp:439: warning: statement has no effect
network/multi_obj.cpp:446: warning: statement has no effect
network/multi_obj.cpp:468: warning: statement has no effect
network/multi_obj.cpp:482: warning: statement has no effect
network/multi_obj.cpp:489: warning: statement has no effect
network/multi_obj.cpp:496: warning: statement has no effect
network/multi_obj.cpp:517: warning: statement has no effect
network/multi_obj.cpp:571: warning: statement has no effect
network/multi_obj.cpp:574: warning: statement has no effect
network/multi_obj.cpp:577: warning: statement has no effect
network/multi_obj.cpp:580: warning: statement has no effect
network/multi_obj.cpp: In function ‘void multi_oo_process_all(net_player*)’:
network/multi_obj.cpp:1277: warning: statement has no effect
network/multi_obj.cpp:1307: warning: statement has no effect
network/multi_obj.cpp:1319: warning: statement has no effect
network/multi_obj.cpp:1334: warning: statement has no effect
network/multi_obj.cpp: In function ‘void multi_oo_send_control_info()’:
network/multi_obj.cpp:1474: warning: statement has no effect
network/multi_obj.cpp:1484: warning: statement has no effect


then after a while:

network/psnet2.cpp: In function ‘int psnet_send(net_addr*, void*, int, int)’:
network/psnet2.cpp:1122: warning: statement has no effect
network/psnet2.cpp:1123: warning: statement has no effect
network/psnet2.cpp: In function ‘int psnet_rel_send(PSNET_SOCKET_RELIABLE, ubyte*, int, int)’:
network/psnet2.cpp:1406: warning: statement has no effect                                                                                  


Then a couple trivial errors about thruster glows, anims, and contrails show up:

ship/ship.cpp: In function ‘void ship_init_thrusters()’:
ship/ship.cpp:5919: warning: unused variable ‘num_thrust_anims’
ship/ship.cpp:5939: warning: unused variable ‘num_thrust_glow_anims’

and

ship/shipcontrails.cpp:570:2: warning: no newline at end of file


Finally, further down and finally the last error, just before it completes the last steps to finish compiling, there is this error:

freespace2/freespace.cpp: In function ‘void game_flip_page_and_time_it()’:
freespace2/freespace.cpp:5289: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘fix


I don't know if any of this is helpful in determining what needs work in that source package or what I might be missing, but I included all of the errors just in case there's something I'm missing. Usually I'm pretty good at compiling and installing from source, so this is somewhat frustrating.
« Last Edit: October 12, 2005, 07:44:05 am by 2993 »
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Quote
Originally posted by CaptJosh
.......

I don't know if any of this is helpful in determining what needs work in that source package or what I might be missing, but I included all of the errors just in case there's something I'm missing. Usually I'm pretty good at compiling and installing from source, so this is somewhat frustrating.

All of that was pretty harmless.  No reason it shouldn't work based on what you posted.

The "statement has no effect" warnings only show up in release builds and a fix was previously in the code but Goober reverted it for some reason.  Maybe MSVC hated it or something, he never said.

The thruster related warnings are just because of how Goober broke thrusters.  He'll fix that eventually.

The last warning is harmless since "fix" is an int (in size at least) so no big deal there.  I'm planning to go through and get all of that type stuff cleaned out and safety-checked in the not too distant future.

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
Then I must either

A) Not know what to do next to make it work now, or

B) be making some other kind of mistake.

And the INSTALL file doesn't say much at about installing on linux. Heck it doesn't say much about installing period. Just a few minor notes.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Is it building successfully?  If it is then just copy code/fs2_open_r (or code/fs2_open_d) to where ever your game VPs are installed.  The "make install" functionality isn't there in a working way since it's a single binary and I never felt the need to do that.

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
Um...Maybe you should include that bit of information in the INSTALL text file?

So I assume I need the vps from my FS2 discs plus whichever VPs I use from the SCP site?
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Quote
Originally posted by CaptJosh
Um...Maybe you should include that bit of information in the INSTALL text file?

Yeah I was thinking the same thing.  I only just looked at the INSTALL file after my previous post so I didn't really how useless it was.  I'll update it at some point today.

Quote
So I assume I need the vps from my FS2 discs plus whichever VPs I use from the SCP site?

Yep.  If you have your windows drive mounted in Linux then you can just symlink the VPs rather than having an extra copy of them.

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
I'd rather have the extra copy. I've got windows on one drive and Linux on another. It'll be faster to have the actual files in place.

BTW, has anyone looked into having a launcher for the linux version? I'm going to have to try to find my command line switches that I always use and remember to append them all to the command line in the shortcut I'll have to make.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Quote
Originally posted by CaptJosh
BTW, has anyone looked into having a launcher for the linux version? I'm going to have to try to find my command line switches that I always use and remember to append them all to the command line in the shortcut I'll have to make.

I'm rewriting a ton of code that will get rid of most of the cmdline options, and mostly get rid of the need for a launcher (except for mods which I'm still trying to work out). As part of that a new launcher is going to be made which is cross-platform.  I'm not going to make one for the current system since I'd just have to scrap it in a few months anyway.


Your video settings can be changed in ~/.fs2_open/fs2_open.ini.

Just add your most used cmdline options to ~/.fs2_open/data/cmdline_fso.cfg and it will automatically use them.  You can add things specific to a mod or whatever in a shell script for calling the game.  If you use something like TBP, which is best used in a separate directory, then you can just create a data/cmdline_fso.cfg there and it will use both your generic options in ~ and then TBP specific ones in that cfg file.

For instance, I have in my ~/.fs2_open/data/cmdline_fso.cfg:
-nograb -window -nobeampierce -targetinfo -dualscanlines -no_set_gamma -snd_preload -fps -allslev -spec_point 0.6 -spec_exp 11 -spec_static 1.2 -spec_tube 0.4 -2d_poof -spec -glow -loadonlyused -jpgtga -bitmap_cache

In my main FS2 game directory I have in data/cmdline_fso.cfg:
-ambient_factor 77

In the data/cmdline_fso.cfg in the TBP directory I have:
-mod tbp -tbp -3dwarp -ambient_factor 87

This way when I play TBP I don't have to do anything special.  Since I like an ambient factor if 87 for TBP I specify it there and it doesn't conflict with the setting in my main FS2 game directory.

If the same setting is specified in the various places then the last one parsed will get used.  So the value of -ambient_factor in the game directory will get overwritten by the value of -ambient_factor in ~ which will get overwritten by the value specified on the real command line.

That probably just confused you though. :)

 

Offline CaptJosh

  • 210
MVE conversion tips, please?
Not really. I've seen stuff like that before. I'll see what I can do, but I can't even get it to run without any command line options so far. It makes like it will, but then it crashes. Maybe I should try telling it to run windowed?
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
MVE conversion tips, please?
Quote
Originally posted by taylor
The "statement has no effect" warnings only show up in release builds and a fix was previously in the code but Goober reverted it for some reason.  Maybe MSVC hated it or something, he never said.
Which one was that?

I do remember a few fixes you added that were suggested by someone who doesn't post here.  One or two of them seriously messed up MSVC, so that could be what happened.  Though usually if I revert something like that I try to explain why in my commits.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Quote
Originally posted by Goober5000
Which one was that?

I do remember a few fixes you added that were suggested by someone who doesn't post here.  One or two of them seriously messed up MSVC, so that could be what happened.  Though usually if I revert something like that I try to explain why in my commits.

It was a multi_lag thing I believe, where it was just a define simulating a return value of (0).  The problem is that it's basically invalid if you aren't testing for a return value since you would end up with "(0);".  The fix was to enclose it in braces and I'm not sure why MSVC would have complained about that since GCC was totally happy with it but the fact that MSVC is so against spec I'm not really surprised if that was the case.

But this is only with release builds since the debug builds use the real function and I seldomly make release builds for my own use.  I plan on doing a better fix when I get my Windows box going again and can properly work out any warnings so I don't really care if it's still giving warnings or not right now.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
MVE conversion tips, please?
Ah, yes, I remember that.  MSVC hated it; it threw about five errors on just that one line.

What was the final result, something like {(0);}?  I can try to recreate the original error message if you want.

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
MVE conversion tips, please?
Quote
Originally posted by Goober5000
What was the final result, something like {(0);}?  I can try to recreate the original error message if you want.

Nah, don't worry about it.  I don't really like how all of it works so I'll just fix it in a better way than that when I get the chance.  It's just a minor annoyance now and not worth the effort of doing the same old thing.  I've already been going through and fixing the rest of the various warnings anyway.