Skip to content

Commit 96cec46

Browse files
committed
WiX: optionalise the LegacySDK
This adjusts the packaging to allow exclusion of the legacy SDK. This is a preparatory step towards removing the legacy SDK from the build and the packaging.
1 parent a4dbac8 commit 96cec46

File tree

5 files changed

+113
-16
lines changed

5 files changed

+113
-16
lines changed

platforms/Windows/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<PropertyGroup Condition=" '$(ProductArchitecture)' == 'x86' ">
2626
<Platform>x86</Platform>
2727
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(IncludeLegacySDK)' == '' ">
29+
<IncludeLegacySDK>true</IncludeLegacySDK>
30+
</PropertyGroup>
2831

2932
<PropertyGroup>
3033
<RootBuildFolder>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)build\))</RootBuildFolder>
@@ -87,6 +90,7 @@
8790
WindowsExperimentalRuntimeARM64=$(WindowsExperimentalRuntimeARM64);
8891
WindowsExperimentalRuntimeX64=$(WindowsExperimentalRuntimeX64);
8992
WindowsExperimentalRuntimeX86=$(WindowsExperimentalRuntimeX86);
93+
IncludeLegacySDK=$(IncludeLegacySDK);
9094
</DefineConstants>
9195
</PropertyGroup>
9296

platforms/Windows/bundle/installer.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<ProjectReference Include="..\ide\noasserts\ide.noasserts.wixproj" BindName="ide.noasserts" />
3131
</ItemGroup>
3232

33-
<ItemGroup>
33+
<ItemGroup Condition=" '$(IncludeLegacySDK)' == 'True' ">
3434
<ProjectReference Include="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" />
3535
</ItemGroup>
3636

platforms/Windows/bundle/installer.wxs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@
8484
-->
8585

8686
<Chain>
87-
<MsiPackage
88-
SourceFile="!(bindpath.rtl)\rtl.msi"
89-
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
90-
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
91-
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtilities]" />
92-
</MsiPackage>
93-
9487
<MsiPackage
9588
SourceFile="!(bindpath.bld.asserts)\bld.asserts.msi"
9689
InstallCondition="OptionsInstallAssertsToolchain = 1"
@@ -157,6 +150,22 @@
157150
</MsiPackage>
158151
<?endif?>
159152

153+
<?if $(IncludeLegacySDK) == True?>
154+
<MsiPackage
155+
SourceFile="!(bindpath.rtl)\rtl.msi"
156+
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
157+
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
158+
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtilities]" />
159+
</MsiPackage>
160+
<?else?>
161+
<MsiPackage
162+
SourceFile="!(bindpath.rtl.shared)\rtl.$(ProductArchitecture).msi"
163+
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
164+
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
165+
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtilities]" />
166+
</MsiPackage>
167+
<?endif?>
168+
160169
<?if $(IncludeAndroid) == True?>
161170
<MsiPackage
162171
SourceFile="!(bindpath.platform.android)\android.msi"

platforms/Windows/platforms/windows/windows.wixproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@
1818
</ItemGroup>
1919

2020
<ItemGroup Condition=" $(WindowsArchitectures.Contains('i686')) ">
21-
<ProjectReference Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.x86.msm" />
21+
<ProjectReference Condition=" '$(IncludeLegacySDK)' == 'True' " Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.x86.msm" />
2222
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.shared.x86.msm" />
2323
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=x86" BindName="rtl.static.x86.msm" />
2424
</ItemGroup>
2525

2626
<ItemGroup Condition=" $(WindowsArchitectures.Contains('x86_64')) ">
27-
<ProjectReference Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.amd64.msm" />
27+
<ProjectReference Condition=" '$(IncludeLegacySDK)' == 'True' " Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.amd64.msm" />
2828
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.shared.amd64.msm" />
2929
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=amd64" BindName="rtl.static.amd64.msm" />
3030
</ItemGroup>
3131

3232
<ItemGroup Condition=" $(WindowsArchitectures.Contains('aarch64')) ">
33-
<ProjectReference Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.arm64.msm" />
33+
<ProjectReference Condition=" '$(IncludeLegacySDK)' == 'True' " Include="..\..\rtl\legacy\msm\rtlmsm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.arm64.msm" />
3434
<ProjectReference Include="..\..\rtl\shared\msm\rtl.shared.msm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.shared.arm64.msm" />
3535
<ProjectReference Include="..\..\rtl\static\msm\rtl.static.msm.wixproj" Properties="Platform=x86;ProductArchitecture=arm64" BindName="rtl.static.arm64.msm" />
3636
</ItemGroup>
3737

38-
<ItemGroup>
38+
<ItemGroup Condition=" '$(IncludeLegacySDK)' == 'True' ">
3939
<HarvestDirectory Include="$(SwiftShimsPath)">
4040
<ComponentGroupName>SwiftShims</ComponentGroupName>
4141
<DirectoryRefId>WindowsSDK_usr_lib_swift_shims</DirectoryRefId>

0 commit comments

Comments
 (0)