diff options
author | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
commit | dbde9e7104b907bbbaea17e21247d8cafc8b3a4c (patch) | |
tree | 0f5fbbb6fe12c6b2e5e622a0e18ce4c5b4eb2b96 /src/WixToolset.Core/Decompiler.cs | |
parent | fbf986eb97f68396797a89fc7d40dec07b775440 (diff) | |
download | wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.gz wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.bz2 wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.zip |
Massive refactoring to introduce the concept of IBackend
Diffstat (limited to 'src/WixToolset.Core/Decompiler.cs')
-rw-r--r-- | src/WixToolset.Core/Decompiler.cs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/WixToolset.Core/Decompiler.cs b/src/WixToolset.Core/Decompiler.cs index 249b5788..e72b0104 100644 --- a/src/WixToolset.Core/Decompiler.cs +++ b/src/WixToolset.Core/Decompiler.cs | |||
@@ -3,7 +3,6 @@ | |||
3 | namespace WixToolset | 3 | namespace WixToolset |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.CodeDom.Compiler; | ||
7 | using System.Collections; | 6 | using System.Collections; |
8 | using System.Collections.Generic; | 7 | using System.Collections.Generic; |
9 | using System.Collections.Specialized; | 8 | using System.Collections.Specialized; |
@@ -15,9 +14,9 @@ namespace WixToolset | |||
15 | using WixToolset.Data; | 14 | using WixToolset.Data; |
16 | using WixToolset.Data.Rows; | 15 | using WixToolset.Data.Rows; |
17 | using WixToolset.Extensibility; | 16 | using WixToolset.Extensibility; |
18 | using WixToolset.Msi; | ||
19 | using WixToolset.Core.Native; | 17 | using WixToolset.Core.Native; |
20 | using Wix = WixToolset.Data.Serialize; | 18 | using Wix = WixToolset.Data.Serialize; |
19 | using WixToolset.Core; | ||
21 | 20 | ||
22 | /// <summary> | 21 | /// <summary> |
23 | /// Decompiles an msi database into WiX source. | 22 | /// Decompiles an msi database into WiX source. |
@@ -5201,7 +5200,7 @@ namespace WixToolset | |||
5201 | 5200 | ||
5202 | directory.Id = Convert.ToString(row[0]); | 5201 | directory.Id = Convert.ToString(row[0]); |
5203 | 5202 | ||
5204 | string[] names = Installer.GetNames(Convert.ToString(row[2])); | 5203 | string[] names = Common.GetNames(Convert.ToString(row[2])); |
5205 | 5204 | ||
5206 | if (String.Equals(directory.Id, "TARGETDIR", StringComparison.Ordinal) && !String.Equals(names[0], "SourceDir", StringComparison.Ordinal)) | 5205 | if (String.Equals(directory.Id, "TARGETDIR", StringComparison.Ordinal) && !String.Equals(names[0], "SourceDir", StringComparison.Ordinal)) |
5207 | { | 5206 | { |
@@ -5319,7 +5318,7 @@ namespace WixToolset | |||
5319 | 5318 | ||
5320 | if (null != row[3]) | 5319 | if (null != row[3]) |
5321 | { | 5320 | { |
5322 | string[] names = Installer.GetNames(Convert.ToString(row[3])); | 5321 | string[] names = Common.GetNames(Convert.ToString(row[3])); |
5323 | if (null != names[0] && null != names[1]) | 5322 | if (null != names[0] && null != names[1]) |
5324 | { | 5323 | { |
5325 | copyFile.DestinationShortName = names[0]; | 5324 | copyFile.DestinationShortName = names[0]; |
@@ -5788,7 +5787,7 @@ namespace WixToolset | |||
5788 | 5787 | ||
5789 | file.Id = fileRow.File; | 5788 | file.Id = fileRow.File; |
5790 | 5789 | ||
5791 | string[] names = Installer.GetNames(fileRow.FileName); | 5790 | string[] names = Common.GetNames(fileRow.FileName); |
5792 | if (null != names[0] && null != names[1]) | 5791 | if (null != names[0] && null != names[1]) |
5793 | { | 5792 | { |
5794 | file.ShortName = names[0]; | 5793 | file.ShortName = names[0]; |
@@ -5974,7 +5973,7 @@ namespace WixToolset | |||
5974 | 5973 | ||
5975 | iniFile.Id = Convert.ToString(row[0]); | 5974 | iniFile.Id = Convert.ToString(row[0]); |
5976 | 5975 | ||
5977 | string[] names = Installer.GetNames(Convert.ToString(row[1])); | 5976 | string[] names = Common.GetNames(Convert.ToString(row[1])); |
5978 | 5977 | ||
5979 | if (null != names[0]) | 5978 | if (null != names[0]) |
5980 | { | 5979 | { |
@@ -6044,7 +6043,7 @@ namespace WixToolset | |||
6044 | 6043 | ||
6045 | iniFileSearch.Id = Convert.ToString(row[0]); | 6044 | iniFileSearch.Id = Convert.ToString(row[0]); |
6046 | 6045 | ||
6047 | string[] names = Installer.GetNames(Convert.ToString(row[1])); | 6046 | string[] names = Common.GetNames(Convert.ToString(row[1])); |
6048 | if (null != names[0] && null != names[1]) | 6047 | if (null != names[0] && null != names[1]) |
6049 | { | 6048 | { |
6050 | iniFileSearch.ShortName = names[0]; | 6049 | iniFileSearch.ShortName = names[0]; |
@@ -6681,7 +6680,7 @@ namespace WixToolset | |||
6681 | 6680 | ||
6682 | if (null != row[3]) | 6681 | if (null != row[3]) |
6683 | { | 6682 | { |
6684 | string[] names = Installer.GetNames(Convert.ToString(row[3])); | 6683 | string[] names = Common.GetNames(Convert.ToString(row[3])); |
6685 | if (null != names[0] && null != names[1]) | 6684 | if (null != names[0] && null != names[1]) |
6686 | { | 6685 | { |
6687 | copyFile.DestinationShortName = names[0]; | 6686 | copyFile.DestinationShortName = names[0]; |
@@ -8007,7 +8006,7 @@ namespace WixToolset | |||
8007 | 8006 | ||
8008 | removeFile.Id = Convert.ToString(row[0]); | 8007 | removeFile.Id = Convert.ToString(row[0]); |
8009 | 8008 | ||
8010 | string[] names = Installer.GetNames(Convert.ToString(row[2])); | 8009 | string[] names = Common.GetNames(Convert.ToString(row[2])); |
8011 | if (null != names[0] && null != names[1]) | 8010 | if (null != names[0] && null != names[1]) |
8012 | { | 8011 | { |
8013 | removeFile.ShortName = names[0]; | 8012 | removeFile.ShortName = names[0]; |
@@ -8062,7 +8061,7 @@ namespace WixToolset | |||
8062 | 8061 | ||
8063 | iniFile.Id = Convert.ToString(row[0]); | 8062 | iniFile.Id = Convert.ToString(row[0]); |
8064 | 8063 | ||
8065 | string[] names = Installer.GetNames(Convert.ToString(row[1])); | 8064 | string[] names = Common.GetNames(Convert.ToString(row[1])); |
8066 | if (null != names[0] && null != names[1]) | 8065 | if (null != names[0] && null != names[1]) |
8067 | { | 8066 | { |
8068 | iniFile.ShortName = names[0]; | 8067 | iniFile.ShortName = names[0]; |
@@ -8531,7 +8530,7 @@ namespace WixToolset | |||
8531 | 8530 | ||
8532 | shortcut.Directory = Convert.ToString(row[1]); | 8531 | shortcut.Directory = Convert.ToString(row[1]); |
8533 | 8532 | ||
8534 | string[] names = Installer.GetNames(Convert.ToString(row[2])); | 8533 | string[] names = Common.GetNames(Convert.ToString(row[2])); |
8535 | if (null != names[0] && null != names[1]) | 8534 | if (null != names[0] && null != names[1]) |
8536 | { | 8535 | { |
8537 | shortcut.ShortName = names[0]; | 8536 | shortcut.ShortName = names[0]; |
@@ -8654,7 +8653,7 @@ namespace WixToolset | |||
8654 | 8653 | ||
8655 | fileSearch.Id = Convert.ToString(row[0]); | 8654 | fileSearch.Id = Convert.ToString(row[0]); |
8656 | 8655 | ||
8657 | string[] names = Installer.GetNames(Convert.ToString(row[1])); | 8656 | string[] names = Common.GetNames(Convert.ToString(row[1])); |
8658 | if (null != names[0]) | 8657 | if (null != names[0]) |
8659 | { | 8658 | { |
8660 | // it is permissable to just have a long name | 8659 | // it is permissable to just have a long name |