diff options
Diffstat (limited to 'src/WixToolset.Core/Compiler.cs')
-rw-r--r-- | src/WixToolset.Core/Compiler.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 903aae61..4b1ef033 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
@@ -1,6 +1,6 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
2 | 2 | ||
3 | namespace WixToolset | 3 | namespace WixToolset.Core |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections; | 6 | using System.Collections; |
@@ -11,7 +11,6 @@ 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.Core.Native; |
16 | using WixToolset.Data; | 15 | using WixToolset.Data; |
17 | using WixToolset.Data.Tuples; | 16 | using WixToolset.Data.Tuples; |
@@ -22,7 +21,6 @@ namespace WixToolset | |||
22 | /// <summary> | 21 | /// <summary> |
23 | /// Compiler of the WiX toolset. | 22 | /// Compiler of the WiX toolset. |
24 | /// </summary> | 23 | /// </summary> |
25 | [SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")] | ||
26 | public sealed class Compiler | 24 | public sealed class Compiler |
27 | { | 25 | { |
28 | public const string UpgradeDetectedProperty = "WIX_UPGRADE_DETECTED"; | 26 | public const string UpgradeDetectedProperty = "WIX_UPGRADE_DETECTED"; |
@@ -40,7 +38,7 @@ namespace WixToolset | |||
40 | private const string BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER = "WixBundleOriginalSourceFolder"; | 38 | private const string BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER = "WixBundleOriginalSourceFolder"; |
41 | private const string BURN_BUNDLE_LAST_USED_SOURCE = "WixBundleLastUsedSource"; | 39 | private const string BURN_BUNDLE_LAST_USED_SOURCE = "WixBundleLastUsedSource"; |
42 | 40 | ||
43 | // if these are true you know you are building a module or product | 41 | // If these are true you know you are building a module or product |
44 | // but if they are false you cannot not be sure they will not end | 42 | // but if they are false you cannot not be sure they will not end |
45 | // up a product or module. Use these flags carefully. | 43 | // up a product or module. Use these flags carefully. |
46 | private bool compilingModule; | 44 | private bool compilingModule; |
@@ -123,16 +121,15 @@ namespace WixToolset | |||
123 | // Try to compile it. | 121 | // Try to compile it. |
124 | try | 122 | try |
125 | { | 123 | { |
126 | var creator = context.ServiceProvider.GetService<ITupleDefinitionCreator>(); | 124 | var parseHelper = context.ServiceProvider.GetService<IParseHelper>(); |
127 | 125 | ||
128 | this.Core = new CompilerCore(target, creator, extensionsByNamespace); | 126 | this.Core = new CompilerCore(target, parseHelper, extensionsByNamespace); |
129 | this.Core.CurrentPlatform = this.Context.Platform; | ||
130 | this.Core.ShowPedanticMessages = this.ShowPedanticMessages; | 127 | this.Core.ShowPedanticMessages = this.ShowPedanticMessages; |
131 | this.componentIdPlaceholdersResolver = new WixVariableResolver(); | 128 | this.componentIdPlaceholdersResolver = new WixVariableResolver(); |
132 | 129 | ||
133 | // parse the document | 130 | // parse the document |
134 | var source = context.Source; | 131 | var source = context.Source; |
135 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(source.Root); | 132 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(source.Root); |
136 | if ("Wix" == source.Root.Name.LocalName) | 133 | if ("Wix" == source.Root.Name.LocalName) |
137 | { | 134 | { |
138 | if (CompilerCore.WixNamespace == source.Root.Name.Namespace) | 135 | if (CompilerCore.WixNamespace == source.Root.Name.Namespace) |