mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
C#/netcore: Add base desktop game export implementation
This base implementation is still very barebones but it defines the path for how exporting will work (at least when embedding the .NET runtime). Many manual steps are still needed, which should be automatized in the future. For example, in addition to the API assemblies, now you also need to copy the GodotPlugins assembly to each game project.
This commit is contained in:
parent
f88d8902cf
commit
88e367a406
51 changed files with 1568 additions and 1224 deletions
|
|
@ -17,6 +17,9 @@ namespace Godot.SourceGenerators
|
|||
if (context.AreGodotSourceGeneratorsDisabled())
|
||||
return;
|
||||
|
||||
if (context.IsGodotToolsProject())
|
||||
return;
|
||||
|
||||
// NOTE: NotNullWhen diagnostics don't work on projects targeting .NET Standard 2.0
|
||||
// ReSharper disable once ReplaceWithStringIsNullOrEmpty
|
||||
if (!context.TryGetGlobalAnalyzerProperty("GodotProjectDir", out string? godotProjectDir)
|
||||
|
|
@ -31,7 +34,7 @@ namespace Godot.SourceGenerators
|
|||
tree.GetRoot().DescendantNodes()
|
||||
.OfType<ClassDeclarationSyntax>()
|
||||
// Ignore inner classes
|
||||
.Where(cds => !(cds.Parent is ClassDeclarationSyntax))
|
||||
.Where(cds => !cds.IsNested())
|
||||
.SelectGodotScriptClasses(context.Compilation)
|
||||
// Report and skip non-partial classes
|
||||
.Where(x =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue