diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-11-25 14:44:22 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-11-25 18:06:33 +1000 |
| commit | 6cef9ded3d5e246285abc993950ef9964072d9e2 (patch) | |
| tree | d68a3175dd0687e962d5572855989ab3f10285f2 /src | |
| parent | 229a74c78a403bdd9c065bac372438968a421833 (diff) | |
| download | wix-6cef9ded3d5e246285abc993950ef9964072d9e2.tar.gz wix-6cef9ded3d5e246285abc993950ef9964072d9e2.tar.bz2 wix-6cef9ded3d5e246285abc993950ef9964072d9e2.zip | |
Always use WiX table definitions when decompiling standard tables.
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | 17 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs index 038db0fa..557500e8 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | |||
| @@ -294,6 +294,13 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 294 | 294 | ||
| 295 | private TableDefinition GetTableDefinition(string tableName, View tableView, View validationView) | 295 | private TableDefinition GetTableDefinition(string tableName, View tableView, View validationView) |
| 296 | { | 296 | { |
| 297 | // Use our table definitions whenever possible since they will be used when compiling the source code anyway. | ||
| 298 | // This also allows us to take advantage of WiX concepts like localizable columns which current code assumes. | ||
| 299 | if (this.TableDefinitions.Contains(tableName)) | ||
| 300 | { | ||
| 301 | return this.TableDefinitions[tableName]; | ||
| 302 | } | ||
| 303 | |||
| 297 | ColumnDefinition[] columns; | 304 | ColumnDefinition[] columns; |
| 298 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), | 305 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), |
| 299 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) | 306 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) |
| @@ -431,15 +438,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 431 | } | 438 | } |
| 432 | } | 439 | } |
| 433 | 440 | ||
| 434 | var tableDefinition = new TableDefinition(tableName, columns, false); | 441 | return new TableDefinition(tableName, columns, false); |
| 435 | |||
| 436 | // use our table definitions if core properties are the same; this allows us to take advantage | ||
| 437 | // of wix concepts like localizable columns which current code assumes | ||
| 438 | if (this.TableDefinitions.Contains(tableName) && 0 == tableDefinition.CompareTo(this.TableDefinitions[tableName])) | ||
| 439 | { | ||
| 440 | tableDefinition = this.TableDefinitions[tableName]; | ||
| 441 | } | ||
| 442 | return tableDefinition; | ||
| 443 | } | 442 | } |
| 444 | 443 | ||
| 445 | /// <summary> | 444 | /// <summary> |
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs index c7c80f6e..c44393cf 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | |||
| @@ -94,7 +94,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | [Fact(Skip = "Test demonstrates failure")] | 97 | [Fact] |
| 98 | public void CanDecompileOldClassTableDefinition() | 98 | public void CanDecompileOldClassTableDefinition() |
| 99 | { | 99 | { |
| 100 | // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled. | 100 | // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled. |
