diff options
Diffstat (limited to 'src')
8 files changed, 55 insertions, 1 deletions
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs index 71e0d7de..d6cf1cfd 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs | |||
| @@ -379,7 +379,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 379 | 379 | ||
| 380 | private void CreateMsiFeatures(Database db) | 380 | private void CreateMsiFeatures(Database db) |
| 381 | { | 381 | { |
| 382 | if (db.TableExists("Feature")) | 382 | if (db.TableExists("Feature") && db.TableExists("FeatureComponents")) |
| 383 | { | 383 | { |
| 384 | using (var allFeaturesView = db.OpenExecuteView("SELECT * FROM `Feature`")) | 384 | using (var allFeaturesView = db.OpenExecuteView("SELECT * FROM `Feature`")) |
| 385 | using (var featureView = db.OpenView("SELECT `Component_` FROM `FeatureComponents` WHERE `Feature_` = ?")) | 385 | using (var featureView = db.OpenView("SELECT `Component_` FROM `FeatureComponents` WHERE `Feature_` = ?")) |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 5c51ecdb..5bcd1f49 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -811,5 +811,33 @@ namespace WixToolsetTest.CoreIntegration | |||
| 811 | Assert.False(true, "Expected exception not accepted."); | 811 | Assert.False(true, "Expected exception not accepted."); |
| 812 | } | 812 | } |
| 813 | } | 813 | } |
| 814 | |||
| 815 | [Fact] | ||
| 816 | public void CanBuildBundleWithMsiPackageWithoutComponents() | ||
| 817 | { | ||
| 818 | var folder = TestData.Get(@"TestData\BundleWithComponentlessPackage"); | ||
| 819 | |||
| 820 | using (var fs = new DisposableFileSystem()) | ||
| 821 | { | ||
| 822 | var baseFolder = fs.GetFolder(); | ||
| 823 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 824 | |||
| 825 | var result = WixRunner.Execute(new[] | ||
| 826 | { | ||
| 827 | "build", | ||
| 828 | Path.Combine(folder, "Bundle.wxs"), | ||
| 829 | "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), | ||
| 830 | "-bindpath", Path.Combine(folder, "data"), | ||
| 831 | "-intermediateFolder", intermediateFolder, | ||
| 832 | "-o", Path.Combine(baseFolder, @"bin\test.exe") | ||
| 833 | }); | ||
| 834 | |||
| 835 | result.AssertSuccess(); | ||
| 836 | |||
| 837 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.exe"))); | ||
| 838 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
| 839 | } | ||
| 840 | } | ||
| 841 | |||
| 814 | } | 842 | } |
| 815 | } | 843 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.en-us.wxl b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.en-us.wxl new file mode 100644 index 00000000..23cf236c --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.en-us.wxl | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This file contains the declaration of all the localizable strings. | ||
| 5 | --> | ||
| 6 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
| 7 | |||
| 8 | <String Id="BundleName" Value="~TestBundle" /> | ||
| 9 | <String Id="BundleInProgressName" Value="~InProgressTestBundle" /> | ||
| 10 | |||
| 11 | </WixLocalization> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.wxs new file mode 100644 index 00000000..01b9e716 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/Bundle.wxs | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Bundle Name="!(loc.BundleName)" InProgressName="!(loc.BundleInProgressName)" Version="!(bind.packageVersion.test.msi)" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <BootstrapperApplicationDll SourceFile="fakeba.dll" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | <Chain> | ||
| 7 | <MsiPackage SourceFile="test.msi"> | ||
| 8 | <MsiProperty Name="TEST" Value="1" /> | ||
| 9 | </MsiPackage> | ||
| 10 | </Chain> | ||
| 11 | </Bundle> | ||
| 12 | </Wix> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/Shared.dll b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/Shared.dll new file mode 100644 index 00000000..0e461ba8 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/Shared.dll | |||
| @@ -0,0 +1 @@ | |||
| This is Shared.dll. \ No newline at end of file | |||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/test.txt b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/test.txt new file mode 100644 index 00000000..8b986220 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/MsiPackage/test.txt | |||
| @@ -0,0 +1 @@ | |||
| This is test.txt \ No newline at end of file | |||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/fakeba.dll b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/fakeba.dll new file mode 100644 index 00000000..970efdf0 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/fakeba.dll | |||
| @@ -0,0 +1 @@ | |||
| This is a fakeba.dll \ No newline at end of file | |||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/test.msi b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/test.msi new file mode 100644 index 00000000..e773f104 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleWithComponentlessPackage/data/test.msi | |||
| Binary files differ | |||
