How do you install and manage your data files


I am using a GNU/Linux operating system. I was wondering how are you guys handling data files like images, sounds, fonts etc. As you may already know, executable file goes into some kind of bin directory when installed with standard GNU configure and make scripts. Data files on the other hand, might be installed into wide range of directories, which is unknown at the time you are developing your game. Can someone offer examples of, files, or custom makefiles you use when you are developing your game, and want to distribute it to other linux distros. Thanks in advance.

I have made some reading on this, and came out with a strategy that suited my needs. You can read it here: if you are interested.

I have variables in my makefile for things like where the data will be installed:
DATA_DIR = /usr/share/games/edgar/
And then, when I do my compilation, I pass this value to the compiler:
gcc main.c -DINSTALL_PATH="$(DATA_DIR)"
In the actual code, I have the following:
snprintf(dataPath, sizeof(dataPath), “%s%s”, INSTALL_PATH, filename);
The DATA_DIR variable can be changed either in the makefile or be overridden on the commandline:
make INSTALL_PATH=/usr/local/games/edgar/

Well I don’t use any kind of makefile. I read the post about it included in a response but still don’t know how that would work for me. The makefile seems to be something the compiler understands I think. I use msvc 6 and I simply put my stuff in a folder called data and inside that folder I have other folders like “settings”, “fonts”, and “graphics”. Since I know where all of my stuff is I just call it when I start the program: font1 = TTF_OpenFont(“data/fonts/bookosb.ttf”,24); and such. I guess if I had a need to hide stuff I would make an encrypted block out of all of the data and unencrypt it as I load it.