使用相对路径设置Inno Setup标志工具

我正在尝试将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
iCMS 回答:使用相对路径设置Inno Setup标志工具

仅将签名工具命令配置为$p

然后在您的.iss中,使用custom SignTool directive来设置preprocessor predefined variable,如下所示(假设符号工具命令名为SourcePath)。 / p>

[Setup]
SignTool=custom {#SourcePath}\code_sign\sign.bat $f
本文链接:https://www.f2er.com/2019369.html

大家都在问