Skip to content

Commit

Permalink
Use WixBA in an upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnson committed Mar 18, 2024
1 parent f104c01 commit 3b842ae
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<Project Sdk="WixToolset.Sdk">
<PropertyGroup>
<OutputType>Bundle</OutputType>
<BA>WixBAdnc_x64</BA>
<UpgradeCode>{62E3DFA4-6849-44F0-93A1-C8F60DBB76E3}</UpgradeCode>
<InstallerPlatform>x64</InstallerPlatform>
<Version>2.0.0.0</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageAv2\PackageAv2.wixproj" />
<ProjectReference Include="..\..\TestBA\TestBAWixlib_x64\testbawixlib_x64.wixproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.BootstrapperApplications.wixext" />
<PackageReference Include="WixToolset.NetFx.wixext" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<PackageGroup Id="BundlePackages">
<MsiPackage Id="PackageA" SourceFile="$(var.PackageAv2.TargetPath)" />
</PackageGroup>
</Fragment>
</Wix>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<Project Sdk="WixToolset.Sdk">
<PropertyGroup>
<OutputType>Bundle</OutputType>
<BA>WixBAdnc_x64</BA>
<UpgradeCode>{62E3DFA4-6849-44F0-93A1-C8F60DBB76E3}</UpgradeCode>
<InstallerPlatform>x64</InstallerPlatform>
<Version>3.0.0.0</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageAv3\PackageAv3.wixproj" />
<ProjectReference Include="..\..\TestBA\TestBAWixlib_x64\testbawixlib_x64.wixproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.BootstrapperApplications.wixext" />
<PackageReference Include="WixToolset.NetFx.wixext" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<PackageGroup Id="BundlePackages">
<MsiPackage Id="PackageA" SourceFile="$(var.PackageAv3.TargetPath)" />
</PackageGroup>
</Fragment>
</Wix>
19 changes: 17 additions & 2 deletions src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void Bundle64UpgradesBundle32()
bundleAv2x64.VerifyRegisteredAndInPackageCache();

bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache();

Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2x64InstallLogFilePath, @"Detected related package: \{[0-9A-Za-z\-]{36}\}, scope: PerMachine, version: 1.0.0.0, language: 1033 operation: MajorUpgrade"));
}

Expand All @@ -119,8 +119,23 @@ public void Bundle32UpgradesBundle64()

bundleAv2.Install();
bundleAv2.VerifyRegisteredAndInPackageCache();

bundleAv1x64.VerifyUnregisteredAndRemovedFromPackageCache();
}

[RuntimeFact]
public void DncBABundleUpgradesDncBABundle()
{
var bundleDv2 = this.CreateBundleInstaller("BundleD_x64_v2");
var bundleDv3 = this.CreateBundleInstaller("BundleD_x64_v3");

bundleDv2.Install();
bundleDv2.VerifyRegisteredAndInPackageCache();

bundleDv3.Install();
bundleDv3.VerifyRegisteredAndInPackageCache();

bundleDv2.VerifyUnregisteredAndRemovedFromPackageCache();
}
}
}

0 comments on commit 3b842ae

Please sign in to comment.