OK so I've been working on some applications for FreeBSD, but they use plenty of external files (content, configuration, etc). One of them is a game, the other is a desktop utility. In "Windows world", I would simply put such files in subdirectories where the binary is. However, I noticed that when you start a program from Konqueror, this doesn't tend to work since the path returned is the home directory of the user rather than the path of the binary you are running. Obviously it works fine from the console, but not all users use the console. So what I did to work around this was to select a base directory that is pretty much guaranteed to exist on all FreeBSD systems, which would be /usr/local/share. So what I ended up with is /usr/local/share/eponasoft/appname/subdirs*/data*. Is this considered proper form, or is there a better, more standardized way of doing things? For the game, I could probably consider putting the files at ~/.whatever, but that won't work for the desktop utility since it needs to be accessible to anyone on the system. The desktop utility keeps user profile information in a subdir off of the user's home dir, but it also has content that can be downloaded that is accessible to every user who uses it.
Also, since these are to be cross-platform applications, does anyone have a recommendation for how this could be done on a Linux machine? For a Windows machine, I already have the process ironed out, so that's not a problem, but I'm unfamiliar with the standard Linux filesystem hierarchy...if such a thing exists.
Also, since these are to be cross-platform applications, does anyone have a recommendation for how this could be done on a Linux machine? For a Windows machine, I already have the process ironed out, so that's not a problem, but I'm unfamiliar with the standard Linux filesystem hierarchy...if such a thing exists.