[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Relative path in game?
Gianfranco Berardi a écrit :
I just found that if I try to run the binary of my game from a different
directory, it can't find the files it is trying to load.
So, I figure I must be wrong in my code or my setup, but I am not sure
how to handle this problem. How do most games handle this issue?
"On Linux, it is considered bad practice to put data or configuration
files in a path relative to the location of the executable (see the Unix
Programming Frequently Asked Questions for more information). If you
want to distribute a Linux application, you'd be better advised to
respect the FHS (Filesystem Hierarchy Standard). Here is a document
which gives an overview on how to install games under Linux and how to
put the files in the correct directories according to the FHS : Linux
Games Install And Directory Guide."