forked from mirror/DotRecast
remove converter project
This commit is contained in:
parent
25ad6eeff0
commit
474ca92c1c
|
@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.Demo", "sr
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{65754308-3C9B-4544-9D7B-F2C16A4E2486}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertVector", "tools\ConvertVector\ConvertVector.csproj", "{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.DemoTool", "src\DotRecast.Recast.DemoTool\DotRecast.Recast.DemoTool.csproj", "{DF987948-8C23-4337-AF83-D87D6407518D}"
|
||||
EndProject
|
||||
Global
|
||||
|
@ -106,10 +104,6 @@ Global
|
|||
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DF987948-8C23-4337-AF83-D87D6407518D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DF987948-8C23-4337-AF83-D87D6407518D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DF987948-8C23-4337-AF83-D87D6407518D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -130,7 +124,6 @@ Global
|
|||
{DEB16B90-CCD4-497E-A2E9-4CC66FD7EF47} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
|
||||
{3CAA7306-088E-4373-A406-99755CC2B605} = {A7CB8D8B-70DA-4567-8316-0659FCAE1C73}
|
||||
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
|
||||
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD} = {65754308-3C9B-4544-9D7B-F2C16A4E2486}
|
||||
{DF987948-8C23-4337-AF83-D87D6407518D} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -1,95 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class FileLocation
|
||||
{
|
||||
public required string Path { get; init; }
|
||||
public required int Line { get; init; }
|
||||
public required int Column { get; init; }
|
||||
public required string Letter { get; init; }
|
||||
};
|
||||
|
||||
|
||||
public static class Program
|
||||
{
|
||||
private static List<FileLocation> CreateLocations(string path)
|
||||
{
|
||||
List<string> list = File.ReadAllLines(path)
|
||||
.Where(line => line.Contains("error CS1061: "))
|
||||
.ToList();
|
||||
|
||||
List<FileLocation> locations = new List<FileLocation>();
|
||||
foreach (string input in list)
|
||||
{
|
||||
string pattern = "([A-Za-z]:\\\\[^\\\\]+\\\\[^\\\\]+(?:\\\\[^\\\\]+)*\\\\[^\\\\]+\\.cs)\\((\\d+),(\\d+)\\)";
|
||||
Match match = Regex.Match(input, pattern);
|
||||
if (match.Success)
|
||||
{
|
||||
string str1 = match.Groups[1].Value;
|
||||
string s1 = match.Groups[2].Value;
|
||||
string s2 = match.Groups[3].Value;
|
||||
string str2 = "";
|
||||
if (input.Contains("'x'에 대한"))
|
||||
str2 = "x";
|
||||
if (input.Contains("'y'에 대한"))
|
||||
str2 = "y";
|
||||
if (input.Contains("'z'에 대한"))
|
||||
str2 = "z";
|
||||
FileLocation fileLocation = new FileLocation()
|
||||
{
|
||||
Path = str1,
|
||||
Line = int.Parse(s1),
|
||||
Column = int.Parse(s2),
|
||||
Letter = str2
|
||||
};
|
||||
locations.Add(fileLocation);
|
||||
}
|
||||
}
|
||||
|
||||
return locations;
|
||||
}
|
||||
|
||||
private static void Change(FileLocation location)
|
||||
{
|
||||
string[] contents = File.ReadAllLines(location.Path);
|
||||
var line = contents[location.Line - 1];
|
||||
List<string> list = line.ToCharArray()
|
||||
.Select((x => x.ToString() ?? ""))
|
||||
.ToList();
|
||||
|
||||
// 다르면 하지 말것
|
||||
if ("." != list[location.Column - 2] || location.Letter != list[location.Column - 1])
|
||||
return;
|
||||
|
||||
list[location.Column - 2] = "[";
|
||||
if (location.Letter == "x")
|
||||
list[location.Column - 1] = "0]";
|
||||
else if (location.Letter == "y")
|
||||
list[location.Column - 1] = "1]";
|
||||
else if (location.Letter == "z")
|
||||
list[location.Column - 1] = "2]";
|
||||
string str = string.Join("", (IEnumerable<string>)list);
|
||||
contents[location.Line - 1] = str;
|
||||
|
||||
File.WriteAllLines(location.Path, contents);
|
||||
}
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var locations = CreateLocations("../../../../../error.log");
|
||||
var distinctLocations = locations.DistinctBy(x => x.Path + x.Line).ToList();
|
||||
if (0 >= distinctLocations.Count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (FileLocation location in distinctLocations)
|
||||
{
|
||||
Change(location);
|
||||
Console.WriteLine($"{location.Path}({location.Line}:{location.Column})");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue