This commit is contained in:
LotP1 2024-12-26 23:20:06 +01:00
parent d9f2b813a0
commit f976c3c362
2 changed files with 14 additions and 5 deletions

View file

@ -11,6 +11,8 @@ namespace Ryujinx.BuildValidationTasks
{
public static bool Execute(string projectPath)
{
Console.WriteLine("Running Locale Validation Task...");
string path = projectPath + "src/Ryujinx/Assets/locales.json";
string data;
@ -91,6 +93,8 @@ namespace Ryujinx.BuildValidationTasks
sw.Write(jsonString);
}
Console.WriteLine("Finished Locale Validation Task!");
return true;
}

View file

@ -19,16 +19,21 @@ namespace Ryujinx.BuildValidationTasks
else
throw new ArgumentException("Error: too many arguments!");
}
if (string.IsNullOrEmpty(args[0]))
string path = args[0];
if (string.IsNullOrEmpty(path))
throw new ArgumentException("Error: path is null or empty!");
if (!Path.Exists(args[0]))
throw new ArgumentException($"path {{{args[0]}}} does not exist!");
throw new ArgumentException($"path {{{path}}} does not exist!");
if (!Directory.GetDirectories(Path.GetFullPath(args[0])).Contains($"{Path.GetFullPath(args[0])}src"))
throw new ArgumentException($"path {{{args[0]}}} is not a valid ryujinx project!");
path = Path.GetFullPath(path);
LocalesValidationTask.Execute(Path.GetFullPath(args[0]));
if (!Directory.GetDirectories(path).Contains($"{path}src"))
throw new ArgumentException($"path {{{path}}} is not a valid ryujinx project!");
LocalesValidationTask.Execute(path);
}
}
}