Skip to content

Commit 72d2aa3

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 a1d8371 commit 72d2aa3

File tree

4 files changed

+17
-32
lines changed

4 files changed

+17
-32
lines changed

platforms/Windows/Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@
8787
WindowsRuntimeARM64=$(WindowsRuntimeARM64);
8888
WindowsRuntimeX64=$(WindowsRuntimeX64);
8989
WindowsRuntimeX86=$(WindowsRuntimeX86);
90-
WindowsExperimentalRuntimeARM64=$(WindowsExperimentalRuntimeARM64);
91-
WindowsExperimentalRuntimeX64=$(WindowsExperimentalRuntimeX64);
92-
WindowsExperimentalRuntimeX86=$(WindowsExperimentalRuntimeX86);
93-
IncludeLegacySDK=$(IncludeLegacySDK);
9490
</DefineConstants>
9591
</PropertyGroup>
9692

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

platforms/Windows/bundle/theme.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<Checkbox Name="OptionsInstallCLI" X="192" Y="129" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Cli_ProductName)</Checkbox>
6161
<Checkbox Name="OptionsInstallDBG" X="192" Y="147" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Dbg_ProductName)</Checkbox>
6262
<Checkbox Name="OptionsInstallIDE" X="192" Y="165" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Ide_ProductName)</Checkbox>
63-
<Checkbox Name="OptionsInstallRTL" X="192" Y="183" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="0">#(loc.Rtl_ProductName)</Checkbox>
63+
<Checkbox Name="OptionsInstallRTL" X="192" Y="183" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsInstallRTL">#(loc.Rtl_ProductName)</Checkbox>
6464
<Checkbox Name="OptionsInstallWindowsPlatform" X="192" Y="201" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Plt_ProductName_Windows)</Checkbox>
6565
<Checkbox Name="OptionsInstallWindowsSDKAMD64" X="210" Y="219" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsInstallWindowsPlatform">#(loc.Sdk_ProductName_Windows_amd64)</Checkbox>
6666
<Checkbox Name="OptionsInstallWindowsRedistAMD64" X="228" Y="237" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsInstallWindowsPlatform AND OptionsInstallWindowsSDKAMD64">#(loc.Redist_amd64)</Checkbox>

0 commit comments

Comments
 (0)