summaryrefslogtreecommitdiffstats
path: root/PCbuild/pyproject.props
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
commitbb24087a2cbfb186b540cc71a74ec8c39c1ebe3a (patch)
tree3b586e72b5744c4076a222e8f803a00d17b5f20f /PCbuild/pyproject.props
parent7425f36ee74ccf5bfc2894aca6e6b86815894f98 (diff)
downloadcpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.zip
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.gz
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.bz2
Issue #23260: Update Windows installer
Diffstat (limited to 'PCbuild/pyproject.props')
-rw-r--r--PCbuild/pyproject.props15
1 files changed, 15 insertions, 0 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 33570d7..1afbfe1 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -11,6 +11,9 @@
<GenerateManifest>false</GenerateManifest>
<EmbedManifest>false</EmbedManifest>
<SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>
+ <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>
+ <SupportSigning Condition="'$(Configuration)' == 'Debug'">false</SupportSigning>
+ <SupportSigning Condition="'$(ConfigurationType)' == 'StaticLibrary'">false</SupportSigning>
</PropertyGroup>
<PropertyGroup>
@@ -138,4 +141,16 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses
Condition="Exists(%(FullPath))"
Targets="CleanAll" />
</Target>
+
+ <PropertyGroup Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+ <SignToolPath Condition="'$(SignToolPath)' == '' or !Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86\signtool.exe</SignToolPath>
+ <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86\signtool.exe</SignToolPath>
+ <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\signtool.exe</SignToolPath>
+ <_SignCommand Condition="Exists($(SignToolPath))">"$(SignToolPath)" sign /q /n "$(SigningCertificate)" /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
+ </PropertyGroup>
+
+ <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
+ </Target>
</Project> \ No newline at end of file