After building a project group of 2 projects with Delphi (2009) I digitally sign the 2 exes using InstallAware Code signing, an exe that shipped with Delphi 2009.
How is it possible to automize the digital signature, so when I build I can also attach digital signature.
For digital signing I use a pvk (private key) file and an spc (Sw publisher certificate) file.
Subquestion: Moreover I created a project group because I have 2 exes, but they are almost the same, the only thing that changes is the Application icon and the application name (one is ProductOne.dpr, the other is ProductTwo.dpr).
In practice I have 2 brands of the same product, I have a single build but activation keys details activate one or the other, anyway now I was asked to change the icon and the filename, and for this I need to build 2 projects, activation key is not enough anymore to distinguish between the 2. Anyway if there is a way to do this from a single project it would be better.
For the first part:
We code sign our executables using a FinalBuilder script action but the same can be achieved with the command line:
signtool sign /f cert-file.pfx /p pwd /d "MyApp description" /du "http://www.your-url-here.com/" /t "http://timestamp.globalsign.com/timstamp.dll" MyApp.exe
signtool comes from the MS Windows SDK and can also work with certificates from the local machine certificate store. See the linked doc page for the slight changes required for the different forms of certificate.
I would guess this can be put in the post-build events of your project. It will then get run each time you do a full build.
Don't know about the second bit of the question - though I guess I would tend to use a third party tool like FinalBuilder (again) to manage the swapping of icons/resources etc and to do the actual build.