Hi, I'm starting to put some images on buttons in my program, and I'm wondering if there is a way to link them to the executable so that I don't have to use a path to find them. Is that possible? If so, how?
On Unix/Linux, you'll need to figure out some other way. Common methods include:
- application data directory (typically /usr/share/myapp/ where 'myapp' is the name of your program)
- appending the data to the executable itself (for this you will need some way to know how to find and read the data from the executable file. It isn't that hard, actually.)
- encoding it with the source code itself (such as is done with XPM files)
For other systems, I don't know. On old DOS systems, for example, you would just store it in the same directory as the application itself. (This still happens on many systems, even *nix... but is not recommended.)