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 @@ -199,4 +199,25 @@ public override bool Execute() {
199
199
<Error Text =" Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition =" '$(_SignCommand)' == ''" />
200
200
<Exec Command =' $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError =" false" />
201
201
</Target >
202
+
203
+
204
+ <Target Name =" FindVCRuntime" Returns =" VCRuntimeDLL" >
205
+ <PropertyGroup Condition =" $(PlatformToolset) != 'v140'" >
206
+ <VCRedistDir >$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\</VCRedistDir >
207
+ <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
208
+ <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
209
+ </PropertyGroup >
210
+ <PropertyGroup Condition =" $(PlatformToolset) == 'v140'" >
211
+ <VCRedistDir >$(VCInstallDir)\redist\</VCRedistDir >
212
+ <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
213
+ <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
214
+ </PropertyGroup >
215
+
216
+ <ItemGroup Condition =" $(VCInstallDir) != ''" >
217
+ <VCRuntimeDLL Include =" $(VCRedistDir)\Microsoft.VC*.CRT\vcruntime*.dll" />
218
+ </ItemGroup >
219
+
220
+ <Error Text =" vcruntime14*.dll not found under $(VCInstallDir)" Condition =" @(VCRuntimeDLL) == ''" />
221
+ <Message Text =" VCRuntimeDLL: @(VCRuntimeDLL)" Importance =" high" />
222
+ </Target >
202
223
</Project >
Original file line number Diff line number Diff line change 527
527
<Warning Text =" Not including zlib is not a supported configuration." />
528
528
</Target >
529
529
530
- <PropertyGroup >
531
- <VCRedistDir >$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\</VCRedistDir >
532
- <VCRedistDir Condition =" $(Platform) == 'Win32'" >$(VCRedistDir)x86\</VCRedistDir >
533
- <VCRedistDir Condition =" $(Platform) != 'Win32'" >$(VCRedistDir)$(Platform)\</VCRedistDir >
534
- </PropertyGroup >
535
- <ItemGroup Condition =" $(VCInstallDir) != ''" >
536
- <VCRuntimeDLL Include =" $(VCRedistDir)\**\vcruntime*.dll" />
537
- </ItemGroup >
538
- <Target Name =" _CopyVCRuntime" AfterTargets =" Build" Inputs =" @(VCRuntimeDLL)" Outputs =" $(OutDir)%(Filename)%(Extension)" >
530
+ <Target Name =" _CopyVCRuntime" AfterTargets =" Build" Inputs =" @(VCRuntimeDLL)" Outputs =" $(OutDir)%(Filename)%(Extension)" DependsOnTargets =" FindVCRuntime" >
539
531
<!-- bpo-38597: When we switch to another VCRuntime DLL, include vcruntime140.dll as well -->
540
532
<Warning Text =" A copy of vcruntime140.dll is also required" Condition =" !$(VCToolsRedistVersion.StartsWith(`14.`))" />
541
533
<Copy SourceFiles =" %(VCRuntimeDLL.FullPath)" DestinationFolder =" $(OutDir)" />
Original file line number Diff line number Diff line change 11
11
<SuppressICEs >ICE43</SuppressICEs >
12
12
</PropertyGroup >
13
13
<Import Project =" ..\msi.props" />
14
+ <PropertyGroup Condition =" exists('$(BuildPath)vcruntime140_1.dll')" >
15
+ <DefineConstants >$(DefineConstants);Include_Vcruntime140_1_dll=1</DefineConstants >
16
+ </PropertyGroup >
14
17
<ItemGroup >
15
18
<Compile Include =" exe.wxs" />
16
19
<Compile Include =" exe_files.wxs" />
Original file line number Diff line number Diff line change 30
30
</RegistryKey >
31
31
</Component >
32
32
<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" />
34
34
</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 ?>
35
40
</ComponentGroup >
36
41
</Fragment >
37
42
You can’t perform that action at this time.
0 commit comments