使用相对路径设置 Inno Setup 签名工具

问题描述 投票:0回答:1

我正在尝试将 Inno Setup IDE“签名工具”命令设置为使用相对路径。 我制作了一个

sign.bat
脚本,它按照以下文件结构调用
signtool.exe

code_sign\
          + sign.bat
          + signtool.exe
          + cert.pfx
script.iss

如果我将签名工具 (

Tools / Configure Sign Tools...
) 命令设置为
code_sign\sign.bat $p
,我收到以下错误消息:

   Sign Tool command failed (Failed to execute Sign Tool.

Error 2: The system cannot find the file specified). Will retry (2 tries left).
   Running Sign Tool command: sign.bat "(...)\uninst.e32.tmp"
   Sign Tool command failed (Failed to execute Sign Tool.
(...)

签名工具调用时的工作路径是怎样的?

遗憾的是,我无法使用绝对路径(有效),因为

code_sign
文件夹是与其他应用程序和其他用户共享的子模块。

我在这里做错了什么?我应该使用命令行版本吗?

sign.bat
内容:

SET script_path=%~dp0
SET stool=%script_path%signtool.exe
SET pfx=%script_path%cert.pfx

SET ntp=http://timestamp.globalsign.com/scripts/timstamp.dll
SET pwd=12345

"%stool%" sign /f %pfx% /p %pwd% /tr %ntp% /td SHA256 %1
installation inno-setup code-signing signtool
1个回答
2
投票

将您的签名工具命令配置为仅

$p

然后在您的 .iss 中,按如下所示设置

SignTool
指令(假设签名工具命令名为
custom
),并使用
SourcePath
预处理器预定义变量

[Setup]
SignTool=custom {#SourcePath}\code_sign\sign.bat $f
© www.soinside.com 2019 - 2024. All rights reserved.