I have a script that reads the version number from an application file. Now I need to find a way to place this number in the AppVersion
directive of Inno Setup.
How can I place the return value of my function in the AppVersion
directive?
I have a script that reads the version number from an application file. Now I need to find a way to place this number in the AppVersion
directive of Inno Setup.
How can I place the return value of my function in the AppVersion
directive?
Use a scripted constant:
[Setup]
AppVersion={code:GetAppVersion}
[Code]
function GetAppVersion(Param: string): string;
begin
Result := MyFunction;
end;
If the function call is costly, you should cache its value to a global variable and use the cached value in the scripted constant.