Skip to content

Commit ee2f116

Browse files
committed
WiX: create component groups and components
Adjust the packaging to use component groups and components per file. This should enable repair to behave properly as each component can only have a single key file which is repaired.
1 parent 0a4403a commit ee2f116

File tree

8 files changed

+1478
-741
lines changed

8 files changed

+1478
-741
lines changed

platforms/Windows/devtools.wxs

Lines changed: 152 additions & 84 deletions
Large diffs are not rendered by default.

platforms/Windows/icu-amd64.wxs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,28 @@
2525
</SetDirectory>
2626

2727
<!-- Components -->
28-
<DirectoryRef Id="_usr_bin">
29-
<Component Id="ICURuntime" Guid="77a97eb2-4a5c-4d85-9fb7-692fd37d9b68">
28+
<ComponentGroup Id="ICU" Directory="_usr_bin">
29+
<Component Id="icudt.dll" Guid="0fcd685e-e7be-4f00-874e-160b1b0bc45b">
3030
<File Id="icudt.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icudt$(var.ProductVersionMajor).dll" Checksum="yes" />
31+
</Component>
32+
<Component Id="icuin.dll" Guid="d7c9b71a-df54-4c6d-9f8f-18273322f0dc">
3133
<File Id="icuin.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuin$(var.ProductVersionMajor).dll" Checksum="yes" />
34+
</Component>
35+
<Component Id="icuuc.dll" Guid="d9abc6db-1cd1-4ab8-b762-1fde12b3a741">
3236
<File Id="icuuc.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuuc$(var.ProductVersionMajor).dll" Checksum="yes" />
3337
</Component>
38+
</ComponentGroup>
3439

35-
<?ifdef INCLUDE_DEBUG_INFO ?>
36-
<Component Id="ICUDebugInfo" Guid="c4643ea4-e585-466d-a5ad-078ee75cee8c">
40+
<?ifdef INCLUDE_DEBUG_INFO ?>
41+
<ComponentGroup Id="ICUDebugInfo" Directory="_usr_bin">
42+
<Component Id="icuin.pdb" Guid="ba918d12-3c1a-49fc-b67a-e63577a772bb">
3743
<File Id="icuin.pdb" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuin$(var.ProductVersionMajor).pdb" Checksum="yes" DiskId="2" />
44+
</Component>
45+
<Component Id="icuuc.pdb" Guid="c0a0d274-0dd2-4e2d-931e-bbedbbd57bf0">
3846
<File Id="icuuc.pdb" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuuc$(var.ProductVersionMajor).pdb" Checksum="yes" DiskId="2" />
3947
</Component>
40-
<?endif ?>
41-
</DirectoryRef>
48+
</ComponentGroup>
49+
<?endif ?>
4250

4351
<DirectoryRef Id="TARGETDIR">
4452
<Component Id="EnvironmentVariables" Guid="97fe0a23-32e0-481d-8827-215f4c74f03c">
@@ -48,13 +56,13 @@
4856

4957
<!-- Features -->
5058
<Feature Id="WinX64ICU" Absent="disallow" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift ICU for Windows x86_64" Level="1" Title="Swift ICU for Windows x86_64">
51-
<ComponentRef Id="ICURuntime" />
59+
<ComponentGroupRef Id="ICU" />
5260
<ComponentRef Id="EnvironmentVariables" />
5361

5462
<?ifdef INCLUDE_DEBUG_INFO ?>
5563
<Feature Id="DebugInfo" Absent="allow" AllowAdvertise="yes" Description="Debug Information for Swift ICU for Windows x86_64" Level="0" Title="Debug Information">
5664
<Condition Level="1">INSTALL_DEBUGINFO</Condition>
57-
<ComponentRef Id="ICUDebugInfo" />
65+
<ComponentGroupRef Id="ICUDebugInfo" />
5866
</Feature>
5967
<?endif ?>
6068
</Feature>

platforms/Windows/icu-x86.wxs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,28 @@
2525
</SetDirectory>
2626

