mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
nasm buid task: remove dupplicate message, add error text to ErrorList
This commit is contained in:
parent
67cec81c4b
commit
c554bc4eba
1 changed files with 3 additions and 10 deletions
|
|
@ -1,11 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Microsoft.Build.Utilities;
|
|
||||||
using Microsoft.Build.Framework;
|
using Microsoft.Build.Framework;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace Cosmos.Build.MSBuild {
|
namespace Cosmos.Build.MSBuild {
|
||||||
public class NAsm : BaseToolTask {
|
public class NAsm : BaseToolTask {
|
||||||
|
|
@ -40,10 +35,10 @@ namespace Cosmos.Build.MSBuild {
|
||||||
File.Delete(OutputFile);
|
File.Delete(OutputFile);
|
||||||
}
|
}
|
||||||
if (!File.Exists(InputFile)) {
|
if (!File.Exists(InputFile)) {
|
||||||
Log.LogError("Input file does not exist!");
|
Log.LogError("Input file \"" + InputFile + "\" does not exist!");
|
||||||
return false;
|
return false;
|
||||||
} else if (!File.Exists(ExePath)) {
|
} else if (!File.Exists(ExePath)) {
|
||||||
Log.LogError("Exe file not found! (File = '" + ExePath + "')");
|
Log.LogError("Exe file not found! (File = \"" + ExePath + "\")");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,9 +63,7 @@ namespace Cosmos.Build.MSBuild {
|
||||||
if (split.Length > 3 && split[2].Contains("warning"))
|
if (split.Length > 3 && split[2].Contains("warning"))
|
||||||
typ = WriteType.Warning;
|
typ = WriteType.Warning;
|
||||||
uint lineNumber = uint.Parse(split[1]);
|
uint lineNumber = uint.Parse(split[1]);
|
||||||
errorMessage = file + " Line: " + lineNumber + " Code: " + GetLine(InputFile, lineNumber).Trim();
|
errorMessage = file + (split.Length == 4 ? split[3] : string.Empty) + " Line: " + lineNumber + " Code: " + GetLine(InputFile, lineNumber).Trim();
|
||||||
this.BuildEngine.LogMessageEvent(
|
|
||||||
new BuildMessageEventArgs(errorMessage, string.Empty, string.Empty, MessageImportance.High));
|
|
||||||
}
|
}
|
||||||
} catch (Exception) {
|
} catch (Exception) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue