4 ms·
Embed the resource files into the executable program
- rlinge 2y agoEmbedding resource files into the executable program ensures that all necessary resources are included, simplifying distribution and preventing issues with missing files. It also enhances security by making it harder to modify or tamper with the resources.
- BobbyTables2 2y agoHate to rain on your parade, but linkers already do this as a built in feature. For example, binutils can embed a binary file and it shows up as a symbol.
- rlinge 2y agoMy script/tool can embed a directory with it's structure, the files(memory block) can be found by path/filename. It's suitable for my app like 'webd file server' which has a lot files embed in it.
- Someone 2y agoIf you are using C23, lookup #embed (https://en.cppreference.com/w/c/preprocessor/embed https://en.cppreference.com/w/c/preprocessor/embed). Including large files will blow up the size of the preprocessed file, so you may want to do this in separate files.