I'm trying to create an installer using Inno Setup, which I have never used before, and everything is working fine, except that I'd like a VERSION.txt file to be created on installation. Here's what I've got so far, at the very end of my script:
[Code]
procedure writeVersion();
begin
SaveStringToFile(ExpandConstant('{app}\VERSION.txt'), '{#MyAppVersion}', False);
end;
procedure nowWrite();
begin
writeVersion();
end;
But there is no VERSION.txt file being created at all after I compile and run the installer. I've never used Pascal before, and this is as far as I could get before I gave up. Why is the file not being created?
EDIT:
I tried adding
begin
nowWrite();
end.
to the end as suggested by @TLama, but it is still not writing a new file.
Thanks in advance for the help!
nowWrite
procedure from somewhere ? P.S.ExpandConstant
is not needed for the second parameter which only expands the preprocessor's variable. – TLamawriteln
can be used to examine an expression though it might be hard to figure out where the output can be seen. – wallyk