today I searched for a solution to embed Text-Files into the executable.
My search was not successfull.
Background is, I want my program to only have 1 file with everything compiled into.
I think, it is usefull for text-based-help-files and such.
And yes, I will have to re-compile the program, everytime I change the text.
Here is my approach:
Code: Select all
DataSection
helpstring : IncludeBinary "help.txt" + Chr(0)
EndDataSection
EditorGadget(0,0,0,100,250,#PB_Editor_ReadOnly)
mystring.s = PeekS(? helpstring)
SetGadgetText(0, mystring.s)
Works on PureBasic Mac 4.20 and Mac 4.30a1