diff options
Diffstat (limited to 'src/WixToolset.Core/CommandLine/BuildCommand.cs')
-rw-r--r-- | src/WixToolset.Core/CommandLine/BuildCommand.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 54bf688d..79bacd22 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs | |||
@@ -40,6 +40,8 @@ namespace WixToolset.Core | |||
40 | 40 | ||
41 | public IExtensionManager ExtensionManager { get; } | 41 | public IExtensionManager ExtensionManager { get; } |
42 | 42 | ||
43 | public IEnumerable<string> IncludeSearchPaths { get; } | ||
44 | |||
43 | public IEnumerable<string> LocFiles { get; } | 45 | public IEnumerable<string> LocFiles { get; } |
44 | 46 | ||
45 | public IEnumerable<string> LibraryFiles { get; } | 47 | public IEnumerable<string> LibraryFiles { get; } |
@@ -102,15 +104,18 @@ namespace WixToolset.Core | |||
102 | { | 104 | { |
103 | var intermediates = new List<Intermediate>(); | 105 | var intermediates = new List<Intermediate>(); |
104 | 106 | ||
105 | |||
106 | foreach (var sourceFile in this.SourceFiles) | 107 | foreach (var sourceFile in this.SourceFiles) |
107 | { | 108 | { |
108 | //var preprocessContext = this.ServiceProvider.GetService<IPreprocessContext>(); | 109 | var preprocessContext = this.ServiceProvider.GetService<IPreprocessContext>(); |
109 | //preprocessContext.SourcePath = sourceFile.SourcePath; | 110 | preprocessContext.Messaging = Messaging.Instance; |
110 | //preprocessContext.Variables = this.PreprocessorVariables; | 111 | preprocessContext.Extensions = this.ExtensionManager.Create<IPreprocessorExtension>(); |
112 | preprocessContext.Platform = Platform.X86; // TODO: set this correctly | ||
113 | preprocessContext.IncludeSearchPaths = this.IncludeSearchPaths?.ToList() ?? new List<string>(); | ||
114 | preprocessContext.SourceFile = sourceFile.SourcePath; | ||
115 | preprocessContext.Variables = new Dictionary<string, string>(this.PreprocessorVariables); | ||
111 | 116 | ||
112 | var preprocessor = new Preprocessor(); | 117 | var preprocessor = new Preprocessor(); |
113 | var document = preprocessor.Process(sourceFile.SourcePath, this.PreprocessorVariables); | 118 | var document = preprocessor.Process(preprocessContext); |
114 | 119 | ||
115 | var compileContext = this.ServiceProvider.GetService<ICompileContext>(); | 120 | var compileContext = this.ServiceProvider.GetService<ICompileContext>(); |
116 | compileContext.Messaging = Messaging.Instance; | 121 | compileContext.Messaging = Messaging.Instance; |