diff options
3 files changed, 56 insertions, 13 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs index 05f865fa..92ddad6f 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs | |||
| @@ -32,19 +32,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 32 | return this.TableDefinitions; | 32 | return this.TableDefinitions; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | private TableDefinition CreateCustomTable(WixCustomTableTuple row) | 35 | private TableDefinition CreateCustomTable(WixCustomTableTuple tuple) |
| 36 | { | 36 | { |
| 37 | var columnNames = row.ColumnNames.Split('\t'); | 37 | var columnNames = tuple.ColumnNames.Split('\t'); |
| 38 | var columnTypes = row.ColumnTypes.Split('\t'); | 38 | var columnTypes = tuple.ColumnTypes.Split('\t'); |
| 39 | var primaryKeys = row.PrimaryKeys.Split('\t'); | 39 | var primaryKeys = tuple.PrimaryKeys.Split('\t'); |
| 40 | var minValues = row.MinValues?.Split('\t'); | 40 | var minValues = tuple.MinValues?.Split('\t'); |
| 41 | var maxValues = row.MaxValues?.Split('\t'); | 41 | var maxValues = tuple.MaxValues?.Split('\t'); |
| 42 | var keyTables = row.KeyTables?.Split('\t'); | 42 | var keyTables = tuple.KeyTables?.Split('\t'); |
| 43 | var keyColumns = row.KeyColumns?.Split('\t'); | 43 | var keyColumns = tuple.KeyColumns?.Split('\t'); |
| 44 | var categories = row.Categories?.Split('\t'); | 44 | var categories = tuple.Categories?.Split('\t'); |
| 45 | var sets = row.Sets?.Split('\t'); | 45 | var sets = tuple.Sets?.Split('\t'); |
| 46 | var descriptions = row.Descriptions?.Split('\t'); | 46 | var descriptions = tuple.Descriptions?.Split('\t'); |
| 47 | var modularizations = row.Modularizations?.Split('\t'); | 47 | var modularizations = tuple.Modularizations?.Split('\t'); |
| 48 | 48 | ||
| 49 | var currentPrimaryKey = 0; | 49 | var currentPrimaryKey = 0; |
| 50 | 50 | ||
| @@ -206,7 +206,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 206 | columns.Add(columnDefinition); | 206 | columns.Add(columnDefinition); |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | var customTable = new TableDefinition(row.Id.Id, columns/*, unreal: bootstrapperApplicationData, bootstrapperApplicationData*/); | 209 | var customTable = new TableDefinition(tuple.Id.Id, columns, tuple.Unreal); |
| 210 | return customTable; | 210 | return customTable; |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 18380417..38ef2e2e 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -385,6 +385,36 @@ namespace WixToolsetTest.CoreIntegration | |||
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | [Fact] | 387 | [Fact] |
| 388 | public void UnrealCustomTableIsNotPresentInMsi() | ||
| 389 | { | ||
| 390 | var folder = TestData.Get(@"TestData"); | ||
| 391 | |||
| 392 | using (var fs = new DisposableFileSystem()) | ||
| 393 | { | ||
| 394 | var baseFolder = fs.GetFolder(); | ||
| 395 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 396 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 397 | |||
| 398 | var result = WixRunner.Execute(new[] | ||
| 399 | { | ||
| 400 | "build", | ||
| 401 | Path.Combine(folder, "CustomTable", "CustomTable.wxs"), | ||
| 402 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 403 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 404 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 405 | "-intermediateFolder", intermediateFolder, | ||
| 406 | "-o", msiPath | ||
| 407 | }); | ||
| 408 | |||
| 409 | result.AssertSuccess(); | ||
| 410 | |||
| 411 | Assert.True(File.Exists(msiPath)); | ||
| 412 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTable2" }); | ||
| 413 | Assert.Empty(results); | ||
| 414 | } | ||
| 415 | } | ||
| 416 | |||
| 417 | [Fact] | ||
| 388 | public void PopulatesDirectoryTableWithValidDefaultDir() | 418 | public void PopulatesDirectoryTableWithValidDefaultDir() |
| 389 | { | 419 | { |
| 390 | var folder = TestData.Get(@"TestData"); | 420 | var folder = TestData.Get(@"TestData"); |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs index 649b29b6..8eb4fbf9 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs | |||
| @@ -17,5 +17,18 @@ | |||
| 17 | <Data Column="Component_">test.txt</Data> | 17 | <Data Column="Component_">test.txt</Data> |
| 18 | </Row> | 18 | </Row> |
| 19 | </CustomTable> | 19 | </CustomTable> |
| 20 | |||
| 21 | <CustomTable Id="CustomTable2" Unreal="yes"> | ||
| 22 | <Column Id="ColumnA" Type="string" PrimaryKey="yes" /> | ||
| 23 | <Column Id="Component_" Type="string" Width="72" KeyTable="Component" KeyColumn="1" /> | ||
| 24 | <Row> | ||
| 25 | <Data Column="ColumnA">RowA</Data> | ||
| 26 | <Data Column="Component_">test.txt</Data> | ||
| 27 | </Row> | ||
| 28 | <Row> | ||
| 29 | <Data Column="ColumnA">RowB</Data> | ||
| 30 | <Data Column="Component_">test.txt</Data> | ||
| 31 | </Row> | ||
| 32 | </CustomTable> | ||
| 20 | </Fragment> | 33 | </Fragment> |
| 21 | </Wix> | 34 | </Wix> |
