【发布时间】:2020-10-19 18:20:10
【问题描述】:
我在 AppVeyor 构建 (Visual Studio 2019) 上遇到了这种超级奇怪的行为:在 shell 脚本 (cmd.exe) 中,当使用 signtool 签署我的应用程序时,所有选项都被解释为文件 (@987654322 @ 可以一次签署多个文件)。
"$WINDOWSKITBIN\\signtool.exe" sign /tr http://timestamp.digicert.com /td sha256 /fd SHA256 /n "Jan Gerner" /v /debug "build\\TypeWorld.exe" 行产生:
Successfully signed: build\TypeWorld.exe
Number of files successfully Signed: 1
Number of errors: 10
SignTool Error: File not found: C:/Program Files/Git/tr
SignTool Error: File not found: http://timestamp.digicert.com
SignTool Error: File not found: C:/Program Files/Git/td
SignTool Error: File not found: sha256
SignTool Error: File not found: C:/Program Files/Git/fd
SignTool Error: File not found: SHA256
SignTool Error: File not found: N:/
SignTool Error: File not found: Jan Gerner
SignTool Error: File not found: V:/
SignTool Error: File not found: C:/Program Files/Git/debug
想要的文件TypeWorld.exe 已签名,只是没有所有选项,并且所有选项都被解释为要签名的文件,然后显然找不到。
我已经确认转义的反斜杠和文件夹变量是正确的。
这一行echo "$WINDOWSKITBIN\\signtool.exe" sign /tr http://timestamp.digicert.com /td sha256 /fd SHA256 /n "Jan Gerner" /v /debug "build\\TypeWorld.exe"
产生预期的渲染:C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd SHA256 /n Jan Gerner /v /debug build\TypeWorld.exe
我尝试在 PowerShell 中运行相同的程序,结果相同。
【问题讨论】:
-
您能否将完整的
appveyor.yml(敏感数据已编辑/删除)发送至support@appveyor.com。 -
我通过电子邮件发送了它。非常感谢及时回复??????
-
啊,我明白了,星期一的邮件被困在垃圾文件夹中!现在调查一下。