Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I automatically set the version of my Inno Setup installer according to my application version?

Tags:

inno-setup

I am using Inno Setup to generate the installer of my application. How can set the version number of the setup.exe (VersionInfoVersion) generated by Inno to match with the version number of my application automatically? Now every time I deploy a new version of my application I need to update the version number manually.

Now I'm doing this:

[Setup] VersionInfoVersion=1.2.2.0 //writing the value manually 

I want something like this:

[Setup] VersionInfoVersion={Get the version of my app} 
like image 814
Salvador Avatar asked Jun 27 '11 20:06

Salvador


People also ask

What is Inno Setup compiler?

IDE. IDE (Dark) Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan. First introduced in 1997, Inno Setup today rivals and even surpasses many commercial installers in feature set and stability.


1 Answers

You can use the Inno Setup Preprocessor GetVersionNumbersString function like this

#define ApplicationName 'Application Name' #define ApplicationVersion GetVersionNumbersString('Application.exe') [Setup] AppName={#ApplicationName} AppVerName={#ApplicationName} {#ApplicationVersion} VersionInfoVersion={#ApplicationVersion} 
like image 76
RRUZ Avatar answered Sep 20 '22 15:09

RRUZ