Skip to content

Commit 2ab082b

Browse files
committed
WiX: adjust features for shared content
Adjust the feature set to extract platform support from the SDK content. This allows us to have the platform specific libraries (XCTest, Testing) isolated from the SDK content. It also allows us to temporarily share the features across the legacy and experimental SDKs.
1 parent 3e70dff commit 2ab082b

File tree

2 files changed

+38
-18
lines changed

2 files changed

+38
-18
lines changed

platforms/Windows/platforms/windows/windows.wxs

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4104,6 +4104,41 @@
41044104
<?endif?>
41054105

41064106
<!-- Features -->
4107+
<Feature Display="hidden" Id="PlatformSupport" Title="!(loc.Plt_ProductName_Windows)">
4108+
<ComponentGroupRef Id="Testing" />
4109+
4110+
<!-- MSI management Components -->
4111+
<ComponentGroupRef Id="EnvironmentVariables" />
4112+
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
4113+
</Feature>
4114+
4115+
<?if $(IncludeARM64) = True?>
4116+
<Feature Display="hidden" Id="arm64.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_arm64)">
4117+
<Level Condition="InstallARM64Platform = 1 OR InstallARM64ExperimentalSDK = 1" Value="1" />
4118+
4119+
<ComponentGroupRef Id="XCTest.arm64" />
4120+
<ComponentGroupRef Id="Testing.arm64" />
4121+
</Feature>
4122+
<?endif?>
4123+
4124+
<?if $(IncludeX64) = True?>
4125+
<Feature Display="hidden" Id="x64.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_amd64)">
4126+
<Level Condition="InstallAMD64Platform = 1 OR InstallAMD64ExperimentalSDK = 1" Value="1" />
4127+
4128+
<ComponentGroupRef Id="XCTest.x64" />
4129+
<ComponentGroupRef Id="Testing.x64" />
4130+
</Feature>
4131+
<?endif?>
4132+
4133+
<?if $(IncludeX86) = True?>
4134+
<Feature Display="hidden" Id="x86.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_x86)">
4135+
<Level Condition="InstallX86Platform = 1 OR InstallX86ExperimentalSDK = 1" Value="1" />
4136+
4137+
<ComponentGroupRef Id="XCTest.x86" />
4138+
<ComponentGroupRef Id="Testing.x86" />
4139+
</Feature>
4140+
<?endif?>
4141+
41074142
<?if $(IncludeLegacySDK) = True?>
41084143
<Feature Id="SDK" AllowAbsent="no" Title="!(loc.Plt_ProductName_Windows)">
41094144
<ComponentGroupRef Id="LegacySwiftRemoteMirror" />
@@ -4112,26 +4147,17 @@
41124147
<ComponentGroupRef Id="Legacy_FoundationUnicode" />
41134148
<ComponentGroupRef Id="Legacy_FoundationCShims" />
41144149

4115-
<ComponentGroupRef Id="Testing" />
4116-
41174150
<ComponentGroupRef Id="AuxiliaryFiles" />
41184151
<ComponentGroupRef Id="Configuration" />
41194152
<ComponentGroupRef Id="SwiftShims" />
41204153
<ComponentGroupRef Id="apinotes" />
41214154
<ComponentGroupRef Id="libcxxshim" />
4122-
4123-
<!-- MSI management Components -->
4124-
<ComponentGroupRef Id="EnvironmentVariables" />
4125-
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
41264155
</Feature>
41274156

41284157
<?if $(IncludeARM64) = True?>
41294158
<Feature Id="arm64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_arm64)">
41304159
<Level Condition="InstallARM64SDK = 0" Value="0" />
41314160

4132-
<ComponentGroupRef Id="XCTest.arm64" />
4133-
<ComponentGroupRef Id="Testing.arm64" />
4134-
41354161
<ComponentGroupRef Id="LegacySwiftRemoteMirror.arm64" />
41364162

41374163
<ComponentGroupRef Id="LegacyBlocksRuntime.arm64" />
@@ -4173,9 +4199,6 @@
41734199
<Feature Id="x64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_amd64)">
41744200
<Level Condition="InstallAMD64SDK = 0" Value="0" />
41754201

4176-
<ComponentGroupRef Id="XCTest.x64" />
4177-
<ComponentGroupRef Id="Testing.x64" />
4178-
41794202
<ComponentGroupRef Id="LegacySwiftRemoteMirror.x64" />
41804203

41814204
<ComponentGroupRef Id="LegacyBlocksRuntime.x64" />
@@ -4217,9 +4240,6 @@
42174240
<Feature Id="x86" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_x86)">
42184241
<Level Condition="InstallX86SDK = 0" Value="0" />
42194242

4220-
<ComponentGroupRef Id="XCTest.x86" />
4221-
<ComponentGroupRef Id="Testing.x86" />
4222-
42234243
<ComponentGroupRef Id="LegacySwiftRemoteMirror.x86" />
42244244

42254245
<ComponentGroupRef Id="LegacyBlocksRuntime.x86" />
@@ -4269,9 +4289,6 @@
42694289
<ComponentGroupRef Id="ExperimentalSwiftShims" />
42704290
<ComponentGroupRef Id="Experimental_FoundationCShims" />
42714291
<ComponentGroupRef Id="Experimental_FoundationUnicode" />
4272-
4273-
<!-- MSI management Components -->
4274-
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
42754292
</Feature>
42764293

42774294
<?if $(IncludeARM64) = True?>

platforms/Windows/shared/swift.en-us.wxl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<String Id="Sdk_ProductName_Windows_arm64" Value="Swift Windows SDK (ARM64)" />
3232
<String Id="Sdk_ProductName_Windows_amd64" Value="Swift Windows SDK (AMD64)" />
3333
<String Id="Sdk_ProductName_Windows_x86" Value="Swift Windows SDK (X86)" />
34+
<String Id="Plt_ProductName_Windows_arm64" Value="Swift Windows Platform Support (ARM64)" />
35+
<String Id="Plt_ProductName_Windows_amd64" Value="Swift Windows Platform Support (AMD64)" />
36+
<String Id="Plt_ProductName_Windows_x86" Value="Swift Windows Platform Support (X86)" />
3437
<String Id="Plt_ProductName_Windows_Experimental_arm64" Value="Swift Windows Platform Support (ARM64) [Experimental]" />
3538
<String Id="Plt_ProductName_Windows_Experimental_amd64" Value="Swift Windows Platform Support (AMD64) [Experimental]" />
3639
<String Id="Plt_ProductName_Windows_Experimental_x86" Value="Swift Windows Platform Support (X86) [Experimental]" />

0 commit comments

Comments
 (0)