Dynamically gather signtool full path

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-08-05 11:25:32 +00:00 committed by Simon Rozman
parent 810d2ac73a
commit 03f356c492
3 changed files with 7 additions and 2 deletions

View File

@ -185,7 +185,7 @@
<CleanDependsOn>CleanSignTarget;$(CleanDependsOn)</CleanDependsOn>
</PropertyGroup>
<Target Name="SignTarget" Inputs="$(TargetPath)" Outputs="$(IntermediateOutputPath)$(TargetName).sign">
<Exec Command="signtool.exe sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
<Exec Command="&quot;$(SignToolPath)&quot; sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true" />
</Target>
<Target Name="CleanSignTarget">

View File

@ -67,7 +67,7 @@
Name="SignTarget"
Inputs="$(TargetPath)"
Outputs="$(IntermediateOutputPath)$(TargetName).sign">
<Exec Command="signtool.exe sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
<Exec Command="&quot;$(SignToolPath)&quot; sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true" />
</Target>
<Target Name="CleanSignTarget">

View File

@ -41,4 +41,9 @@
<Optimization>Disabled</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<PropertyGroup>
<WindowsSdkToolchainPlatform>$(PROCESSOR_ARCHITECTURE)</WindowsSdkToolchainPlatform>
<WindowsSdkToolchainPlatform Condition="'$(PROCESSOR_ARCHITECTURE)'=='AMD64'">x64</WindowsSdkToolchainPlatform>
<SignToolPath>$(WindowsSdkDir)bin\$(TargetPlatformVersion)\$(WindowsSdkToolchainPlatform)\signtool.exe</SignToolPath>
</PropertyGroup>
</Project>