- Different Linux distributions with different package formats.
- B-Em's expected directory structure.
The second of those is what I want to discuss here. Generally, Linux packages have an executable file which installs to a central place (for example /usr/bin/b-em) and then any other support files are installed to package-specific read-only (to non-root users) directories for example /usr/lib/b-em (if host CPU architecture specific) or /usr/share/b-em (if not).
This does not pose a problem for files you would be unlikely to want to change so we could have:
But what about ROMs? At the moment there is a sub-directory under roms for each model and the files in that directory are loaded as ROMs when B-Em starts with files starting with a number going into the specified slot and the rest then filling the remaining slots in descending order. But what if B-Em includes a ROM in the directory for a specific model and you would rather it wasn't loaded? It is generally not considered good practice to remove files installed as part of a package by your distribution's package manager. Or what if you want to re-arrange the order?
One option would be to have a user-specific ROMs directory that overrides the system one so for example, if starting a Model B and there is a /home/user/.config/b-em/roms/b directory the ROMs in that directory are loaded instead of the ones in /usr/share/b-em/roms/b. That would work if either the user setting up such a directory were to use symlinks for the distributed ROMs they did want to use, rather than just copying them, or if the version didn't need to match B-Em in any way but what of cases where the ROM needs to be matched to B-Em?
Another option is instead of using a directory for the ROMs to load for each model, use a section in the config file (b-em.cfg) instead which specifies what should be each slot. Where the file specified for a slot is a simple filename rather than a full pathname B-Em could then search in both a user-specific and in the central system directory. That means /home/user/.config/b-em/roms/b would then just contain a selection of ROM images you may or may not want to use for any particular model.
What do you reckon?