#1
|
|||
|
|||
Sign binary only if compiled
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 |
#2
|
|||
|
|||
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): Code:
[%LASTSTEP_STATUS% = vbldStepStatFailed] |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
Will give that a shot.
Thanks |
Thread Tools | |
Display Modes | Rate This Thread |
|
|