aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/CommandLine/CompileCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CompileCommand.cs')
-rw-r--r--src/WixToolset.Core/CommandLine/CompileCommand.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs
index ec1ce602..621571b1 100644
--- a/src/WixToolset.Core/CommandLine/CompileCommand.cs
+++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs
@@ -11,12 +11,13 @@ namespace WixToolset.Core.CommandLine
11 11
12 internal class CompileCommand : ICommandLineCommand 12 internal class CompileCommand : ICommandLineCommand
13 { 13 {
14 public CompileCommand(IServiceProvider serviceProvider, IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables) 14 public CompileCommand(IServiceProvider serviceProvider, IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables, Platform platform)
15 { 15 {
16 this.ServiceProvider = serviceProvider; 16 this.ServiceProvider = serviceProvider;
17 this.Messaging = serviceProvider.GetService<IMessaging>(); 17 this.Messaging = serviceProvider.GetService<IMessaging>();
18 this.SourceFiles = sources; 18 this.SourceFiles = sources;
19 this.PreprocessorVariables = preprocessorVariables; 19 this.PreprocessorVariables = preprocessorVariables;
20 this.Platform = platform;
20 } 21 }
21 22
22 private IServiceProvider ServiceProvider { get; } 23 private IServiceProvider ServiceProvider { get; }
@@ -27,6 +28,8 @@ namespace WixToolset.Core.CommandLine
27 28
28 private IDictionary<string, string> PreprocessorVariables { get; } 29 private IDictionary<string, string> PreprocessorVariables { get; }
29 30
31 private Platform Platform { get; }
32
30 public IEnumerable<string> IncludeSearchPaths { get; } 33 public IEnumerable<string> IncludeSearchPaths { get; }
31 34
32 public int Execute() 35 public int Execute()
@@ -56,7 +59,7 @@ namespace WixToolset.Core.CommandLine
56 59
57 var compiler = new Compiler(this.ServiceProvider); 60 var compiler = new Compiler(this.ServiceProvider);
58 compiler.OutputPath = sourceFile.OutputPath; 61 compiler.OutputPath = sourceFile.OutputPath;
59 compiler.Platform = Platform.X86; // TODO: set this correctly 62 compiler.Platform = this.Platform;
60 compiler.SourceDocument = document; 63 compiler.SourceDocument = document;
61 var intermediate = compiler.Execute(); 64 var intermediate = compiler.Execute();
62 65