From 64368ec91402844ab5e83e8ad3134b8e5207ae54 Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Mon, 22 Jul 2024 08:37:58 +0000 Subject: [PATCH] remove rd.xml generation --- Ryujinx.sln | 6 ++++++ .../IpcServiceGenerator.cs | 21 ++----------------- .../ServiceSyntaxReceiver.cs | 6 +----- src/Ryujinx.HLE/Ryujinx.HLE.csproj | 6 ++---- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/Ryujinx.sln b/Ryujinx.sln index b8304164d5..76ebd573f3 100644 --- a/Ryujinx.sln +++ b/Ryujinx.sln @@ -87,6 +87,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon", "src\Ryuj 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 Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -249,6 +251,10 @@ Global {7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU {7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}.Release|Any CPU.Build.0 = Release|Any CPU + {B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Ryujinx.HLE.Generators/IpcServiceGenerator.cs b/src/Ryujinx.HLE.Generators/IpcServiceGenerator.cs index bfeb972fcd..9e9c5e929e 100644 --- a/src/Ryujinx.HLE.Generators/IpcServiceGenerator.cs +++ b/src/Ryujinx.HLE.Generators/IpcServiceGenerator.cs @@ -1,4 +1,4 @@ -using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using System.Linq; @@ -12,24 +12,6 @@ namespace Ryujinx.HLE.Generators { var syntaxReceiver = (ServiceSyntaxReceiver)context.SyntaxReceiver; CodeGenerator generator = new CodeGenerator(); - - generator.EnterScope($"namespace Ryujinx.rd"); - generator.EnterScope($"public class Rd"); - - generator.AppendLine($"public string rd = \"\"\""); - foreach (var className in syntaxReceiver.Types) - { - if (className.Modifiers.Any(SyntaxKind.AbstractKeyword) || className.Modifiers.Any(SyntaxKind.PrivateKeyword)) - continue; - - var name = GetFullName(className, context).Replace("global::", ""); - generator.AppendLine($""); - } - generator.AppendLine($"\"\"\";"); - - generator.LeaveScope(); - generator.LeaveScope(); - context.AddSource($"rd.g.cs", generator.ToString()); generator = new CodeGenerator(); generator.AppendLine("using System;"); @@ -86,6 +68,7 @@ namespace Ryujinx.HLE.Generators return typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); } + public void Initialize(GeneratorInitializationContext context) { context.RegisterForSyntaxNotifications(() => new ServiceSyntaxReceiver()); diff --git a/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs b/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs index 6fc1c71993..d01299cecc 100644 --- a/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs +++ b/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs @@ -1,10 +1,6 @@ -using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.CSharp; -using System; using System.Collections.Generic; -using System.Text; -using System.Linq; namespace Ryujinx.HLE.Generators { diff --git a/src/Ryujinx.HLE/Ryujinx.HLE.csproj b/src/Ryujinx.HLE/Ryujinx.HLE.csproj index f530ac6248..ef9fb4dbae 100644 --- a/src/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/src/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -11,9 +11,7 @@ - +