File tree Expand file tree Collapse file tree 6 files changed +67
-10
lines changed
Expand file tree Collapse file tree 6 files changed +67
-10
lines changed Original file line number Diff line number Diff line change 1+ name : TestsMSI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - 3.8
8+ - 3.7
9+ paths :
10+ - ' Tools/msi/**'
11+ pull_request :
12+ branches :
13+ - master
14+ - 3.8
15+ - 3.7
16+ paths :
17+ - ' Tools/msi/**'
18+
19+ jobs :
20+ build_win32 :
21+ name : ' Windows (x86) Installer'
22+ runs-on : windows-latest
23+ steps :
24+ - uses : actions/checkout@v1
25+ - name : Build CPython installer
26+ run : .\Tools\msi\build.bat -x86
27+
28+ build_win_amd64 :
29+ name : ' Windows (x64) Installer'
30+ runs-on : windows-latest
31+ steps :
32+ - uses : actions/checkout@v1
33+ - name : Build CPython installer
34+ run : .\Tools\msi\build.bat -x64
Original file line number Diff line number Diff line change 1+ Ensures the required :file: `vcruntime140.dll ` is included in install
2+ packages.
Original file line number Diff line number Diff line change @@ -200,4 +200,25 @@ public override bool Execute() {
200200 <Error Text =" Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition =" '$(_SignCommand)' == ''" />
201201 <Exec Command =' $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError =" false" />
202202 </Target >
203+
204+
205+ <Target Name =" FindVCRuntime" Returns =" VCRuntimeDLL" >
206+ <PropertyGroup Condition =" $(PlatformToolset) != 'v140'" >
207+ <VCRedistDir >$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\</VCRedistDir >
208+ <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
209+ <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
210+ </PropertyGroup >
211+ <PropertyGroup Condition =" $(PlatformToolset) == 'v140'" >
212+ <VCRedistDir >$(VCInstallDir)\redist\</VCRedistDir >
213+ <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
214+ <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
215+ </PropertyGroup >
216+
217+ <ItemGroup Condition =" $(VCInstallDir) != ''" >
218+ <VCRuntimeDLL Include =" $(VCRedistDir)\Microsoft.VC*.CRT\vcruntime*.dll" />
219+ </ItemGroup >
220+
221+ <Error Text =" vcruntime14*.dll not found under $(VCInstallDir)" Condition =" @(VCRuntimeDLL) == ''" />
222+ <Message Text =" VCRuntimeDLL: @(VCRuntimeDLL)" Importance =" high" />
223+ </Target >
203224</Project >
Original file line number Diff line number Diff line change 519519 <Warning Text =" Not including zlib is not a supported configuration." />
520520 </Target >
521521
522- <PropertyGroup >
523- <VCRedistDir >$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\</VCRedistDir >
524- <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
525- <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
526- </PropertyGroup >
527- <ItemGroup Condition =" $(VCInstallDir) != ''" >
528- <VCRuntimeDLL Include =" $(VCRedistDir)\**\vcruntime*.dll" />
529- </ItemGroup >
530- <Target Name =" _CopyVCRuntime" AfterTargets =" Build" Inputs =" @(VCRuntimeDLL)" Outputs =" $(OutDir)%(Filename)%(Extension)" >
522+ <Target Name =" _CopyVCRuntime" AfterTargets =" Build" Inputs =" @(VCRuntimeDLL)" Outputs =" $(OutDir)%(Filename)%(Extension)" DependsOnTargets =" FindVCRuntime" >
531523 <!-- bpo-38597: When we switch to another VCRuntime DLL, include vcruntime140.dll as well -->
532524 <Warning Text =" A copy of vcruntime140.dll is also required" Condition =" !$(VCToolsRedistVersion.StartsWith(`14.`))" />
533525 <Copy SourceFiles =" %(VCRuntimeDLL.FullPath)" DestinationFolder =" $(OutDir)" />
Original file line number Diff line number Diff line change 1111 <SuppressICEs >ICE43</SuppressICEs >
1212 </PropertyGroup >
1313 <Import Project =" ..\msi.props" />
14+ <PropertyGroup Condition =" exists('$(BuildPath)vcruntime140_1.dll')" >
15+ <DefineConstants >$(DefineConstants);Include_Vcruntime140_1_dll=1</DefineConstants >
16+ </PropertyGroup >
1417 <ItemGroup >
1518 <Compile Include =" exe.wxs" />
1619 <Compile Include =" exe_files.wxs" />
Original file line number Diff line number Diff line change 3030 </RegistryKey >
3131 </Component >
3232 <Component Id =" vcruntime140.dll" Directory =" InstallDirectory" Guid =" *" >
33- <File Name =" vcruntime140.dll" Source =" !(bindpath.redist) vcruntime140.dll" KeyPath =" yes" />
33+ <File Name =" vcruntime140.dll" Source =" vcruntime140.dll" KeyPath =" yes" />
3434 </Component >
35+ <?ifdef Include _Vcruntime140_1_dll ?>
36+ <Component Id =" vcruntime140_1.dll" Directory =" InstallDirectory" Guid =" *" >
37+ <File Name =" vcruntime140_1.dll" Source =" vcruntime140_1.dll" KeyPath =" yes" />
38+ </Component >
39+ <?endif ?>
3540 </ComponentGroup >
3641 </Fragment >
3742
You can’t perform that action at this time.
0 commit comments