I have created setup for Windows desktop WPF/C# application using Inno Setup 6.0 and it works fine. Just a small cosmetic issue - I would like to use a "semantic version". The version number in Windows has four components, major.minor.build.revision
but I want to present major.minor.patch
. The fourth component will be used by CI and has no relevance for user. In the current script, I have this:
#define AppVersion GetFileVersion("..\app\bin\Release\app.exe")
... which later gets used as:
[Setup]
AppVersion=AppVersion
OutputBaseFilename=app.{#AppVersion}.x64
The result is app.1.0.1.781.x64.exe
created by Inno Setup, so I'm looking for a way to cut off the last version component - .781
. So far I haven't figured out how to invoke a script function for that purpose. I could add function in [Code]
section but it will be defined after [Setup]
section and apparently cannot be called in [Setup]
section?
Is it possible to modify the values of AppVersion
and OutputBaseFilename
in Pascal script, for instance in InitializeSetup()
?