please don't fail

This commit is contained in:
LotP1 2024-12-25 03:56:59 +01:00
parent 4275a778aa
commit f538cee2e8
6 changed files with 68 additions and 16 deletions

2
.gitignore vendored
View File

@ -20,7 +20,7 @@ AppDir/
publish_appimage/
# Validation project assemblies folder
/src/Ryujinx.BuildValidationTasks/temp_assemblies
/src/Ryujinx.BuildValidationTasks/temp_assemblies/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

View File

@ -10,12 +10,12 @@
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.0.10" />
<PackageVersion Include="Avalonia.Svg" Version="11.0.0.18" />
<PackageVersion Include="Avalonia.Svg.Skia" Version="11.0.0.18" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.12.6" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.12.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Projektanker.Icons.Avalonia" Version="9.4.0" />
<PackageVersion Include="Projektanker.Icons.Avalonia.FontAwesome" Version="9.4.0"/>
<PackageVersion Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="9.4.0"/>
<PackageVersion Include="Projektanker.Icons.Avalonia.FontAwesome" Version="9.4.0" />
<PackageVersion Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="9.4.0" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Concentus" Version="2.2.0" />
<PackageVersion Include="DiscordRichPresence" Version="1.2.1.24" />
@ -56,4 +56,4 @@
<PackageVersion Include="System.Management" Version="9.0.0" />
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.0.2-rc1-fb78016" />
</ItemGroup>
</Project>
</Project>

View File

@ -80,6 +80,7 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Kernel.Generators", "src\Ryujinx.Horizon.Kernel.Generators\Ryujinx.Horizon.Kernel.Generators.csproj", "{7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.HLE.Generators", "src\Ryujinx.HLE.Generators\Ryujinx.HLE.Generators.csproj", "{B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.Graphics.Metal", "src\Ryujinx.Graphics.Metal\Ryujinx.Graphics.Metal.csproj", "{C08931FA-1191-417A-864F-3882D93E683B}"
ProjectSection(ProjectDependencies) = postProject
{A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E} = {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}
@ -258,13 +259,12 @@ Global
{B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}.Release|Any CPU.Build.0 = Release|Any CPU
{4A89A234-4F19-497D-A576-DDE8CDFC5B22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A89A234-4F19-497D-A576-DDE8CDFC5B22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A89A234-4F19-497D-A576-DDE8CDFC5B22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C08931FA-1191-417A-864F-3882D93E683B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C08931FA-1191-417A-864F-3882D93E683B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C08931FA-1191-417A-864F-3882D93E683B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C08931FA-1191-417A-864F-3882D93E683B}.Release|Any CPU.Build.0 = Release|Any CPU
{4A89A234-4F19-497D-A576-DDE8CDFC5B22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A89A234-4F19-497D-A576-DDE8CDFC5B22}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -8,7 +8,7 @@ using Microsoft.Build.Framework;
namespace Ryujinx.BuildValidationTasks
{
public class LocaleValidationTask : Task
public class LocalesValidationTask : Task
{
public override bool Execute()
{
@ -32,8 +32,10 @@ namespace Ryujinx.BuildValidationTasks
data = sr.ReadToEnd();
}
LocalesJson json = JsonConvert.DeserializeObject<LocalesJson>(data);
for (int i = 0; i < json.Locales.Count; i++)
{
LocalesEntry locale = json.Locales[i];

View File

@ -3,17 +3,67 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<temp_assemblies>$(MSBuildThisFileDirectory)temp_assemblies/</temp_assemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.Build.Utilities.Core" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Build.Framework" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json" GeneratePathProperty="true" />
</ItemGroup>
<UsingTask TaskName="Ryujinx.BuildValidationTasks.LocaleValidationTask" TaskFactory="TaskHostFactory" AssemblyFile="$(OutDir)Ryujinx.BuildValidationTasks.dll" />
<Target Name="ValidationTask">
<Message Text="dir $(FrameworkDir)" Importance="high" />
<Target Name="LocalesJsonValidation" AfterTargets="AfterRebuild">
<LocaleValidationTask />
<Message Text="Running Validations..." Importance="high" />
<Message Text="Copying Assemblies..." Importance="high" />
<!--Copy extra assemblies to the temp_assemblies folder-->
<Copy SourceFiles="$(NuGetPackageRoot)newtonsoft.json/13.0.3/lib/netstandard2.0/Newtonsoft.Json.dll" DestinationFolder="$(MSBuildThisFileDirectory)temp_assemblies/" />
<!--Run Validation Targets Here-->
<CallTarget Targets="MasterLocalesValidationTask" />
<Message Text="Validations Succeeded!" Importance="high" />
</Target>
<!--__________________________________________________LocalesValidation Task__________________________________________________-->
<PropertyGroup>
<!--Name of Validation Task. <Name> refers to this name-->
<Name>LocalesValidation</Name>
<!--Dll should be "<Name>Task.dll"-->
<Dll>LocalesValidationTask.dll</Dll>
</PropertyGroup>
<!--Name should be "Build<Name>TaskDll"-->
<Target Name="BuildLocalesValidationTaskDll">
<Message Text="Building $(Name)Task..." Importance="high" />
<!--Remember to include References!-->
<Csc Sources="$(MSBuildThisFileDirectory)$(Name)Task*.cs"
AdditionalLibPaths="$(ProgramFiles)/dotnet/packs/Microsoft.NETCore.App.Ref/9.0.0/ref/net9.0/"
References="
System.dll;
System.Runtime.dll;
netstandard.dll;
System.Collections.dll;
System.Linq.dll;
$(PkgMicrosoft_Build_Framework)/ref/netstandard2.0/Microsoft.Build.Framework.dll;
$(PkgMicrosoft_Build_Utilities_Core)/ref/netstandard2.0/Microsoft.Build.Utilities.Core.dll;
$(PkgNewtonsoft_Json)/lib/netstandard2.0/Newtonsoft.Json.dll"
TargetType="Library" OutputAssembly="$(MSBuildThisFileDirectory)temp_assemblies/$(Dll)"/>
</Target>
<UsingTask TaskName="Ryujinx.BuildValidationTasks.$(Name)Task" TaskFactory="TaskHostFactory" AssemblyFile="temp_assemblies/$(Dll)"/>
<!--Name should be "Master<Name>Task"-->
<Target Name="MasterLocalesValidationTask" DependsOnTargets="Build$(Name)TaskDll">
<Message Text="Running $(Name)Task... " Importance="high" />
<!--Should call "Ryujinx.BuildValidationTasks.<Name>Task"-->
<Ryujinx.BuildValidationTasks.LocalesValidationTask />
<Message Text="$(Name)Task finished!" Importance="high" />
</Target>
</Project>

View File

@ -13,8 +13,8 @@
<DefaultItemExcludes>$(DefaultItemExcludes);._*</DefaultItemExcludes>
</PropertyGroup>
<Target Name="BuildValidationProj" BeforeTargets="BeforeRebuild">
<MSBuild Projects="..\Ryujinx.BuildValidationTasks\Ryujinx.BuildValidationTasks.csproj" Targets="Rebuild">
<Target Name="BuildValidationProj" BeforeTargets="BeforeBuild">
<MSBuild Projects="..\Ryujinx.BuildValidationTasks\Ryujinx.BuildValidationTasks.csproj" Targets="ValidationTask" >
</MSBuild>
</Target>