Wednesday, 11 September 2013

Displaying text from a file in an Inno installer with new lines

Displaying text from a file in an Inno installer with new lines

I'm trying to embed some text read from a file into an Inno installer.
Ideally this will happen in the pre-processor (ISPP) so the text cannot be
modified. I am able to read the text but cannot get any newlines to
display:
#define FileHandle
#define FileLine
#define ReadmeText ""
#for {FileHandle = FileOpen("README.txt"); FileHandle &&
!FileEof(FileHandle); FileLine = FileRead(FileHandle)} ReadmeText =
ReadmeText + FileLine
#if FileHandle
#expr FileClose(FileHandle)

No comments:

Post a Comment