I have Inno Setup 6.1.2 setup script where the version main.sub.batch
is formed like this:
#define AppVerText() \
GetVersionComponents('..\app\bin\Release\app.exe', \
Local[0], Local[1], Local[2], Local[3]), \
Str(Local[0]) + "." + Str(Local[1]) + "." + Str(Local[2])
Later in the setup part, I use it for the name of setup package:
[Setup]
OutputBaseFilename=app.{#AppVerText}.x64
The resulting filename will be app.1.0.2.x64.exe
, which is mighty fine. To make it perfect, I'd like to end up with form app.1.00.002.x64.exe
with zero-padded components.
I did not find anything like PadLeft
in documentation. Unfortunately I also fail to understand how to use my own Pascal function in this context. Can I define a function in Code
section for this?