There are components for storing arbitrary files / files or strings in DFM
For example, there are such in rxLib / JediVCL, but I believe that many VCL libraries have one or another type of DFM Storage component.
For example, I used to store the Firebird Embedded database in DFM, to save it in TEMP and use it at runtime.
However, this is similar to manually re-reading the file in DFM every time you update it. Rather annoying to say sincerely.
Another approach is to link text to resources. You can look at DUnit sources to find out how it was done. You would also have a .rc file included in the project, so that it would be a compiler in .res when creating the .exe
This approach is fragile with regard to the interpretation of ansi / unicode text. Honestly, before I found DUnit in Delphi XE2 (it was disabled due to an IDE error), I tried to run SF vanilla DUnit. And I failed - non-unicode text files associated with the resource were completely damaged when reading with Unicode Delphi support.
Look here and there, try both approaches and choose the one that suits you best.
source share