Skip to content

Commit 505b0e6

Browse files
committed
WiX: ingest the MSI redistributable in the toolchain
With the ability to install the runtime with SxS manifesting, we now properly build the toolchain against a previous runtime which is isolated from the SDK associated runtime. In order to support this model, we must ingest the redistributable and package that into the toolchain.
1 parent abf297d commit 505b0e6

File tree

3 files changed

+17
-27
lines changed

3 files changed

+17
-27
lines changed

platforms/Windows/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
WindowsRuntimeARM64=$(WindowsRuntimeARM64);
8585
WindowsRuntimeX64=$(WindowsRuntimeX64);
8686
WindowsRuntimeX86=$(WindowsRuntimeX86);
87+
RedistributablesDirectory=$(RedistributablesDirectory);
8788
</DefineConstants>
8889
</PropertyGroup>
8990

platforms/Windows/bld/bld.wxi

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
33

4+
<?if $(sys.BUILDARCH) == x64 ?>
5+
<?define MergeModuleFileName = "rtl.amd64.msm" ?>
6+
<?else?>
7+
<?define MergeModuleFileName = "rtl.$(sys.BUILDARCH).msm" ?>
8+
<?endif?>
9+
410
<Package
511
Language="1033"
612
Manufacturer="!(loc.ManufacturerName)"
@@ -35,6 +41,10 @@
3541
</Directory>
3642
</DirectoryRef>
3743

44+
<DirectoryRef Id="toolchain_$(VariantName)_usr_bin">
45+
<Merge DiskId="1" Id="swift_runtime" Language="0" SourceFile="$(RedistributablesDirectory)\$(MergeModuleFileName)" />
46+
</DirectoryRef>
47+
3848
<ComponentGroup Id="cmark_gfm" Directory="toolchain_$(VariantName)_usr_bin">
3949
<Component>
4050
<File Source="$(ToolchainRoot)\usr\bin/cmark-gfm.dll" />
@@ -212,30 +222,6 @@
212222
</Component>
213223
</ComponentGroup>
214224

215-
<ComponentGroup Id="BlocksRuntime">
216-
<Component Directory="toolchain_$(VariantName)_usr_bin">
217-
<File Source="$(ToolchainRoot)\usr\bin\BlocksRuntime.dll" />
218-
</Component>
219-
220-
<Component Directory="toolchain_$(VariantName)_usr_lib">
221-
<File Source="$(ToolchainRoot)\usr\lib\BlocksRuntime.lib" />
222-
</Component>
223-
224-
<!-- TODO(compnerd) should we install the block headers? -->
225-
</ComponentGroup>
226-
227-
<ComponentGroup Id="libdispatch">
228-
<Component Directory="toolchain_$(VariantName)_usr_bin">
229-
<File Source="$(ToolchainRoot)\usr\bin\dispatch.dll" />
230-
</Component>
231-
232-
<Component Directory="toolchain_$(VariantName)_usr_lib">
233-
<File Source="$(ToolchainRoot)\usr\lib\dispatch.lib" />
234-
</Component>
235-
236-
<!-- TODO(compnerd) should we install the dispatch headers? -->
237-
</ComponentGroup>
238-
239225
<ComponentGroup Id="SwiftCxx" Directory="toolchain_$(VariantName)_usr_lib_swift_swiftToCxx">
240226
<Component>
241227
<File Source="$(ToolchainRoot)\usr\lib\swift\swiftToCxx\_SwiftCxxInteroperability.h" />
@@ -551,15 +537,17 @@
551537
</Component>
552538
</ComponentGroup>
553539

540+
<Feature Id="SwiftRuntimeRedistributable" Title="Swift Runtime Redistributable" AllowAdvertise="no" Display="hidden" Level="1">
541+
<MergeRef Id="swift_runtime" />
542+
</Feature>
543+
554544
<Feature Id="BuildTools" AllowAbsent="no" Title="$(VariantProductName)">
555545
<ComponentGroupRef Id="cmark_gfm" />
556546

557547
<ComponentGroupRef Id="binutils" />
558548
<ComponentGroupRef Id="lto" />
559549
<ComponentGroupRef Id="clang" />
560550
<ComponentGroupRef Id="lld" />
561-
<ComponentGroupRef Id="BlocksRuntime" />
562-
<ComponentGroupRef Id="libdispatch" />
563551
<ComponentGroupRef Id="swift" />
564552
<ComponentGroupRef Id="argument_parser" />
565553
<ComponentGroupRef Id="tools_support_core" />

platforms/Windows/bundle/installer.wxs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
<Variable Name="OptionsInstallCLI" bal:Overridable="yes" Persisted="yes" Value="1" />
3333
<Variable Name="OptionsInstallDBG" bal:Overridable="yes" Persisted="yes" Value="1" />
3434
<Variable Name="OptionsInstallIDE" bal:Overridable="yes" Persisted="yes" Value="1" />
35-
<Variable Name="OptionsInstallRTL" Value="1" />
35+
<!-- TODO(compnerd) enable installing non-native RTL (e.g. X64 on ARM64) -->
36+
<Variable Name="OptionsInstallRTL" bal:Overridable="yes" Persisted="yes" Value="1" />
3637

3738
<Variable Name="OptionsInstallUtilities" bal:Overridable="yes" Persisted="yes" Value="1" />
3839

0 commit comments

Comments
 (0)