I have a file 'releaseVersionNumber.txt' which I read during my build process; currently its read for my Mac build but I want to read it in my Windows NSIS build to reduce the number of edit locations (duplication being evil)...
So I'm trying to replace:
!define VERSION 1.2.3
with something like
FileOpen $4 "..\releaseVersionNumber.txt" r
FileRead $4 $1
FileClose $4
!define VERSION ${1}
But I get an error command FileOpen not valid outside Section or Function. Wrapping it in a function I produces command call not valid outside Section or Function so I can't seem to do this in the installer setup, only at runtime.
Is there a way to achieve what I'm after?!
VIProductVersion "${VERSION}.0"
gives me Error: invalid VIProductVersion format, should be X.X.X.X ... – Paravane