inno-setupcode-signingsigningsigntool

Providing SignTool configuration in Inno Setup script


I have the following Inno Setup signing configuration:

[Setup]
SignTool=signtool $f
SignedUninstaller=yes

In Inno Setup Compiler IDE in "Tools > Configure Sign Tools..." I have:

"C:\DEVELOPMENT\Setup\signtool.exe" sign /f C:\DEVELOPMENT\Signing_Certificate.pfx /p "my_password" $f

...this works great on my local machine when I compile my Inno Setup.

However, we need to build installer automatically using TeamCity. So this all have to be automatic. And the sign tool configuration needs to be included in the script, without any need to configure anything upfront.

Is there anyway to declare my paths as variables in the actual Inno Setup script so that they are picked up in the signing wizard line above?


Solution

  • For automatic build, do not use Inno Setup IDE. You should use iscc command-line compiler.

    For configuring a sign tool, iscc has /S switch:

    iscc example.iss "/Ssigntool=C:\DEVELOPMENT\Setup\signtool.exe sign /f C:\DEVELOPMENT\Signing_Certificate.pfx /p my_password $f"