From c9b75431f313fae16e9f4c9e60d7f5eaed0aaec0 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Mon, 28 Mar 2022 15:48:38 +0200 Subject: Refactor GDScript/C# script templates logic to be editor-only Not a full refactor as it still goes through ScriptLanguage so it's hacky, but at least it can now compile without this. --- modules/gdscript/editor/script_templates/SCsub | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/gdscript/editor/script_templates/SCsub (limited to 'modules/gdscript/editor/script_templates/SCsub') diff --git a/modules/gdscript/editor/script_templates/SCsub b/modules/gdscript/editor/script_templates/SCsub new file mode 100644 index 0000000000..2266ef2d01 --- /dev/null +++ b/modules/gdscript/editor/script_templates/SCsub @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +Import("env") + +import editor.template_builders as build_template_gd + +env["BUILDERS"]["MakeGDTemplateBuilder"] = Builder( + action=env.Run(build_template_gd.make_templates, "Generating GDScript templates header."), + suffix=".h", + src_suffix=".gd", +) + +# Template files +templates_sources = Glob("*/*.gd") + +env.Alias("editor_template_gd", [env.MakeGDTemplateBuilder("templates.gen.h", templates_sources)]) -- cgit v1.2.3