diff options
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Unbind')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | 10 | ||||
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs index 36172b5e..9a55dc77 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | |||
| @@ -11,16 +11,16 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 11 | using WixToolset.Core.WindowsInstaller.Msi; | 11 | using WixToolset.Core.WindowsInstaller.Msi; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.WindowsInstaller; | 13 | using WixToolset.Data.WindowsInstaller; |
| 14 | using WixToolset.Data.WindowsInstaller.Rows; | ||
| 15 | using WixToolset.Extensibility.Services; | 14 | using WixToolset.Extensibility.Services; |
| 16 | 15 | ||
| 17 | internal class UnbindDatabaseCommand | 16 | internal class UnbindDatabaseCommand |
| 18 | { | 17 | { |
| 19 | private List<string> exportedFiles; | 18 | private List<string> exportedFiles; |
| 20 | 19 | ||
| 21 | public UnbindDatabaseCommand(IMessaging messaging, Database database, string databasePath, OutputType outputType, string exportBasePath, string intermediateFolder, bool isAdminImage, bool suppressDemodularization, bool skipSummaryInfo) | 20 | public UnbindDatabaseCommand(IMessaging messaging, IBackendHelper backendHelper, Database database, string databasePath, OutputType outputType, string exportBasePath, string intermediateFolder, bool isAdminImage, bool suppressDemodularization, bool skipSummaryInfo) |
| 22 | { | 21 | { |
| 23 | this.Messaging = messaging; | 22 | this.Messaging = messaging; |
| 23 | this.BackendHelper = backendHelper; | ||
| 24 | this.Database = database; | 24 | this.Database = database; |
| 25 | this.DatabasePath = databasePath; | 25 | this.DatabasePath = databasePath; |
| 26 | this.OutputType = outputType; | 26 | this.OutputType = outputType; |
| @@ -35,6 +35,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 35 | 35 | ||
| 36 | public IMessaging Messaging { get; } | 36 | public IMessaging Messaging { get; } |
| 37 | 37 | ||
| 38 | public IBackendHelper BackendHelper { get; } | ||
| 39 | |||
| 38 | public Database Database { get; } | 40 | public Database Database { get; } |
| 39 | 41 | ||
| 40 | public string DatabasePath { get; } | 42 | public string DatabasePath { get; } |
| @@ -527,7 +529,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 527 | /// </summary> | 529 | /// </summary> |
| 528 | /// <param name="value">The Filename value.</param> | 530 | /// <param name="value">The Filename value.</param> |
| 529 | /// <returns>The source name of the directory in an admin image.</returns> | 531 | /// <returns>The source name of the directory in an admin image.</returns> |
| 530 | private static string GetAdminSourceName(string value) | 532 | private string GetAdminSourceName(string value) |
| 531 | { | 533 | { |
| 532 | string name = null; | 534 | string name = null; |
| 533 | string[] names; | 535 | string[] names; |
| @@ -535,7 +537,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 535 | string shortsourcename = null; | 537 | string shortsourcename = null; |
| 536 | string sourcename = null; | 538 | string sourcename = null; |
| 537 | 539 | ||
| 538 | names = Common.GetNames(value); | 540 | names = this.BackendHelper.SplitMsiFileName(value); |
| 539 | 541 | ||
| 540 | if (null != names[0] && "." != names[0]) | 542 | if (null != names[0] && "." != names[0]) |
| 541 | { | 543 | { |
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs index de2c5e37..bde29405 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs | |||
| @@ -17,9 +17,10 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 17 | 17 | ||
| 18 | internal class UnbindTransformCommand | 18 | internal class UnbindTransformCommand |
| 19 | { | 19 | { |
| 20 | public UnbindTransformCommand(IMessaging messaging, string transformFile, string exportBasePath, string intermediateFolder) | 20 | public UnbindTransformCommand(IMessaging messaging, IBackendHelper backendHelper, string transformFile, string exportBasePath, string intermediateFolder) |
| 21 | { | 21 | { |
| 22 | this.Messaging = messaging; | 22 | this.Messaging = messaging; |
| 23 | this.BackendHelper = backendHelper; | ||
| 23 | this.TransformFile = transformFile; | 24 | this.TransformFile = transformFile; |
| 24 | this.ExportBasePath = exportBasePath; | 25 | this.ExportBasePath = exportBasePath; |
| 25 | this.IntermediateFolder = intermediateFolder; | 26 | this.IntermediateFolder = intermediateFolder; |
| @@ -29,6 +30,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 29 | 30 | ||
| 30 | private IMessaging Messaging { get; } | 31 | private IMessaging Messaging { get; } |
| 31 | 32 | ||
| 33 | private IBackendHelper BackendHelper { get; } | ||
| 34 | |||
| 32 | private string TransformFile { get; } | 35 | private string TransformFile { get; } |
| 33 | 36 | ||
| 34 | private string ExportBasePath { get; } | 37 | private string ExportBasePath { get; } |
| @@ -87,7 +90,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 87 | msiDatabase.ApplyTransform(this.TransformFile, TransformErrorConditions.All | TransformErrorConditions.ViewTransform); | 90 | msiDatabase.ApplyTransform(this.TransformFile, TransformErrorConditions.All | TransformErrorConditions.ViewTransform); |
| 88 | 91 | ||
| 89 | // unbind the database | 92 | // unbind the database |
| 90 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, msiDatabase, msiDatabaseFile, OutputType.Product, this.ExportBasePath, this.IntermediateFolder, false, false, skipSummaryInfo: true); | 93 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, this.BackendHelper, msiDatabase, msiDatabaseFile, OutputType.Product, this.ExportBasePath, this.IntermediateFolder, false, false, skipSummaryInfo: true); |
| 91 | var transformViewOutput = unbindCommand.Execute(); | 94 | var transformViewOutput = unbindCommand.Execute(); |
| 92 | 95 | ||
| 93 | // index the added and possibly modified rows (added rows may also appears as modified rows) | 96 | // index the added and possibly modified rows (added rows may also appears as modified rows) |
| @@ -157,7 +160,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 157 | } | 160 | } |
| 158 | 161 | ||
| 159 | // unbind the database | 162 | // unbind the database |
| 160 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, msiDatabase, msiDatabaseFile, OutputType.Product, this.ExportBasePath, this.IntermediateFolder, false, false, skipSummaryInfo: true); | 163 | var unbindCommand = new UnbindDatabaseCommand(this.Messaging, this.BackendHelper, msiDatabase, msiDatabaseFile, OutputType.Product, this.ExportBasePath, this.IntermediateFolder, false, false, skipSummaryInfo: true); |
| 161 | var output = unbindCommand.Execute(); | 164 | var output = unbindCommand.Execute(); |
| 162 | 165 | ||
| 163 | // index all the rows to easily find modified rows | 166 | // index all the rows to easily find modified rows |