2727
<!-- Components -->
28-
<DirectoryRef Id="_usr_bin">
29-
<Component Id="ICURuntime" Guid="7256ab43-a1b5-4af2-8549-2d5f8edcac8b">
28+
<ComponentGroup Id="ICU" Directory="_usr_bin">
29+
<Component Id="icudt.dll" Guid="791a58ad-1317-4cfb-965b-03cd81fafd31">
3030
<File Id="icudt.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icudt$(var.ProductVersionMajor).dll" Checksum="yes" />
31+
</Component>
32+
<Component Id="icuin.dll" Guid="3f29a80a-4fe5-468a-b1c8-6a6e9196491f">
3133
<File Id="icuin.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuin$(var.ProductVersionMajor).dll" Checksum="yes" />
34+
</Component>
35+
<Component Id="icuuc.dll" Guid="d433b3e3-63e2-4066-b66a-670eab04b38f">
3236
<File Id="icuuc.dll" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuuc$(var.ProductVersionMajor).dll" Checksum="yes" />
3337
</Component>
38+
</ComponentGroup>
3439

35-
<?ifdef INCLUDE_DEBUG_INFO ?>
36-
<Component Id="ICUDebugInfo" Guid="56091ee6-dfbd-4b53-a579-eaea5f36767a">
40+
<?ifdef INCLUDE_DEBUG_INFO ?>
41+
<ComponentGroup Id="ICUDebugInfo" Directory="_usr_bin">
42+
<Component Id="icuin.pdb" Guid="8f2872f3-ce5c-4e1d-880a-e516c8e4dc03">
3743
<File Id="icuin.pdb" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuin$(var.ProductVersionMajor).pdb" Checksum="yes" DiskId="2" />
44+
</Component>
45+
<Component Id="icuuc.pdb" Guid="c4f7c8bd-8fda-4f3e-a8ee-52a9ff8d493d">
3846
<File Id="icuuc.pdb" Source="$(var.ICU_ROOT)\Library\icu-$(var.ProductVersion)\usr\bin\icuuc$(var.ProductVersionMajor).pdb" Checksum="yes" DiskId="2" />
3947
</Component>
40-
<?endif ?>
41-
</DirectoryRef>
48+
</ComponentGroup>
49+
<?endif ?>
4250

4351
<DirectoryRef Id="TARGETDIR">
4452
<Component Id="EnvironmentVariables" Guid="ef4b454a-efa5-44d2-a7ad-3e965539ec48">

platforms/Windows/runtime-amd64.wxs

Lines changed: 87 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,57 +26,131 @@
2626
</SetDirectory>
2727

2828
<!-- Components -->
29-
<DirectoryRef Id="_usr_bin">
30-
<Component Id="SwiftRuntime" Guid="cd825076-16da-4530-84c8-810f3ae472a8">
29+
<ComponentGroup Id="SwiftRuntime" Directory="_usr_bin">
30+
<Component Id="BlocksRuntime.dll" Guid="bf2447f9-0ff5-48b6-864f-e738f9c51fb0">
3131
<File Id="BlocksRuntime.dll" Source="$(var.SDK_ROOT)\usr\bin\BlocksRuntime.dll" Checksum="yes" />
32+
</Component>
33+
<Component Id="dispatch.dll" Guid="3167f6ca-0a20-445e-87eb-c65c2db4e17c">
3234
<File Id="dispatch.dll" Source="$(var.SDK_ROOT)\usr\bin\dispatch.dll" Checksum="yes" />
35+
</Component>
36+
<Component Id="Foundation.dll" Guid="9f47536a-4fae-41c4-b20f-1ffacd3d46d0">
3337
<File Id="Foundation.dll" Source="$(var.SDK_ROOT)\usr\bin\Foundation.dll" Checksum="yes" />
38+
</Component>
39+
<Component Id="FoundationNetworking.dll" Guid="f36f2cc6-0034-4ddd-924f-865523fdf4e2">
3440
<File Id="FoundationNetworking.dll" Source="$(var.SDK_ROOT)\usr\bin\FoundationNetworking.dll" Checksum="yes" />
41+
</Component>
42+
<Component Id="FoundationXML.dll" Guid="e5bc9e2b-3083-4b61-a553-59224bc1f6f3">
3543
<File Id="FoundationXML.dll" Source="$(var.SDK_ROOT)\usr\bin\FoundationXML.dll" Checksum="yes" />
44+
</Component>
45+
<Component Id="swift_Concurrency.dll" Guid="ce77eb06-eb96-4ea5-b9ce-c103f0b74063">
3646
<File Id="swift_Concurrency.dll" Source="$(var.SDK_ROOT)\usr\bin\swift_Concurrency.dll" Checksum="yes" />
47+
</Component>
48+
<Component Id="swift_Differentiation.dll" Guid="cef7dda7-cbfc-478c-932b-211f9b9d12f0">
3749
<File Id="swift_Differentiation.dll" Source="$(var.SDK_ROOT)\usr\bin\swift_Differentiation.dll" Checksum="yes" />
50+
</Component>
51+
<Component Id="swiftDistributed.dll" Guid="455f1af2-2c0a-40d4-b2a0-5a3479f6970f">
3852
<File Id="swiftDistributed.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftDistributed.dll" Checksum="yes" />
53+
</Component>
54+
<Component Id="swift_RegexParser.dll" Guid="bd2d3e51-1091-4a80-a9b5-5daae6c36881">
3955
<File Id="swift_RegexParser.dll" Source="$(var.SDK_ROOT)\usr\bin\swift_RegexParser.dll" Checksum="yes" />
56+
</Component>
57+
<Component Id="swift_StringProcessing.dll" Guid="198f58ad-8797-40ee-b109-dec6f9b57b27">
4058
<File Id="swift_StringProcessing.dll" Source="$(var.SDK_ROOT)\usr\bin\swift_StringProcessing.dll" Checksum="yes" />
59+
</Component>
60+
<Component Id="swiftCore.dll" Guid="4098dff8-8b8d-48ee-a234-d29104d4c809">
4161
<File Id="swiftCore.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftCore.dll" Checksum="yes" />
62+
</Component>
63+
<Component Id="swiftDispatch.dll" Guid="312ffb9e-7ecf-423f-8f59-3041d2776e4a">
4264
<File Id="swiftDispatch.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftDispatch.dll" Checksum="yes" />
43-
<!-- <File Id="swiftDemangle.dll" Source="$(var.SDK_ROOT)\bin\swiftDemangle.dll" Checksum="yes" /> -->
65+
</Component>
66+
<!--
67+
<Component Id="swiftDemangle.dll" Guid="baa8777d-cd9b-4da8-8a88-353b95602fbd">
68+
<File Id="swiftDemangle.dll" Source="$(var.SDK_ROOT)\bin\swiftDemangle.dll" Checksum="yes" />
69+
</Component>
70+
-->
71+
<Component Id="swiftCRT.dll" Guid="6ef8eecb-780a-46a0-bddd-79b9a7bb8316">
4472
<File Id="swiftCRT.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftCRT.dll" Checksum="yes" />
73+
</Component>
74+
<Component Id="swiftRemoteMirror.dll" Guid="2292dd48-e253-446d-9eb3-650d9264af77">
4575
<File Id="swiftRemoteMirror.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftRemoteMirror.dll" Checksum="yes" />
76+
</Component>
77+
<Component Id="swiftSwiftOnoneSupport.dll" Guid="bb44ff8b-a243-4986-a11a-3800323994a9">
4678
<File Id="swiftSwiftOnoneSupport.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftSwiftOnoneSupport.dll" Checksum="yes" />
79+
</Component>
80+
<Component Id="swiftWinSDK.dll" Guid="42cda8cb-fb2f-4967-8720-2d2c012b72a0">
4781
<File Id="swiftWinSDK.dll" Source="$(var.SDK_ROOT)\usr\bin\swiftWinSDK.dll" Checksum="yes" />
4882
</Component>
83+
</ComponentGroup>
4984

50-
<Component Id="SwiftUtilities" Guid="a5126e94-79df-455c-83de-04e064ad586b">
85+
<ComponentGroup Id="SwiftUtilities" Directory="_usr_bin">
86+
<Component Id="plutil.exe" Guid="49b166e5-98e4-47dd-bfff-e73fd2e38b4c">
5187
<File Id="plutil.exe" Source="$(var.SDK_ROOT)\usr\bin\plutil.exe" Checksum="yes" />
5288
</Component>
89+
</ComponentGroup>
5390

54-
<?ifdef INCLUDE_DEBUG_INFO ?>
55-
<Component Id="SwiftRuntimeDebugInfo" Guid="b61b71f4-8387-4be1-a756-1d06e796003c">
91+
<?ifdef INCLUDE_DEBUG_INFO ?>
92+
<ComponentGroup Id="SwiftRuntimeDebugInfo">
93+
<Component Id="BlocksRuntime.pdb" Guid="230f07ae-6378-410e-8c21-6f6af65ab10c">
5694
<File Id="BlocksRuntime.pdb" Source="$(var.SDK_ROOT)\usr\bin\BlocksRuntime.pdb" Checksum="yes" DiskId="2" />
95+
</Component>
96+
<Component Id="dispatch.pdb" Guid="9540ccae-ca75-449d-bab0-1ba691a22615">
5797
<File Id="dispatch.pdb" Source="$(var.SDK_ROOT)\usr\bin\dispatch.pdb" Checksum="yes" DiskId="2" />
98+
</Component>
99+
<Component Id="Foundation.pdb" Guid="4acf2787-e5df-45fa-a13f-d17eace5477e">
58100
<File Id="Foundation.pdb" Source="$(var.SDK_ROOT)\usr\bin\Foundation.pdb" Checksum="yes" DiskId="2" />
101+
</Component>
102+
<Component Id="FoundationNetworking.pdb" Guid="a099090f-2db2-4f06-aa87-afbc89926e2f">
59103
<File Id="FoundationNetworking.pdb" Source="$(var.SDK_ROOT)\usr\bin\FoundationNetworking.pdb" Checksum="yes" DiskId="2" />
104+
</Component>
105+
<Component Id="FoundationXML.pdb" Guid="97bc6b02-8ac0-4a28-a032-7ebe1dd0d496">
60106
<File Id="FoundationXML.pdb" Source="$(var.SDK_ROOT)\usr\bin\FoundationXML.pdb" Checksum="yes" DiskId="2" />
107+
</Component>
108+
<Component Id="swift_Concurrency.pdb" Guid="433dd15e-f72c-4294-9bf5-0be4771d1c10">
61109
<File Id="swift_Concurrency.pdb" Source="$(var.SDK_ROOT)\usr\bin\swift_Concurrency.pdb" Checksum="yes" DiskId="2" />
110+
</Component>
111+
<Component Id="swift_Differentiation.pdb" Guid="0f761b2c-f01c-4c46-b29a-9e319912089b">
62112
<File Id="swift_Differentiation.pdb" Source="$(var.SDK_ROOT)\usr\bin\swift_Differentiation.pdb" Checksum="yes" DiskId="2" />
113+
</Component>
114+
<Component Id="swiftDistributed.pdb" Guid="cac90c19-4f03-40e4-be41-f3f7d9484230">
63115
<File Id="swiftDistributed.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftDistributed.pdb" Checksum="yes" DiskId="2" />
116+
</Component>
117+
<Component Id="swift_RegexParser.pdb" Guid="1272f4c6-36a2-4323-abce-daab5a8e02d9">
64118
<File Id="swift_RegexParser.pdb" Source="$(var.SDK_ROOT)\usr\bin\swift_RegexParser.pdb" Checksum="yes" DiskId="2" />
119+
</Component>
120+
<Component Id="swift_StringProcessing.pdb" Guid="d123c083-9dca-4814-875e-27458ae378d9">
65121
<File Id="swift_StringProcessing.pdb" Source="$(var.SDK_ROOT)\usr\bin\swift_StringProcessing.pdb" Checksum="yes" DiskId="2" />
122+
</Component>
123+
<Component Id="swiftCore.pdb" Guid="57d56adc-dc40-4d6f-b0d7-11d472f11dbe">
66124
<File Id="swiftCore.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftCore.pdb" Checksum="yes" DiskId="2" />
125+
</Component>
126+
<Component Id="swiftDispatch.pdb" Guid="155ba810-d2a9-420e-890b-08dfb966daa6">
67127
<File Id="swiftDispatch.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftDispatch.pdb" Checksum="yes" DiskId="2" />
68-
<!-- <File Id="swiftDemangle.pdb" Source="$(var.SDK_ROOT)\bin\swiftDemangle.pdb" Checksum="yes" DiskId="2" /> -->
128+
</Component>
129+
<!--
130+
<Component Id="swiftDemangle.pdb" Guid="37b6f780-2d6b-45b9-8c54-dc253af0a644">
131+
<File Id="swiftDemangle.pdb" Source="$(var.SDK_ROOT)\bin\swiftDemangle.pdb" Checksum="yes" DiskId="2" />
132+
</Component>
133+
-->
134+
<Component Id="swiftCRT.pdb" Guid="42ce883f-3187-46d3-b5db-3efed0b34858">
69135
<File Id="swiftCRT.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftCRT.pdb" Checksum="yes" DiskId="2" />
136+
</Component>
137+
<Component Id="swiftRemoteMirror.pdb" Guid="b7c53b19-31f8-4f7e-bb72-226cdf46012a">
70138
<File Id="swiftRemoteMirror.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftRemoteMirror.pdb" Checksum="yes" DiskId="2" />
139+
</Component>
140+
<Component Id="swiftSwiftOnoneSupport.pdb" Guid="65fcbe1b-f4a6-437e-8e58-6d4504ee789e">
71141
<File Id="swiftSwiftOnoneSupport.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftSwiftOnoneSupport.pdb" Checksum="yes" DiskId="2" />
142+
</Component>
143+
<Component Id="swiftWinSDK.pdb" Guid="793e856f-5f54-48c8-af91-47262bf86b87">
72144
<File Id="swiftWinSDK.pdb" Source="$(var.SDK_ROOT)\usr\bin\swiftWinSDK.pdb" Checksum="yes" DiskId="2" />
73145
</Component>
146+
</ComponentGroup>
74147

