Hey Mark,
Is there a way that works with as-installed FPC on Linux of preloading a big block of raw text into a string? For the purpose of the question please assume that this is a multi-line script which includes arbitrary quote characters etc.
First of all I don't know if you want this on a program you're compiling with the
fp console IDE or with the Lazarus IDE, so I'll try and give an answer to both:
1. Using
fpI spent about 20m looking in all the menus for something that would remotely mention resources. Alas I failed.
If there is a way, I need more time to investigate.
2. Using Lazarus
If you go to the project options(CTRL+SHIFT+F11) under the entry Resources on the tree view you can add all types of resources that are automatically linked to your binary.
This way you use the same procedure that creates the
*.res file that is usually created and contains, AT LEAST, the default icon for the application when in GUI mode.
And from any normal Linux install, you're able to have that
*.res file produced and linked, right?
I'm guessing that even if you're doing a purely console app, Lazarus will still link the resources you've added there, since I think that any binary, GUI or not can have resources linked to it.
If that works for you, do you then need assistance on how to retrieve the saved resource?
I haven't done that in a long while but I do remember that it wasn't hard.
Cheers,
Gus