简体   繁体   中英

How to set inno setup script parameters from final builder?

I am new to Final Builder 7 and got some work on it.

I want to set minor version from Final Builder 7 to inno setup script by asking user to enter the minor version number.

I have defined user variable called minor, which is set by asking user input, I want to use this variable in one of the .iss files in the project.

Any clue?

Thanks in advance.

-- With best regards Amol

I solved this using following script:

#define AppVersion GetFileVersion("MyApp.exe")
#define Major
#define Minor
#define Rev
#define Build
#define Version ParseVersion("MyApp.exe", Major, Minor, Rev, Build)

[Setup]
AppName=MyApp
AppVerName={#AppVersion}
VersionInfoVersion={#AppVersion}
AppVersion={#AppVersion}
OutputBaseFilename=5{#Build}

-- Cheers

Looks like you are looking for user input. We run many builds many times every day and user never needs to enter anything. Final builder 7 has version control, or you can increment variable. We use combination of that. So, Final builder has the version, we don't touch it. For example, final builder has 1.1.2 and it also has incremental variable. In the end we get 1.1.2.345 where 345 is automatically incremented build number.

Now, how we update Inno to the appropriate version. In our scripts we have #define(s) listed like this

#define Major "@@major@@"
#define Minor "@@minor@@"
#define Anything "@@anything@@"

Where @@....@@ is a placeholder. Before running Inno script we execute Text Find / Replace action and our placeholders are replaced with real data. Then we execute Inno using Run DOS Command / Batch File action and executing something like this

iscc.exe "%BaseDir%\Install Files\MyLovelyInstallScript.iss"

This way, there is no need for user input, unless your software changes version completely. Then, we just change variables that represent numbers in 1.1.2 - a rare event.

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