Re: [TuxKart-devel] Location sysem
Status: Alpha
Brought to you by:
sjbaker
From: Ricardo C. <ri...@ae...> - 2004-06-28 00:09:33
|
Em Domingo, 27 de Junho de 2004 22:20, o=20 tux...@li... escreveu: > Content-Type=3Dmessage/rfc822 > Content-Description=3Dembedded message > Date: Sun, 27 Jun 2004 16:20:55 -0500 > From: Steve Baker <sjb...@ai...> > To: =A0t...@li... > Subject: Re: [TuxKart-devel] Location sysem > Reply-To: tux...@li... > > Ricardo Cruz wrote: > > =A0I noticed that TuxKart doesn't make a very smart checking where it is > > placed. Just looks at local dir, up dir and system chunk (/usr). > > If you 'make install', it should work out where it is OK...but you're > right, it could be better. > Personally, I am a MacOSX kinda of guys. Just extract stuff and run=20 executables from there. :) > > =A0Smarter location checking would be: > > - asking proc for the binary directory; > > - look at the way the binary was executed - won't be able to get the > > location for symlinks. > > OK - gimme your sourceforge user name - you'll have CVS access and you can > attack it. > No need for that, I'll send a patch to the mailing list. Would like to hel= p=20 more, but my 3d knowledge are pretty limited. :( Anyway, you might have to wait a week, since I have a couple of exams on t= his=20 one. :( > > =A0By the way, using chdir() is kinda of ugly. What about having a glob= al > > string? > > It's a LOT easier that way - no more messing around strcat'ing strings - > all the files are always in the exact same place once you've chdir'ed to > the right directory. > The code is in C++, right? You would just need to type: load_map(datadir + "track1.ac"); being datadir the string that has that info... > Why do you think it's ugly? > chdir() doesn't sound very portable to start with. Besides, when using getcwd() in my system, I get a warning, so I get a bit= =20 creepy about those commands. > > =A0Best fix, however, would be to make Linux file manager to execute > > binaries from their own dir. > > Hmmm - that's pretty controversial. Well, MacOSX, a unix system, also behaves the way I described. I've mailed David Faure (a guru from kde), a couple of years ago, and his= =20 answer was that some commands might use the current working directory to=20 output trash to. I think that such commands should be changed and not make= =20 the Linux desktop system to be obsolete. I've recently, started a discussion at kde-apps.org about this. Hope I can= =20 convince them to change that behavior. :) Cheers, Ricardo =2D-=20 Nobody wants constructive criticism. It's all we can do to put up with constructive praise. |