View Full Version : Sign binary only if compiled
dmurty
12-21-2007, 11:54 AM
I have a bunch of vb6 and vs.net steps that compile binaries. I then have steps to sign all of those binaries. The problem is that once I sign the binary the next project that depends on that binary sees that it is newer than the source so it compiles. This causes every project to compile if it depends on one of our compiled binaries. Is there a way that I can have visual build pro only sign the binaries if visual build pro detected that it has to compile a new binary?
Thanks,
Damien
kevina
12-21-2007, 11:58 PM
One method is to add another Sign Code step before your current Sign Code step, set to Verify (command) which will fail if the binary is unsigned. Also set this "verify" step to Continue Building on failure.
Then conditionally build your (immediately following) actual Sign Code step to only build when the last step failed (use this script expression): [%LASTSTEP_STATUS% = vbldStepStatFailed] "is true"
dmurty
01-08-2008, 01:26 PM
Kevin,
Thanks for your reply. That seems to have done the trick, except for my vs.net projects. The binaries for my vs.net 2005 projects seems to loose their signatures after the build step even if there are not changes.
Please help,
Thanks
kinook
01-08-2008, 01:47 PM
VS 2005 copies the compiled executable from the obj\config folder to the bin\config folder after building, so you will need to sign both instances to prevent it from copying (and replacing a signed version in bin\config with an unsigned version in obj\config) when building.
dmurty
01-08-2008, 02:31 PM
Will give that a shot.
Thanks
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.