75-
<Component Id="SwiftUtilitiesDebugInfo" Guid="b76da977-e914-46b7-98bc-7d8b033bf4ae">
148+
<ComponentGroup Id="SwiftUtilitiesDebugInfo">
149+
<Component Id="plutil.pdb" Guid="20169950-ef36-465e-a52c-cf071e1c0b44">
76150
<File Id="plutil.pdb" Source="$(var.SDK_ROOT)\usr\bin\plutil.pdb" Checksum="yes" DiskId="2" />
77151
</Component>
78-
<?endif ?>
79-
</DirectoryRef>
152+
</ComponentGroup>
153+
<?endif?>
80154

81155
<DirectoryRef Id="TARGETDIR">
82156
<Component Id="EnvironmentVariables" Guid="f249625e-aacd-4b17-a464-8f8df05ba5f3">
@@ -86,19 +160,19 @@
86160

87161
<!-- Feature -->
88162
<Feature Id="WinX64SwiftRuntime" Absent="disallow" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift Runtime for Windows x86_64" Level="1" Title="Swift Runtime for Windows x86_64">
89-
<ComponentRef Id="SwiftRuntime" />
163+
<ComponentGroupRef Id="SwiftRuntime" />
90164
<ComponentRef Id="EnvironmentVariables" />
91165

92166
<?ifdef INCLUDE_DEBUG_INFO ?>
93167
<Feature Id="DebugInfo" Absent="allow" AllowAdvertise="yes" Description="Debug Information for Swift Runtime for Windows x86_64" Level="0" Title="Debug Information">
94168
<Condition Level="1">INSTALL_DEBUGINFO</Condition>
95-
<ComponentRef Id="SwiftRuntimeDebugInfo" />
169+
<ComponentGroupRef Id="SwiftRuntimeDebugInfo" />
96170
</Feature>
97171
<?endif?>
98172
</Feature>
99173

100174
<Feature Id="WinX64SwiftUtilities" Absent="allow" AllowAdvertise="yes" Description="Extra Swift Utilities for Windows x86_64" Level="1" Title="Swift Utilities for Windows x86_64">
101-
<ComponentRef Id="SwiftUtilities" />
175+
<ComponentGroupRef Id="SwiftUtilities" />
102176

103177
<?ifdef INCLUDE_DEBUG_INFO ?>
104178
<Feature Id="DebugInfo" Absent="allow" AllowAdvertise="yes" Description="Debug Information for Swift Utilties for Windows x86_64" Level="0" Title="Debug Information">

0 commit comments

Comments
 (0)