简体   繁体   中英

How to set version number from Inno Setup Pascal Script

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM