OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 using System; | 4 using System; |
5 using System.IO; | 5 using System.IO; |
6 using System.Resources; | 6 using System.Resources; |
7 using System.Reflection; | 7 using System.Reflection; |
8 using System.Text; | 8 using System.Text; |
9 using Microsoft.Build.Framework; | 9 using Microsoft.Build.Framework; |
10 using Microsoft.Build.CPPTasks; | 10 using Microsoft.Build.CPPTasks; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 [Required] | 42 [Required] |
43 public string ProjectName { get; set; } | 43 public string ProjectName { get; set; } |
44 | 44 |
45 [Required] | 45 [Required] |
46 public string ToolchainName { get; set; } | 46 public string ToolchainName { get; set; } |
47 | 47 |
48 [Required] | 48 [Required] |
49 public string CreateNMFPath { get; set; } | 49 public string CreateNMFPath { get; set; } |
50 | 50 |
51 [Required] | 51 [Required] |
52 public string PropertiesFile { get; set; } | |
53 | |
54 [Required] | |
55 public string ConfigurationType { get; set; } | 52 public string ConfigurationType { get; set; } |
56 | 53 |
57 public NaClLink() | 54 public NaClLink() |
58 : base(new ResourceManager("NaCl.Build.CPPTasks.Properties.Resources
", Assembly.GetExecutingAssembly())) | 55 : base(new ResourceManager("NaCl.Build.CPPTasks.Properties.Resources
", Assembly.GetExecutingAssembly())) |
59 { | 56 { |
60 this.EnvironmentVariables = new string[] { "CYGWIN=nodosfilewarning"
, "LC_CTYPE=C" }; | 57 this.EnvironmentVariables = new string[] { "CYGWIN=nodosfilewarning"
, "LC_CTYPE=C" }; |
61 } | 58 } |
62 | 59 |
63 protected override void LogEventsFromTextOutput(string singleLine, Messa
geImportance messageImportance) | 60 protected override void LogEventsFromTextOutput(string singleLine, Messa
geImportance messageImportance) |
64 { | 61 { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (ExecuteTool(translateTool, cmd, string.Empty) != 0) | 104 if (ExecuteTool(translateTool, cmd, string.Empty) != 0) |
108 { | 105 { |
109 return false; | 106 return false; |
110 } | 107 } |
111 | 108 |
112 return true; | 109 return true; |
113 } | 110 } |
114 | 111 |
115 public override bool Execute() | 112 public override bool Execute() |
116 { | 113 { |
117 xamlParser = new XamlParser(PropertiesFile); | |
118 if (!Setup()) | |
119 return false; | |
120 | |
121 if (!OutputCommandLine) | 114 if (!OutputCommandLine) |
122 Log.LogMessage("Linking: {0}", Path.GetFileName(OutputFile)); | 115 Log.LogMessage("Linking: {0}", Path.GetFileName(OutputFile)); |
123 | 116 |
124 if (!base.Execute()) | 117 if (!base.Execute()) |
125 return false; | 118 return false; |
126 | 119 |
127 if (!PostLink()) | 120 if (!SkippedExecution) |
128 return false; | 121 if (!PostLink()) |
| 122 return false; |
129 | 123 |
130 return true; | 124 return true; |
131 } | 125 } |
132 | 126 |
133 protected bool PostLink() | 127 protected bool PostLink() |
134 { | 128 { |
135 if (IsPNaCl()) | 129 if (IsPNaCl()) |
136 { | 130 { |
137 if (TranslateX64 && !Translate("64", "x86-64")) | 131 if (TranslateX64 && !Translate("64", "x86-64")) |
138 return false; | 132 return false; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 247 |
254 protected override string WriteTLogFilename | 248 protected override string WriteTLogFilename |
255 { | 249 { |
256 get | 250 get |
257 { | 251 { |
258 return BaseTool() + ".link.write.1.tlog"; | 252 return BaseTool() + ".link.write.1.tlog"; |
259 } | 253 } |
260 } | 254 } |
261 } | 255 } |
262 } | 256 } |
OLD | NEW |