summaryrefslogtreecommitdiffstats
path: root/PCbuild/pyproject.props
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2020-03-11 11:18:12 (GMT)
committerGitHub <noreply@github.com>2020-03-11 11:18:12 (GMT)
commit2dd41740c97bd77695ddcc590caa7f53e76dc35a (patch)
treee0a323fafc27dc4660f5783faa5274ecd6c37562 /PCbuild/pyproject.props
parent39c34933fc958fd773ebf14ccd2e0224450b17ed (diff)
downloadcpython-2dd41740c97bd77695ddcc590caa7f53e76dc35a.zip
cpython-2dd41740c97bd77695ddcc590caa7f53e76dc35a.tar.gz
cpython-2dd41740c97bd77695ddcc590caa7f53e76dc35a.tar.bz2
bpo-39930: Ensure vcruntime140.dll is included in all Windows packages (GH-18918)
Also adds GitHub CI test for Windows installer changes
Diffstat (limited to 'PCbuild/pyproject.props')
-rw-r--r--PCbuild/pyproject.props21
1 files changed, 21 insertions, 0 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index c4c07c5..0bbdcfa 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -199,4 +199,25 @@ public override bool Execute() {
<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>
+
+
+ <Target Name="FindVCRuntime" Returns="VCRuntimeDLL">
+ <PropertyGroup Condition="$(PlatformToolset) != 'v140'">
+ <VCRedistDir>$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\</VCRedistDir>
+ <VCRedistDir Condition="$(Platform) == 'Win32'">$(VCRedistDir)x86\</VCRedistDir>
+ <VCRedistDir Condition="$(Platform) != 'Win32'">$(VCRedistDir)$(Platform)\</VCRedistDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="$(PlatformToolset) == 'v140'">
+ <VCRedistDir>$(VCInstallDir)\redist\</VCRedistDir>
+ <VCRedistDir Condition="$(Platform) == 'Win32'">$(VCRedistDir)x86\</VCRedistDir>
+ <VCRedistDir Condition="$(Platform) != 'Win32'">$(VCRedistDir)$(Platform)\</VCRedistDir>
+ </PropertyGroup>
+
+ <ItemGroup Condition="$(VCInstallDir) != ''">
+ <VCRuntimeDLL Include="$(VCRedistDir)\Microsoft.VC*.CRT\vcruntime*.dll" />
+ </ItemGroup>
+
+ <Error Text="vcruntime14*.dll not found under $(VCInstallDir)" Condition="@(VCRuntimeDLL) == ''" />
+ <Message Text="VCRuntimeDLL: @(VCRuntimeDLL)" Importance="high" />
+ </Target>
</Project>