Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Sign binary only if compiled (https://www.kinook.com/Forum/showthread.php?t=3325)

dmurty 12-21-2007 10:54 AM

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

kevina 12-21-2007 10: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):
Code:

[%LASTSTEP_STATUS% = vbldStepStatFailed]
"is true"

dmurty 01-08-2008 12: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 12: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 01:31 PM

Will give that a shot.

Thanks


All times are GMT -5. The time now is 01:08 PM.


Copyright © 1999-2023 Kinook Software, Inc.