diff options
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs | 5 | ||||
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs index 6ca1d89f..e874eed6 100644 --- a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs | |||
@@ -5,6 +5,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.ComponentModel; | 7 | using System.ComponentModel; |
8 | using System.Linq; | ||
8 | using WixToolset.Core.Native; | 9 | using WixToolset.Core.Native; |
9 | using WixToolset.Data; | 10 | using WixToolset.Data; |
10 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
@@ -37,6 +38,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
37 | { | 38 | { |
38 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, database, this.Context.DecompilePath, this.Context.DecompileType, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.IsAdminImage, false, skipSummaryInfo: false); | 39 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, database, this.Context.DecompilePath, this.Context.DecompileType, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.IsAdminImage, false, skipSummaryInfo: false); |
39 | var output = unbindCommand.Execute(); | 40 | var output = unbindCommand.Execute(); |
41 | var extractedFilePaths = new List<string>(unbindCommand.ExportedFiles); | ||
40 | 42 | ||
41 | var decompiler = new Decompiler(this.Messaging, this.Extensions, this.Context.BaseSourcePath, this.Context.SuppressCustomTables, this.Context.SuppressDroppingEmptyTables, this.Context.SuppressUI, this.Context.TreatProductAsModule); | 43 | var decompiler = new Decompiler(this.Messaging, this.Extensions, this.Context.BaseSourcePath, this.Context.SuppressCustomTables, this.Context.SuppressDroppingEmptyTables, this.Context.SuppressUI, this.Context.TreatProductAsModule); |
42 | result.Document = decompiler.Decompile(output); | 44 | result.Document = decompiler.Decompile(output); |
@@ -47,7 +49,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
47 | var extractCommand = new ExtractCabinetsCommand(output, database, this.Context.DecompilePath, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.TreatProductAsModule); | 49 | var extractCommand = new ExtractCabinetsCommand(output, database, this.Context.DecompilePath, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.TreatProductAsModule); |
48 | extractCommand.Execute(); | 50 | extractCommand.Execute(); |
49 | 51 | ||
50 | result.ExtractedFilePaths = extractCommand.ExtractedFiles; | 52 | extractedFilePaths.AddRange(extractCommand.ExtractedFiles); |
53 | result.ExtractedFilePaths = extractedFilePaths; | ||
51 | } | 54 | } |
52 | else | 55 | else |
53 | { | 56 | { |
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs index 3bbc29f1..86ecea38 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
7 | using System.Collections.Generic; | 7 | using System.Collections.Generic; |
8 | using System.Globalization; | 8 | using System.Globalization; |
9 | using System.IO; | 9 | using System.IO; |
10 | using System.Linq; | ||
10 | using System.Text.RegularExpressions; | 11 | using System.Text.RegularExpressions; |
11 | using WixToolset.Core.Native; | 12 | using WixToolset.Core.Native; |
12 | using WixToolset.Data; | 13 | using WixToolset.Data; |
@@ -17,6 +18,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
17 | 18 | ||
18 | internal class UnbindDatabaseCommand | 19 | internal class UnbindDatabaseCommand |
19 | { | 20 | { |
21 | private List<string> exportedFiles; | ||
22 | |||
20 | public UnbindDatabaseCommand(IMessaging messaging, Database database, string databasePath, OutputType outputType, string exportBasePath, string intermediateFolder, bool isAdminImage, bool suppressDemodularization, bool skipSummaryInfo) | 23 | public UnbindDatabaseCommand(IMessaging messaging, Database database, string databasePath, OutputType outputType, string exportBasePath, string intermediateFolder, bool isAdminImage, bool suppressDemodularization, bool skipSummaryInfo) |
21 | { | 24 | { |
22 | this.Messaging = messaging; | 25 | this.Messaging = messaging; |
@@ -52,10 +55,14 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
52 | 55 | ||
53 | public TableDefinitionCollection TableDefinitions { get; } | 56 | public TableDefinitionCollection TableDefinitions { get; } |
54 | 57 | ||
58 | public IEnumerable<string> ExportedFiles => this.exportedFiles; | ||
59 | |||
55 | private int SectionCount { get; set; } | 60 | private int SectionCount { get; set; } |
56 | 61 | ||
57 | public Output Execute() | 62 | public Output Execute() |
58 | { | 63 | { |
64 | this.exportedFiles = new List<string>(); | ||
65 | |||
59 | string modularizationGuid = null; | 66 | string modularizationGuid = null; |
60 | var output = new Output(new SourceLineNumber(this.DatabasePath)); | 67 | var output = new Output(new SourceLineNumber(this.DatabasePath)); |
61 | View validationView = null; | 68 | View validationView = null; |
@@ -343,6 +350,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
343 | fs.Write(buffer, 0, bytesRead); | 350 | fs.Write(buffer, 0, bytesRead); |
344 | } | 351 | } |
345 | } | 352 | } |
353 | |||
354 | this.exportedFiles.Add(sourceFile); | ||
346 | } | 355 | } |
347 | 356 | ||
348 | row[i] = sourceFile; | 357 | row[i] = sourceFile; |