News:

If you are a developer, please build MegaGlest on your own and get in touch to contribute (or post your patches on the forums).

Main Menu

[fixed] problems with megaglest in /usr/local megaglest

Started by Andrew Clark, 22 February 2010, 18:46:27

treba

it doesn´t really make sense to have the ini file in your homefolder when you can´t edit it with user rights. also, settings are placed in the homefolder to allow different users different settings. why don´t you check for an existing ini file and, if none is found, copy the one from the data directory?

Andrew Clark

Quote from: treba on  9 June 2010, 09:01:50
it doesn´t really make sense to have the ini file in your homefolder when you can´t edit it with user rights. also, settings are placed in the homefolder to allow different users different settings. why don´t you check for an existing ini file and, if none is found, copy the one from the data directory?
how  you will do it at the moment  installing rpm package? how will you know how many users in system?

treba

@tom123: please open a new topic for this bug.

@Andrew Clark: if i got you right, you will start the game with the script you posted above.
so just replace
/bin/ln -s /usr/share/games/megaglest/glest.ini $GLESTHOME/glest.ini

with

if [ ! -e "$GLESTHOME/glest.ini" ];
       then
       cp /usr/share/games/megaglest/glest.ini $GLESTHOME
fi


this will create a glest.ini for the user who runs the script if he does not already have one.

Andrew Clark

Quote from: treba on  9 June 2010, 11:09:14

if [ ! -e "$GLESTHOME/glest.ini" ];  then
   /bin/cp /usr/share/games/megaglest/glest.ini $GLESTHOME
fi

this will create a glest.ini for the user who runs the script if he does not already have one.
Yeah, good advice. i think i take it. Thank you!

titi

As i already said, look at the ubuntu startscripts. They handle glest with a startscript that builds up the glest environment in .glest using links and so on...
So you really don't need any changes in the code, just a good startscript.



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios