Skip to content

Commit b7541f2

Browse files
committed
WiX: package up the experimental runtime
Add MSMs and MSis for the new experimental runtime. This is needed to distribute the runtime portion of the experimental SDK.
1 parent 9c29bd2 commit b7541f2

14 files changed

+323
-1
lines changed

platforms/Windows/Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
WindowsRuntimeARM64=$(WindowsRuntimeARM64);
8585
WindowsRuntimeX64=$(WindowsRuntimeX64);
8686
WindowsRuntimeX86=$(WindowsRuntimeX86);
87+
WindowsExperimentalRuntimeARM64=$(WindowsExperimentalRuntimeARM64);
88+
WindowsExperimentalRuntimeX64=$(WindowsExperimentalRuntimeX64);
89+
WindowsExperimentalRuntimeX86=$(WindowsExperimentalRuntimeX86);
8790
</DefineConstants>
8891
</PropertyGroup>
8992

platforms/Windows/Directory.Build.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3-
<ItemGroup Condition="'$(MSBuildProjectName)' != 'shared' AND '$(MSBuildProjectName)' != 'rtllib' AND '$(MSBuildProjectName)' != 'rtlmsm'">
3+
<PropertyGroup>
4+
<RuntimePackages>;rtllib;rtlmsm;rtl.static.msm;rtl.shared.lib;rtl.shared.msm;</RuntimePackages>
5+
</PropertyGroup>
6+
7+
<ItemGroup Condition=" ! $([System.String]::Copy('$(RuntimePackages)').Contains($(MSBuildProjectName))) ">
48
<ProjectReference Include="$(MSBuildThisFileDirectory)shared\shared.wixproj" />
59
</ItemGroup>
610

platforms/Windows/SideBySideUpgradeStrategy.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<IdeAssertsUpgradeCode>{8DD91C86-D13D-490B-B06B-9522A9CF504C}</IdeAssertsUpgradeCode>
2727
<IdeNoAssertsUpgradeCode>{C5519168-CF7B-4127-98B7-D886D9789B42}</IdeNoAssertsUpgradeCode>
2828
<RtlUpgradeCode>{BEA8C6DC-F73E-445B-9486-2333D1CF2886}</RtlUpgradeCode>
29+
<ExperimentalRTLUpgradeCode>{F9BA01C7-0C7C-4898-90BD-9D6BB308F0B3}</ExperimentalRTLUpgradeCode>
2930
<AndroidPlatformUpgradeCode>{313B9C1F-D5B5-4FED-B7E0-138F1EE6B26A}</AndroidPlatformUpgradeCode>
3031
<WindowsPlatformUpgradeCode>{01AFF1CF-A025-41B6-BCBC-728D794353FD}</WindowsPlatformUpgradeCode>
3132
</PropertyGroup>
@@ -67,6 +68,7 @@
6768
IdeAssertsUpgradeCode=$(IdeAssertsUpgradeCode);
6869
IdeNoAssertsUpgradeCode=$(IdeNoAssertsUpgradeCode);
6970
RtlUpgradeCode=$(RtlUpgradeCode);
71+
ExperimentalRTLUpgradeCode=$(ExperimentalRTLUpgradeCode);
7072
AndroidPlatformUpgradeCode=$(AndroidPlatformUpgradeCode);
7173
WindowsPlatformUpgradeCode=$(WindowsPlatformUpgradeCode);
7274
</DefineConstants>

platforms/Windows/bundle/installer.wixproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
<ProjectReference Include="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" />
3535
</ItemGroup>
3636

37+
<ItemGroup>
38+
<ProjectReference Include="..\rtl\shared\msi\rtl.shared.msi.wixproj" Properties="ProductArchitecture=$(ProductArchitecture)" BindName="rtl.shared" />
39+
</ItemGroup>
40+
3741
<ItemGroup Condition=" $(Platforms.Contains('android')) ">
3842
<ProjectReference Include="..\platforms\android\android.wixproj" Properties="AndroidArchitectures=$(AndroidArchitectures)" BindName="platform.android" />
3943
</ItemGroup>

platforms/Windows/platforms/windows/windows.wixproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@
1919

2020
<ItemGroup Condition=" $(WindowsArchitectures.Contains('i686')) ">
2121
<ProjectReference Include="..\..\rtl\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.x86.msm" />
22+
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.shared.x86.msm" />
23+
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.static.x86.msm" />
2224
</ItemGroup>
2325

2426
<ItemGroup Condition=" $(WindowsArchitectures.Contains('x86_64')) ">
2527
<ProjectReference Include="..\..\rtl\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.amd64.msm" />
28+
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.shared.amd64.msm" />
29+
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.static.amd64.msm" />
2630
</ItemGroup>
2731

2832
<ItemGroup Condition=" $(WindowsArchitectures.Contains('aarch64')) ">
2933
<ProjectReference Include="..\..\rtl\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.arm64.msm" />
34+
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.shared.arm64.msm" />
35+
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.static.arm64.msm" />
3036
</ItemGroup>
3137

3238
<ItemGroup>

platforms/Windows/platforms/windows/windows.wxs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3874,16 +3874,34 @@
38743874
<Component Id="rtl.arm64.msm" Directory="RedistVersion" Condition="INSTALLARM64REDIST" DiskId="2">
38753875
<File Source="!(bindpath.rtl.arm64.msm)\rtl.arm64.msm" />
38763876
</Component>
3877+
<Component Id="rtl.shared.arm64.msm" Directory="RedistVersion" Condition="INSTALLARM64REDIST" DiskId="6">
3878+
<File Source="!(bindpath.rtl.shared.arm64.msm)\rtl.shared.arm64.msm" />
3879+
</Component>
3880+
<Component Id="rtl.static.arm64.msm" Directory="RedistVersion" Condition="INSTALLARM64REDIST" DiskId="6">
3881+
<File Source="!(bindpath.rtl.static.arm64.msm)\rtl.static.arm64.msm" />
3882+
</Component>
38773883
<?endif?>
38783884
<?if $(IncludeX64) = True?>
38793885
<Component Id="rtl.amd64.msm" Directory="RedistVersion" Condition="INSTALLAMD64REDIST" DiskId="3">
38803886
<File Source="!(bindpath.rtl.amd64.msm)\rtl.amd64.msm" />
38813887
</Component>
3888+
<Component Id="rtl.shared.amd64.msm" Directory="RedistVersion" Condition="INSTALLAMD64REDIST" DiskId="7">
3889+
<File Source="!(bindpath.rtl.shared.amd64.msm)\rtl.shared.amd64.msm" />
3890+
</Component>
3891+
<Component Id="rtl.static.amd64.msm" Directory="RedistVersion" Condition="INSTALLAMD64REDIST" DiskId="7">
3892+
<File Source="!(bindpath.rtl.static.amd64.msm)\rtl.static.amd64.msm" />
3893+
</Component>
38823894
<?endif?>
38833895
<?if $(IncludeX86) = True?>
38843896
<Component Id="rtl.x86.msm" Directory="RedistVersion" Condition="INSTALLX86REDIST" DiskId="4">
38853897
<File Source="!(bindpath.rtl.x86.msm)\rtl.x86.msm" />
38863898
</Component>
3899+
<Component Id="rtl.shared.x86.msm" Directory="RedistVersion" Condition="INSTALLX86REDIST" DiskId="8">
3900+
<File Source="!(bindpath.rtl.shared.x86.msm)\rtl.shared.x86.msm" />
3901+
</Component>
3902+
<Component Id="rtl.static.x86.msm" Directory="RedistVersion" Condition="INSTALLX86REDIST" DiskId="8">
3903+
<File Source="!(bindpath.rtl.static.x86.msm)\rtl.static.x86.msm" />
3904+
</Component>
38873905
<?endif?>
38883906

38893907
<ComponentGroup Id="EnvironmentVariables">
@@ -4164,6 +4182,10 @@
41644182
<ComponentGroupRef Id="libswiftDispatch.arm64" />
41654183

41664184
<ComponentGroupRef Id="ExperimentalRegistrar.arm64" />
4185+
4186+
<!-- Redistributable -->
4187+
<ComponentRef Id="rtl.shared.arm64.msm" />
4188+
<ComponentRef Id="rtl.static.arm64.msm" />
41674189
</Feature>
41684190
<?endif?>
41694191

@@ -4229,6 +4251,10 @@
42294251
<ComponentGroupRef Id="libswiftDispatch.x64" />
42304252

42314253
<ComponentGroupRef Id="ExperimentalRegistrar.x64" />
4254+
4255+
<!-- Redistributable -->
4256+
<ComponentRef Id="rtl.shared.amd64.msm" />
4257+
<ComponentRef Id="rtl.static.amd64.msm" />
42324258
</Feature>
42334259
<?endif?>
42344260

@@ -4294,6 +4320,10 @@
42944320
<ComponentGroupRef Id="libswiftDispatch.x86" />
42954321

42964322
<ComponentGroupRef Id="ExperimentalRegistrar.x86" />
4323+
4324+
<!-- Redistributable -->
4325+
<ComponentRef Id="rtl.shared.x86.msm" />
4326+
<ComponentRef Id="rtl.static.x86.msm" />
42974327
</Feature>
42984328
<?endif?>
42994329
</Package>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.5">
2+
<PropertyGroup>
3+
<OutputName>rtl.shared.$(ProductArchitecture)</OutputName>
4+
<OutputType>Library</OutputType>
5+
<BindFiles>true</BindFiles>
6+
</PropertyGroup>
7+
</Project>
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<Fragment>
3+
<?if $(sys.BUILDARCH) == x64 ?>
4+
<?define RuntimeDirectoryComponentGuidGenerationSeed = "E33B165B-8460-467D-ABCD-27EA8197A3CF" ?>
5+
<?define RuntimeRoot = $(WindowsExperimentalRuntimeX64)?>
6+
<?elseif $(sys.BUILDARCH) == arm64 ?>
7+
<?define RuntimeDirectoryComponentGuidGenerationSeed = "BFFDD8F7-CC47-40CB-AF0E-095273FF10FC" ?>
8+
<?define RuntimeRoot = $(WindowsExperimentalRuntimeARM64)?>
9+
<?elseif $(sys.BUILDARCH) == x86 ?>
10+
<?define RuntimeDirectoryComponentGuidGenerationSeed = "72064820-3795-4331-8CBD-FF1ABA7DAE7B" ?>
11+
<?define RuntimeRoot = $(WindowsExperimentalRuntimeX86)?>
12+
<?endif?>
13+
14+
<Directory Id="RUNTIMEDIR_$(ProductArchitecture)" ComponentGuidGenerationSeed="$(RuntimeDirectoryComponentGuidGenerationSeed)" />
15+
16+
<ComponentGroup Id="stdlib_$(ProductArchitecture)" Directory="RUNTIMEDIR_$(ProductArchitecture)">
17+
<Component>
18+
<File Source="$(RuntimeRoot)\usr\bin\swiftCore.dll" />
19+
</Component>
20+
<Component>
21+
<File Source="$(RuntimeRoot)\usr\bin\swiftCRT.dll" />
22+
</Component>
23+
<Component>
24+
<File Source="$(RuntimeRoot)\usr\bin\swiftDistributed.dll" />
25+
</Component>
26+
<Component>
27+
<File Source="$(RuntimeRoot)\usr\bin\swiftObservation.dll" />
28+
</Component>
29+
<Component>
30+
<File Source="$(RuntimeRoot)\usr\bin\swiftRegexBuilder.dll" />
31+
</Component>
32+
<Component>
33+
<File Source="$(RuntimeRoot)\usr\bin\swiftRemoteMirror.dll" />
34+
</Component>
35+
<Component>
36+
<File Source="$(RuntimeRoot)\usr\bin\swiftSwiftOnoneSupport.dll" />
37+
</Component>
38+
<Component>
39+
<File Source="$(RuntimeRoot)\usr\bin\swiftSynchronization.dll" />
40+
</Component>
41+
<Component>
42+
<File Source="$(RuntimeRoot)\usr\bin\swiftWinSDK.dll" />
43+
</Component>
44+
<Component>
45+
<File Source="$(RuntimeRoot)\usr\bin\swift_Builtin_float.dll" />
46+
</Component>
47+
<Component>
48+
<File Source="$(RuntimeRoot)\usr\bin\swift_Concurrency.dll" />
49+
</Component>
50+
<Component>
51+
<File Source="$(RuntimeRoot)\usr\bin\swift_Differentiation.dll" />
52+
</Component>
53+
<Component>
54+
<File Source="$(RuntimeRoot)\usr\bin\swift_RegexParser.dll" />
55+
</Component>
56+
<Component>
57+
<File Source="$(RuntimeRoot)\usr\bin\swift_StringProcessing.dll" />
58+
</Component>
59+
<Component>
60+
<File Source="$(RuntimeRoot)\usr\bin\swift_Volatile.dll" />
61+
</Component>
62+
63+
<!-- TODO(compnerd) should we distribute the undecoration library in the runtime?
64+
<Component Directory="_usr_bin" Id="swiftDemangle.dll">
65+
<File Id="swiftDemangle.dll" Source="$(RuntimeRoot)\bin\swiftDemangle.dll" />
66+
</Component>
67+
-->
68+
</ComponentGroup>
69+
70+
<ComponentGroup Id="BlocksRuntime_$(ProductArchitecture)" Directory="RUNTIMEDIR_$(ProductArchitecture)">
71+
<Component>
72+
<File Source="$(RuntimeRoot)\usr\bin\BlocksRuntime.dll" />
73+
</Component>
74+
</ComponentGroup>
75+
76+
<ComponentGroup Id="libdispatch_$(ProductArchitecture)" Directory="RUNTIMEDIR_$(ProductArchitecture)">
77+
<Component>
78+
<File Source="$(RuntimeRoot)\usr\bin\dispatch.dll" />
79+
</Component>
80+
<Component>
81+
<File Source="$(RuntimeRoot)\usr\bin\swiftDispatch.dll" />
82+
</Component>
83+
</ComponentGroup>
84+
85+
<ComponentGroup Id="Foundation_$(ProductArchitecture)" Directory="RUNTIMEDIR_$(ProductArchitecture)">
86+
<Component>
87+
<File Source="$(RuntimeRoot)\usr\bin\Foundation.dll" />
88+
</Component>
89+
<Component>
90+
<File Source="$(RuntimeRoot)\usr\bin\FoundationEssentials.dll" />
91+
</Component>
92+
<Component>
93+
<File Source="$(RuntimeRoot)\usr\bin\FoundationInternationalization.dll" />
94+
</Component>
95+
<Component>
96+
<File Source="$(RuntimeRoot)\usr\bin\FoundationNetworking.dll" />
97+
</Component>
98+
<Component>
99+
<File Source="$(RuntimeRoot)\usr\bin\FoundationXML.dll" />
100+
</Component>
101+
<Component>
102+
<File Source="$(RuntimeRoot)\usr\bin\_FoundationICU.dll" />
103+
</Component>
104+
</ComponentGroup>
105+
106+
<ComponentGroup Id="plutil_$(ProductArchitecture)" Directory="RUNTIMEDIR_$(ProductArchitecture)">
107+
<Component>
108+
<File Source="$(RuntimeRoot)\usr\bin\plutil.exe" />
109+
</Component>
110+
</ComponentGroup>
111+
112+
<ComponentGroup Id="swift_runtime_$(ProductArchitecture)">
113+
<ComponentGroupRef Id="stdlib_$(ProductArchitecture)" />
114+
<ComponentGroupRef Id="BlocksRuntime_$(ProductArchitecture)" />
115+
<ComponentGroupRef Id="libdispatch_$(ProductArchitecture)" />
116+
<ComponentGroupRef Id="Foundation_$(ProductArchitecture)" />
117+
</ComponentGroup>
118+
119+
<ComponentGroup Id="swift_runtime_utilities_$(ProductArchitecture)">
120+
<ComponentGroupRef Id="plutil_$(ProductArchitecture)" />
121+
</ComponentGroup>
122+
</Fragment>
123+
</Wix>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.5">
2+
<PropertyGroup>
3+
<OutputName>rtl.$(ProductArchitecture)</OutputName>
4+
<DefineConstants>
5+
$(DefineConstants);
6+
VCRedistDir=$(VCRedistDir);
7+
</DefineConstants>
8+
</PropertyGroup>
9+
10+
<ItemGroup Condition=" '$(ProductArchitecture)' == 'amd64' ">
11+
<ProjectReference Include="..\lib\rtl.shared.lib.wixproj" Properties="ProductArchitecture=amd64;Platform=x64" />
12+
</ItemGroup>
13+
14+
<ItemGroup Condition=" '$(ProductArchitecture)' == 'arm64' ">
15+
<ProjectReference Include="..\lib\rtl.shared.lib.wixproj" Properties="ProductArchitecture=arm64;Platform=arm64" />
16+
</ItemGroup>
17+
18+
<ItemGroup Condition=" '$(ProductArchitecture)' == 'x86' ">
19+
<ProjectReference Include="..\lib\rtl.shared.lib.wixproj" Properties="ProductArchitecture=x86;Platform=x86" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<PackageReference Include="WixToolset.Heat" Version="4.0.5" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<HarvestDirectory Include="$(VCRedistDir)">
28+
<ComponentGroupName>VCRuntime_$(ProductArchitecture)</ComponentGroupName>
29+
<DirectoryRefId>RUNTIMEDIR_$(ProductArchitecture)</DirectoryRefId>
30+
<PreprocessorVariable>var.VCRedistDir</PreprocessorVariable>
31+
<SuppressCom>true</SuppressCom>
32+
<SuppressRegistry>true</SuppressRegistry>
33+
<SuppressRootDirectory>true</SuppressRootDirectory>
34+
</HarvestDirectory>
35+
</ItemGroup>
36+
</Project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<Package
3+
Language="1033"
4+
Manufacturer="!(loc.ManufacturerName)"
5+
Name="!(loc.Rtl_ProductName_$(ProductArchitecture))"
6+
UpgradeCode="$(ExperimentalRTLUpgradeCode)"
7+
Version="$(NonSemVerProductVersion)"
8+
Scope="$(PackageScope)">
9+
10+
<Media Id="1" Cabinet="rtl.$(ProductArchitecture).cab" EmbedCab="$(ArePackageCabsEmbedded)" />
11+
12+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(ExperimentalRTLUpgradeCode)" />
13+
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
14+
15+
<!-- Point the RTL component group to the right directory. -->
16+
<DirectoryRef Id="runtimes_usr_bin" />
17+
<SetDirectory Id="RUNTIMEDIR_$(ProductArchitecture)" Value="[runtimes_usr_bin]" Sequence="first" />
18+
19+
<ComponentGroup Id="EnvironmentVariables" Directory="RUNTIMEDIR_$(ProductArchitecture)">
20+
<Component Id="UserPathVariable" Condition="NOT ALLUSERS=1" Guid="bc309c80-221e-48db-b989-07157ac8f286">
21+
<Environment Action="set" Name="Path" Part="last" Permanent="no" System="no" Value="[runtimes_usr_bin]" />
22+
</Component>
23+
</ComponentGroup>
24+
25+
<Feature Id="VCRuntime" AllowAbsent="no" Title="!(loc.VCRuntime_ProductName_$(ProductArchitecture))">
26+
<ComponentGroupRef Id="VCRuntime_$(ProductArchitecture)" />
27+
</Feature>
28+
29+
<Feature Id="SwiftRuntime" AllowAbsent="no" Title="!(loc.Rtl_ProductName_$(ProductArchitecture))">
30+
<ComponentGroupRef Id="swift_runtime_$(ProductArchitecture)" />
31+
<ComponentGroupRef Id="EnvironmentVariables" />
32+
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
33+
</Feature>
34+
35+
<Feature Id="SwiftRuntimeUtilities" AllowAbsent="yes" Title="!(loc.Utl_ProductName_$(ProductArchitecture))">
36+
<Level Condition="INSTALLUTILITIES = 0" Value="0" />
37+
<ComponentGroupRef Id="swift_runtime_utilities_$(ProductArchitecture)" />
38+
</Feature>
39+
</Package>
40+
</Wix>

0 commit comments

Comments
 (0)