Skip to content

Commit 17c52e6

Browse files
committed
Inline the MsiPackage items and heavily simplify the logic to just bundle the correct MSI into the SFX exe bundle.
1 parent 34f808c commit 17c52e6

File tree

3 files changed

+15
-64
lines changed

3 files changed

+15
-64
lines changed

src/Installers/Windows/SharedFrameworkBundle/Bundle.wxs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@
9494
<Variable Name="BundleNameFull" Value="$(var.BundleNameFull)"/>
9595

9696
<Chain>
97-
<PackageGroupRef Id="PG_SHAREDFX_REDIST_BUNDLE"/>
97+
<MsiPackage Id="SharedFxRedist" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstaller)"
98+
Name="$(var.SharedFxRedistInstaller)"
99+
Compressed="yes"
100+
Vital="yes">
101+
</MsiPackage>
98102
</Chain>
99103
</Bundle>
100104
</Wix>

src/Installers/Windows/SharedFrameworkBundle/SharedFramework.wxs

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
1111
<ProjectGuid>{D6C54D8B-043F-4877-B751-60E7390F9EC6}</ProjectGuid>
1212
<SchemaVersion>2.0</SchemaVersion>
13+
<DefineConstants>$(DefineConstants);InstallersOutputPath=$(InstallersOutputPath)</DefineConstants>
14+
<DefineConstants>$(DefineConstants);SharedFxRedistInstaller=$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-$(Platform).msi</DefineConstants>
1315
</PropertyGroup>
1416

1517
<ItemGroup>
@@ -29,44 +31,18 @@
2931

3032
<ItemGroup>
3133
<Compile Include="Bundle.wxs" />
32-
<Compile Include="SharedFramework.wxs" />
3334
<Compile Include="$(PkgMicrosoft_DotNet_Build_Tasks_Installers)\build\wix\bundle\upgradePolicies.wxs" />
3435
<Content Include="thm.xml" />
3536
</ItemGroup>
3637

37-
<Choose>
38-
<When Condition="'$(Platform)' == 'arm64'">
39-
<ItemGroup>
40-
<ProjectReference Include="..\SharedFramework\SharedFramework.wixproj" SetPlatform="Platform=arm64">
41-
<Name>SharedFramework</Name>
42-
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
43-
<Private>True</Private>
44-
<DoNotHarvest>True</DoNotHarvest>
45-
</ProjectReference>
46-
</ItemGroup>
47-
</When>
48-
<Otherwise>
49-
<ItemGroup>
50-
<ProjectReference Include="..\SharedFramework\SharedFramework.wixproj"
51-
SetPlatform="Platform=x86"
52-
Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'x86'">
53-
<Name>SharedFramework</Name>
54-
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
55-
<Private>True</Private>
56-
<DoNotHarvest>True</DoNotHarvest>
57-
</ProjectReference>
58-
<ProjectReference Include="..\SharedFramework\SharedFramework.wixproj"
59-
SetPlatform="Platform=x64"
60-
Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'x64'">
61-
<Name>SharedFramework</Name>
62-
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
63-
<Private>True</Private>
64-
<DoNotHarvest>True</DoNotHarvest>
65-
</ProjectReference>
66-
</ItemGroup>
67-
</Otherwise>
68-
</Choose>
69-
38+
<ItemGroup>
39+
<ProjectReference Include="..\SharedFramework\SharedFramework.wixproj" SetPlatform="Platform=$(Platform)">
40+
<Name>SharedFramework</Name>
41+
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
42+
<Private>True</Private>
43+
<DoNotHarvest>True</DoNotHarvest>
44+
</ProjectReference>
45+
</ItemGroup>
7046

7147
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
7248

0 commit comments

Comments
 (0)