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/Compiler.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/Compiler.cs')
-rw-r--r-- | src/WixToolset.Core/Compiler.cs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index ed7cb60e..d085e788 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
@@ -11,11 +11,11 @@ namespace WixToolset | |||
11 | using System.IO; | 11 | using System.IO; |
12 | using System.Text.RegularExpressions; | 12 | using System.Text.RegularExpressions; |
13 | using System.Xml.Linq; | 13 | using System.Xml.Linq; |
14 | using WixToolset.Core; | ||
15 | using WixToolset.Core.Native; | ||
14 | using WixToolset.Data; | 16 | using WixToolset.Data; |
15 | using WixToolset.Data.Rows; | 17 | using WixToolset.Data.Rows; |
16 | using WixToolset.Extensibility; | 18 | using WixToolset.Extensibility; |
17 | using WixToolset.Msi; | ||
18 | using WixToolset.Core.Native; | ||
19 | using Wix = WixToolset.Data.Serialize; | 19 | using Wix = WixToolset.Data.Serialize; |
20 | 20 | ||
21 | /// <summary> | 21 | /// <summary> |
@@ -158,10 +158,7 @@ namespace WixToolset | |||
158 | [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")] | 158 | [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")] |
159 | public Intermediate Compile(XDocument source) | 159 | public Intermediate Compile(XDocument source) |
160 | { | 160 | { |
161 | if (null == source) | 161 | if (null == source) throw new ArgumentNullException(nameof(source)); |
162 | { | ||
163 | throw new ArgumentNullException("source"); | ||
164 | } | ||
165 | 162 | ||
166 | bool encounteredError = false; | 163 | bool encounteredError = false; |
167 | 164 | ||
@@ -220,9 +217,7 @@ namespace WixToolset | |||
220 | { | 217 | { |
221 | if (field.Data is string) | 218 | if (field.Data is string) |
222 | { | 219 | { |
223 | bool isDefault = false; | 220 | field.Data = this.componentIdPlaceholdersResolver.ResolveVariables(row.SourceLineNumbers, (string)field.Data, false, false, out var defaultIgnored, out var delayedIgnored); |
224 | bool delayedResolve = false; | ||
225 | field.Data = this.componentIdPlaceholdersResolver.ResolveVariables(row.SourceLineNumbers, (string)field.Data, false, false, ref isDefault, ref delayedResolve); | ||
226 | } | 221 | } |
227 | } | 222 | } |
228 | } | 223 | } |
@@ -470,7 +465,8 @@ namespace WixToolset | |||
470 | case "Advertise": | 465 | case "Advertise": |
471 | appIdAdvertise = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 466 | appIdAdvertise = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
472 | break; | 467 | break; |
473 | case "Description": description = this.core.GetAttributeValue(sourceLineNumbers, attrib); | 468 | case "Description": |
469 | description = this.core.GetAttributeValue(sourceLineNumbers, attrib); | ||
474 | break; | 470 | break; |
475 | case "DllSurrogate": | 471 | case "DllSurrogate": |
476 | dllSurrogate = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); | 472 | dllSurrogate = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); |
@@ -9471,13 +9467,13 @@ namespace WixToolset | |||
9471 | targetProductName = this.core.GetAttributeValue(sourceLineNumbers, attrib); | 9467 | targetProductName = this.core.GetAttributeValue(sourceLineNumbers, attrib); |
9472 | break; | 9468 | break; |
9473 | case "ApiPatchingSymbolNoImagehlpFlag": | 9469 | case "ApiPatchingSymbolNoImagehlpFlag": |
9474 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchAPI.PatchInterop.PatchSymbolFlagsType.PATCH_SYMBOL_NO_IMAGEHLP : 0; | 9470 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchSymbolFlagsType.PATCH_SYMBOL_NO_IMAGEHLP : 0; |
9475 | break; | 9471 | break; |
9476 | case "ApiPatchingSymbolNoFailuresFlag": | 9472 | case "ApiPatchingSymbolNoFailuresFlag": |
9477 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchAPI.PatchInterop.PatchSymbolFlagsType.PATCH_SYMBOL_NO_FAILURES : 0; | 9473 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchSymbolFlagsType.PATCH_SYMBOL_NO_FAILURES : 0; |
9478 | break; | 9474 | break; |
9479 | case "ApiPatchingSymbolUndecoratedTooFlag": | 9475 | case "ApiPatchingSymbolUndecoratedTooFlag": |
9480 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchAPI.PatchInterop.PatchSymbolFlagsType.PATCH_SYMBOL_UNDECORATED_TOO : 0; | 9476 | apiPatchingSymbolFlags |= (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? (int)PatchSymbolFlagsType.PATCH_SYMBOL_UNDECORATED_TOO : 0; |
9481 | break; | 9477 | break; |
9482 | case "OptimizePatchSizeForLargeFiles": | 9478 | case "OptimizePatchSizeForLargeFiles": |
9483 | optimizePatchSizeForLargeFiles = (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)); | 9479 | optimizePatchSizeForLargeFiles = (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)); |
@@ -11802,7 +11798,7 @@ namespace WixToolset | |||
11802 | private void ParseProductElement(XElement node) | 11798 | private void ParseProductElement(XElement node) |
11803 | { | 11799 | { |
11804 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 11800 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
11805 | int codepage = 0; | 11801 | int codepage = 65001; |
11806 | string productCode = null; | 11802 | string productCode = null; |
11807 | string upgradeCode = null; | 11803 | string upgradeCode = null; |
11808 | string manufacturer = null; | 11804 | string manufacturer = null; |