Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help using signtool.exe in Delphi project post-build events

This is a very simple question. What should I write in Delphi post build events to execute a coomand line tool?

I wrote this:

c:\BinPath\signtool.exe sign /f c:\BinPath\Mypfxfile.pfx /p MyPassword 
/t http:// timestamp.verisign.com/scripts/timstamp.dll c:\BinPath\Project1.exe

(where c:\BinPath is the Delphi output path, for simplicity I copied signtool.exe adn pfx file in the same folder)

as i build the project I have this modal window error:

--------------------------- Project 1- CodeGear Delphi for Microsoft Windows - Form1 --------------------------- Cannot open file "C:\SourcePath\EXEC". Impossible to find the specified path..

and in the messages I have

[Exec Error] EXEC(1): "SignerTimeStamp() failed." (-2147467259/0x80004005)

[Exec Error] exit from command "c:\BinPath\signtool.exe sign /f c:\BinPath\Mypfxfile.pfx /p MyPassword /t http:// timestamp.verisign.com/scripts/timstamp.dll c:\BinPath\Project1.exee" with code 1.

How to manage this? In Delphi help I read (from Creating Build Events topic):

Enter the build commands, one command per line, and press Return after entering each command. Commands consist of any valid DOS command, such as: copy $() c:\Built\$()

So i simply inserted in the build event what (c:\BinPath\....Project1.exe) I was able to run from command prompt. Where is the error? Thanks.

like image 943
LaBracca Avatar asked Nov 18 '10 13:11

LaBracca


1 Answers

I could have deleted this question, since I found the problem, but I think it is better to leave it since it can be useful for others:

THE PROBLEM WAS SIMPLY

http:// timestamp...

of course should be

http://timestamp...

when copying on build event I inserted an extra space by mistake. By reading the question posted I found the error...

like image 120
LaBracca Avatar answered Oct 16 '22 00:10

LaBracca