diff options
Diffstat (limited to '')
3 files changed, 64 insertions, 1 deletions
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs index b8f449d6..be976a22 100644 --- a/src/wix/WixToolset.Core/Compiler_Bundle.cs +++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs | |||
| @@ -2329,7 +2329,7 @@ namespace WixToolset.Core | |||
| 2329 | rollbackPathVariable = String.Concat("WixBundleRollbackLog_", id.Id); | 2329 | rollbackPathVariable = String.Concat("WixBundleRollbackLog_", id.Id); |
| 2330 | } | 2330 | } |
| 2331 | 2331 | ||
| 2332 | if (packageType == WixBundlePackageType.Bundle) | 2332 | if (packageType == WixBundlePackageType.Bundle || packageType == WixBundlePackageType.Msi) |
| 2333 | { | 2333 | { |
| 2334 | if (permanent == YesNoType.Yes && visible == YesNoType.NotSet) | 2334 | if (permanent == YesNoType.Yes && visible == YesNoType.NotSet) |
| 2335 | { | 2335 | { |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiPackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiPackageFixture.cs new file mode 100644 index 00000000..ce963df6 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiPackageFixture.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.CoreIntegration | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using System.Linq; | ||
| 7 | using System.Xml; | ||
| 8 | using WixBuildTools.TestSupport; | ||
| 9 | using WixToolset.Core.TestPackage; | ||
| 10 | using Xunit; | ||
| 11 | |||
| 12 | public class MsiPackageFixture | ||
| 13 | { | ||
| 14 | [Fact] | ||
| 15 | public void CanDefaultPermanentMsiPackageToVisible() | ||
| 16 | { | ||
| 17 | var folder = TestData.Get(@"TestData"); | ||
| 18 | |||
| 19 | using (var fs = new DisposableFileSystem()) | ||
| 20 | { | ||
| 21 | var baseFolder = fs.GetFolder(); | ||
| 22 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 23 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
| 24 | var exePath = Path.Combine(binFolder, "test.exe"); | ||
| 25 | var baFolderPath = Path.Combine(baseFolder, "ba"); | ||
| 26 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
| 27 | |||
| 28 | var result = WixRunner.Execute(new[] | ||
| 29 | { | ||
| 30 | "build", | ||
| 31 | Path.Combine(folder, "MsiPackage", "VisibleWhenPermanent.wxs"), | ||
| 32 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 33 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 34 | "-bindpath", binFolder, | ||
| 35 | "-intermediateFolder", intermediateFolder, | ||
| 36 | "-o", exePath, | ||
| 37 | }); | ||
| 38 | |||
| 39 | result.AssertSuccess(); | ||
| 40 | |||
| 41 | var extractResult = BundleExtractor.ExtractBAContainer(null, exePath, baFolderPath, extractFolderPath); | ||
| 42 | extractResult.AssertSuccess(); | ||
| 43 | |||
| 44 | var msiProperties = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Chain/burn:MsiPackage/burn:MsiProperty") | ||
| 45 | .Cast<XmlElement>() | ||
| 46 | .Select(e => e.GetTestXml()) | ||
| 47 | .ToArray(); | ||
| 48 | WixAssert.CompareLineByLine(new[] | ||
| 49 | { | ||
| 50 | "<MsiProperty Id='MSIFASTINSTALL' Value='7' />" | ||
| 51 | }, msiProperties); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/MsiPackage/VisibleWhenPermanent.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/MsiPackage/VisibleWhenPermanent.wxs new file mode 100644 index 00000000..584a1bbd --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/MsiPackage/VisibleWhenPermanent.wxs | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <MsiPackage SourceFile="test.msi" Permanent="yes" /> | ||
| 6 | </PackageGroup> | ||
| 7 | </Fragment> | ||
| 8 | </Wix> | ||
