Author Topic: [fixed] problems with megaglest in /usr/local megaglest  (Read 5653 times)

treba

  • Guest
Re: problems with megaglest in /usr/local megaglest
« Reply #25 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?

Andrew Clark

  • Guest
Re: problems with megaglest in /usr/local megaglest
« Reply #26 on: 9 June 2010, 09:14:01 »
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

  • Guest
Re: problems with megaglest in /usr/local megaglest
« Reply #27 on: 9 June 2010, 11:09:14 »
@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
Code: [Select]
/bin/ln -s /usr/share/games/megaglest/glest.ini $GLESTHOME/glest.ini
with
Code: [Select]
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

  • Guest
Re: problems with megaglest in /usr/local megaglest
« Reply #28 on: 9 June 2010, 12:34:28 »
Code: [Select]
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

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: problems with megaglest in /usr/local megaglest
« Reply #29 on: 9 June 2010, 21:11:57 »
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