Go Back   Champions of Regnum > English > Technical Support > Linux

Linux Technical issues under Linux platform

Reply
 
Thread Tools Display Modes
Old 01-30-2010, 01:06 AM   #31
Kianoni
Initiate
 
Kianoni's Avatar
 
Join Date: Jul 2008
Location: Land of snow and frozen beards
Posts: 183
Kianoni is on a distinguished road
Default

Quote:
Originally Posted by Plover View Post
Contained is a readme, and a launcher script. The version in this zip is for the original, client, so replace that function I previously posted to get it working on the new one.

I do realize the drawing code (and how I'm getting time, etc) ought to be made more efficient, but it's good enough for now.

http://markhamlin.net/tempfiles/libploverfps_1.zip

Usage: Launch RO using the "plauncher" (cleverly stands for ploverlauncher - i know, who would've guessed). Press ] to increase max-fps, and [ to decrease max-fps. You should see a graphic indicating what the current max(target) fps is.
this is quite nice, just what I have been looking for - but it doesn't compile on my kubuntu 9.10
what gcc version are you using?
Code:
plover.c:1:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plover.c:1:                                                                                                            
plover.h:7:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plover.h:7,                                                                                                            
                 from plover.c:1:                                                                                                            
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension                                                                         
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory                                                                             
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory                                                                            
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory                                                                           
plovergraphics.c:1:2: warning: #import is a deprecated GCC extension                                                                         
In file included from plovergraphics.c:1:                                                                                                    
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension                                                                         
In file included from plovergraphics.h:1,                                                                                                    
                 from plovergraphics.c:1:                                                                                                    
plover.h:7:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plovergraphics.c:1:                                                                                                    
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory                                                                             
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory                                                                            
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory                                                                           
plovergraphics.c:3: error: expected ‘)’ before ‘base’                                                                                        
plovergraphics.c:4: error: expected declaration specifiers or ‘...’ before ‘GLuint’                                                          
plovergraphics.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font_base’                                              
plovergraphics.c:48: error: expected declaration specifiers or ‘...’ before ‘GLXDrawable’
plovergraphics.c: In function ‘glXSwapBuffers’:
plovergraphics.c:69: warning: implicit declaration of function ‘glMatrixMode’
plovergraphics.c:69: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
plovergraphics.c:69: error: (Each undeclared identifier is reported only once
plovergraphics.c:69: error: for each function it appears in.)
plovergraphics.c:70: warning: implicit declaration of function ‘glPushMatrix’
plovergraphics.c:72: warning: implicit declaration of function ‘glDisable’
plovergraphics.c:72: error: ‘GL_LIGHTING’ undeclared (first use in this function)
plovergraphics.c:73: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
plovergraphics.c:74: warning: implicit declaration of function ‘glShadeModel’
plovergraphics.c:74: error: ‘GL_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:75: warning: implicit declaration of function ‘glEnable’
plovergraphics.c:75: error: ‘GL_LINE_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:76: warning: implicit declaration of function ‘glHint’
plovergraphics.c:76: error: ‘GL_LINE_SMOOTH_HINT’ undeclared (first use in this function)
plovergraphics.c:76: error: ‘GL_NICEST’ undeclared (first use in this function)
plovergraphics.c:77: error: ‘GL_BLEND’ undeclared (first use in this function)
plovergraphics.c:78: warning: implicit declaration of function ‘glBlendFunc’
plovergraphics.c:78: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:78: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:80: warning: implicit declaration of function ‘glLoadIdentity’
plovergraphics.c:81: warning: implicit declaration of function ‘glOrtho’
plovergraphics.c:82: warning: implicit declaration of function ‘glTranslatef’
plovergraphics.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘upArrow’
plovergraphics.c:92: error: ‘upArrow’ undeclared (first use in this function)
plovergraphics.c:92: error: expected expression before ‘]’ token
plovergraphics.c:110: warning: implicit declaration of function ‘glScalef’
plovergraphics.c:112: warning: implicit declaration of function ‘glColor4f’
plovergraphics.c:113: warning: implicit declaration of function ‘glBegin’
plovergraphics.c:113: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
plovergraphics.c:115: warning: implicit declaration of function ‘glVertex2f’
plovergraphics.c:116: warning: implicit declaration of function ‘glEnd’
plovergraphics.c:118: warning: implicit declaration of function ‘glPopMatrix’
plovergraphics.c:150: warning: implicit declaration of function ‘glRasterPos2f’
plovergraphics.c:152: warning: implicit declaration of function ‘print_string’
plovergraphics.c:152: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:166: error: ‘drawable’ undeclared (first use in this function)
plovergraphics.c: At top level:
plovergraphics.c:208: error: expected ‘)’ before ‘base’
plovergraphics.c:222: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c: In function ‘init_font’:
plovergraphics.c:238: warning: implicit declaration of function ‘glXUseXFont’
plovergraphics.c:238: error: ‘base’ undeclared (first use in this function)
plovergraphics.c: In function ‘font_init’:
plovergraphics.c:244: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:244: warning: implicit declaration of function ‘glGenLists’
plovergraphics.c:245: warning: implicit declaration of function ‘glIsList’
plovergraphics.c:250: error: too many arguments to function ‘init_font’
I can do a makefile for this once I know all the requirements?
__________________
drunken old dwarf
Kianoni no ha iniciado sesión   Reply With Quote
Old 02-01-2010, 11:04 AM   #32
Znurre
Marquis
 
Join Date: Jan 2007
Location: RA
Posts: 1,897
Znurre will become famous soon enoughZnurre will become famous soon enough
Default

Quote:
Originally Posted by Kianoni View Post
this is quite nice, just what I have been looking for - but it doesn't compile on my kubuntu 9.10
what gcc version are you using?
Code:
plover.c:1:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plover.c:1:                                                                                                            
plover.h:7:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plover.h:7,                                                                                                            
                 from plover.c:1:                                                                                                            
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension                                                                         
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory                                                                             
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory                                                                            
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory                                                                           
plovergraphics.c:1:2: warning: #import is a deprecated GCC extension                                                                         
In file included from plovergraphics.c:1:                                                                                                    
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension                                                                         
In file included from plovergraphics.h:1,                                                                                                    
                 from plovergraphics.c:1:                                                                                                    
plover.h:7:2: warning: #import is a deprecated GCC extension                                                                                 
In file included from plovergraphics.c:1:                                                                                                    
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory                                                                             
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory                                                                            
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory                                                                           
plovergraphics.c:3: error: expected ‘)’ before ‘base’                                                                                        
plovergraphics.c:4: error: expected declaration specifiers or ‘...’ before ‘GLuint’                                                          
plovergraphics.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font_base’                                              
plovergraphics.c:48: error: expected declaration specifiers or ‘...’ before ‘GLXDrawable’
plovergraphics.c: In function ‘glXSwapBuffers’:
plovergraphics.c:69: warning: implicit declaration of function ‘glMatrixMode’
plovergraphics.c:69: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
plovergraphics.c:69: error: (Each undeclared identifier is reported only once
plovergraphics.c:69: error: for each function it appears in.)
plovergraphics.c:70: warning: implicit declaration of function ‘glPushMatrix’
plovergraphics.c:72: warning: implicit declaration of function ‘glDisable’
plovergraphics.c:72: error: ‘GL_LIGHTING’ undeclared (first use in this function)
plovergraphics.c:73: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
plovergraphics.c:74: warning: implicit declaration of function ‘glShadeModel’
plovergraphics.c:74: error: ‘GL_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:75: warning: implicit declaration of function ‘glEnable’
plovergraphics.c:75: error: ‘GL_LINE_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:76: warning: implicit declaration of function ‘glHint’
plovergraphics.c:76: error: ‘GL_LINE_SMOOTH_HINT’ undeclared (first use in this function)
plovergraphics.c:76: error: ‘GL_NICEST’ undeclared (first use in this function)
plovergraphics.c:77: error: ‘GL_BLEND’ undeclared (first use in this function)
plovergraphics.c:78: warning: implicit declaration of function ‘glBlendFunc’
plovergraphics.c:78: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:78: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:80: warning: implicit declaration of function ‘glLoadIdentity’
plovergraphics.c:81: warning: implicit declaration of function ‘glOrtho’
plovergraphics.c:82: warning: implicit declaration of function ‘glTranslatef’
plovergraphics.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘upArrow’
plovergraphics.c:92: error: ‘upArrow’ undeclared (first use in this function)
plovergraphics.c:92: error: expected expression before ‘]’ token
plovergraphics.c:110: warning: implicit declaration of function ‘glScalef’
plovergraphics.c:112: warning: implicit declaration of function ‘glColor4f’
plovergraphics.c:113: warning: implicit declaration of function ‘glBegin’
plovergraphics.c:113: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
plovergraphics.c:115: warning: implicit declaration of function ‘glVertex2f’
plovergraphics.c:116: warning: implicit declaration of function ‘glEnd’
plovergraphics.c:118: warning: implicit declaration of function ‘glPopMatrix’
plovergraphics.c:150: warning: implicit declaration of function ‘glRasterPos2f’
plovergraphics.c:152: warning: implicit declaration of function ‘print_string’
plovergraphics.c:152: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:166: error: ‘drawable’ undeclared (first use in this function)
plovergraphics.c: At top level:
plovergraphics.c:208: error: expected ‘)’ before ‘base’
plovergraphics.c:222: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c: In function ‘init_font’:
plovergraphics.c:238: warning: implicit declaration of function ‘glXUseXFont’
plovergraphics.c:238: error: ‘base’ undeclared (first use in this function)
plovergraphics.c: In function ‘font_init’:
plovergraphics.c:244: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:244: warning: implicit declaration of function ‘glGenLists’
plovergraphics.c:245: warning: implicit declaration of function ‘glIsList’
plovergraphics.c:250: error: too many arguments to function ‘init_font’
I can do a makefile for this once I know all the requirements?
You seem to be lacking libgl(-devel), glut (freeglut)(-devel), possibly also mesa(-devel).

Then, start the game like this after you copied the lib into your game dir:

Code:
LD_PRELOAD=`pwd`/libploverfps.so ./rolauncher
His launcher does not work
__________________
Winning a fight is not what makes you a good player, it's how you do it.
http://home.znur.re/screenshot%20201...2011_39_37.jpg

Last edited by Znurre; 02-01-2010 at 11:21 AM.
Znurre no ha iniciado sesión   Reply With Quote
Old 02-01-2010, 11:38 AM   #33
Plover
Apprentice
 
Join Date: Nov 2007
Posts: 84
Plover is on a distinguished road
Default

Yeah, my launcher apparently only works on Ubuntu/Debian.

Here's the link again. I just made the change which I previously mentioned, for it to work on the "experimental" client (which is the current client , obviously).

If anyone has something they want added to this just tell me, and I'll throw it in the zip. (Such as a fix to the launcher)

Also, I just changed 1 other line of the code to fix an oscillating fps issue (a non-issue really). It's untested because I don't play the game anymore, so I'd be interested in hearing if it works, so hit me up on irc.

http://markhamlin.net/tempfiles/libploverfps_1.zip
__________________
Syrtis
Ra: Plover : 50 Hunter || Plovercita : 38 Barb
Horus:Plover : 50 Marx || Hollyfeld : 50 Conj || Plovador: 50 Hunter
Plover no ha iniciado sesión   Reply With Quote
Old 02-06-2010, 08:18 AM   #34
Plover
Apprentice
 
Join Date: Nov 2007
Posts: 84
Plover is on a distinguished road
Default

Ok, I fixed my fix and tested it this time (the fix actually made it not work at all). The FPS floats a little high ( on my machine, it gets about 3fps more than it says it should... possibly a timing issue related to the client's multithreading).

I also switched to using includes instead of imports to get rid of the warnings.

Same link to zip as above.
__________________
Syrtis
Ra: Plover : 50 Hunter || Plovercita : 38 Barb
Horus:Plover : 50 Marx || Hollyfeld : 50 Conj || Plovador: 50 Hunter
Plover no ha iniciado sesión   Reply With Quote
Old 02-07-2010, 06:55 PM   #35
Gideon_Slack
Master
 
Gideon_Slack's Avatar
 
Join Date: Sep 2008
Location: Canada
Posts: 264
Gideon_Slack is on a distinguished road
Default

The plauncher script doesn't seem to be in the latest zip file available. Could you post the script here if it is not too much trouble?
__________________
Bartle Test of Gamer Psychology
Gideon_Slack no ha iniciado sesión   Reply With Quote
Old 02-08-2010, 04:50 AM   #36
Plover
Apprentice
 
Join Date: Nov 2007
Posts: 84
Plover is on a distinguished road
Default

Here's a version which might work on other distros... ?

Code:
#!/bin/sh
cd `dirname ${0}`
export LD_PRELOAD=`pwd`/libploverfps.so
./rolauncher
Basically, all it has to do is set the LD_PRELOAD env var to be libploverfps.so. Points where this could fail is if you use a relative path, since rolauncher changes the pwd when you press enter game world. I'm pretty noob at linuxy stuff, so if people write better launchers feel free to post them.
__________________
Syrtis
Ra: Plover : 50 Hunter || Plovercita : 38 Barb
Horus:Plover : 50 Marx || Hollyfeld : 50 Conj || Plovador: 50 Hunter
Plover no ha iniciado sesión   Reply With Quote
Old 02-08-2010, 12:29 PM   #37
Gideon_Slack
Master
 
Gideon_Slack's Avatar
 
Join Date: Sep 2008
Location: Canada
Posts: 264
Gideon_Slack is on a distinguished road
Default

Quote:
Originally Posted by Plover View Post
Here's a version which might work on other distros... ?

Code:
#!/bin/sh
cd `dirname ${0}`
export LD_PRELOAD=`pwd`/libploverfps.so
./rolauncher
Basically, all it has to do is set the LD_PRELOAD env var to be libploverfps.so. Points where this could fail is if you use a relative path, since rolauncher changes the pwd when you press enter game world. I'm pretty noob at linuxy stuff, so if people write better launchers feel free to post them.
OK, that is very straight forward.

When I can get on Linux, I will probably do something like this:

In .bashrc (in home directory):

Code:
export REGNUM_DIR=~/regnum
And then as a shell script:
Code:
#!/bin/sh
cd $REGNUM_DIR
export LD_PRELOAD=$REGNUM_DIR/libploverfps.so
./rolauncher
__________________
Bartle Test of Gamer Psychology
Gideon_Slack no ha iniciado sesión   Reply With Quote
Old 02-08-2010, 12:39 PM   #38
Znurre
Marquis
 
Join Date: Jan 2007
Location: RA
Posts: 1,897
Znurre will become famous soon enoughZnurre will become famous soon enough
Default

Why export LD_PRELOAD?
Better use:
Code:
#/bin/bash
cd $REGNUM_DIR
LD_PRELOAD=$REGNUM_DIR/libploverfps.so ./rolauncher
That works great for me in Arch Linux.
__________________
Winning a fight is not what makes you a good player, it's how you do it.
http://home.znur.re/screenshot%20201...2011_39_37.jpg
Znurre no ha iniciado sesión   Reply With Quote
Old 02-08-2010, 07:57 PM   #39
Plover
Apprentice
 
Join Date: Nov 2007
Posts: 84
Plover is on a distinguished road
Default

Quote:
Originally Posted by Znurre View Post
Why export LD_PRELOAD?
Better use:
Code:
#/bin/bash
cd $REGNUM_DIR
LD_PRELOAD=$REGNUM_DIR/libploverfps.so ./rolauncher
That works great for me in Arch Linux.
I wasn't sure if the "game" process which rolauncher spawns would still have that var set. If you say it works, then great
__________________
Syrtis
Ra: Plover : 50 Hunter || Plovercita : 38 Barb
Horus:Plover : 50 Marx || Hollyfeld : 50 Conj || Plovador: 50 Hunter
Plover no ha iniciado sesión   Reply With Quote
Old 02-09-2010, 12:12 PM   #40
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Default

Quote:
Originally Posted by Plover View Post
I wasn't sure if the "game" process which rolauncher spawns would still have that var set. If you say it works, then great
The environment is inherited by all subprocesses, so unless something in rolauncher causes LD_PRELOAD to be unset (and using export won't do a damned thing about this), anything it launches will keep it.
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis
Arafails no ha iniciado sesión   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved