From 695f9e277d8209c7a1703cc37ee53b630a43f5b9 Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Wed, 25 Dec 2024 22:13:54 +0100 Subject: [PATCH] v3 --- Directory.Packages.props | 1 + .../LocalesValidationTask.cs | 15 ++---- .../Ryujinx.BuildValidationTasks.csproj | 49 +++++++------------ 3 files changed, 21 insertions(+), 44 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 4057a019e..93ea99a3e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,6 +11,7 @@ + diff --git a/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs b/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs index d599ca7ef..62096cb18 100644 --- a/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs +++ b/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs @@ -11,20 +11,11 @@ namespace Ryujinx.BuildValidationTasks { public class LocalesValidationTask : Task { + public string Path { get; set; } + public override bool Execute() { - string path = System.Reflection.Assembly.GetExecutingAssembly().Location; - - if (path.Split(["src"], StringSplitOptions.None).Length == 1) - { - //i assume that we are in a build directory in the solution dir - path = new FileInfo(path).Directory!.Parent!.GetDirectories("src")[0].GetDirectories("Ryujinx")[0].GetDirectories("Assets")[0].GetFiles("locales.json")[0].FullName; - } - else - { - path = path.Split(["src"], StringSplitOptions.None)[0]; - path = new FileInfo(path).Directory!.GetDirectories("src")[0].GetDirectories("Ryujinx")[0].GetDirectories("Assets")[0].GetFiles("locales.json")[0].FullName; - } + string path = Path; string data; diff --git a/src/Ryujinx.BuildValidationTasks/Ryujinx.BuildValidationTasks.csproj b/src/Ryujinx.BuildValidationTasks/Ryujinx.BuildValidationTasks.csproj index a9ca04a60..e7182a4d1 100644 --- a/src/Ryujinx.BuildValidationTasks/Ryujinx.BuildValidationTasks.csproj +++ b/src/Ryujinx.BuildValidationTasks/Ryujinx.BuildValidationTasks.csproj @@ -1,15 +1,15 @@ - net9.0 true $(MSBuildThisFileDirectory)temp_assemblies/ - - + + + @@ -26,42 +26,27 @@ LocalesValidation - - LocalesValidationTask.dll - - - - - - - - - - - - + + + + + + + + + + + - + - + - \ No newline at end of file +