[gnome-builder/wip/gtk4-port] plugins/meson-templates: add empty meson project template
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/meson-templates: add empty meson project template
- Date: Wed, 8 Jun 2022 20:01:42 +0000 (UTC)
commit abc6c80f46f8edcd1ad07af3e7ee0f7ae27e4a73
Author: Christian Hergert <chergert redhat com>
Date: Wed Jun 8 13:01:35 2022 -0700
plugins/meson-templates: add empty meson project template
.../meson-templates/gbp-meson-template-provider.c | 34 ++++++++++++----------
1 file changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/src/plugins/meson-templates/gbp-meson-template-provider.c
b/src/plugins/meson-templates/gbp-meson-template-provider.c
index 9729ae59c..843449500 100644
--- a/src/plugins/meson-templates/gbp-meson-template-provider.c
+++ b/src/plugins/meson-templates/gbp-meson-template-provider.c
@@ -123,6 +123,16 @@ static GbpMesonTemplateExpansion library_expansions[] = {
{ "src/hello-version.h.in", "src/{{name}}-version.h.in" },
};
+static GbpMesonTemplateExpansion empty_expansions[] = {
+ /* Shared */
+ { "meson.build", "meson.build" },
+ { "src/meson-empty.build", "src/meson.build" },
+
+ /* Rust */
+ { "src/Cargo.lock", "Cargo.lock", IDE_STRV_INIT ("Rust") },
+ { "src/Cargo-cli.toml", "Cargo.toml", IDE_STRV_INIT ("Rust") },
+};
+
static const GbpMesonTemplateInfo templates[] = {
{
-1000,
@@ -162,6 +172,14 @@ static const GbpMesonTemplateInfo templates[] = {
IDE_STRV_INIT ("C"),
library_expansions, G_N_ELEMENTS (library_expansions),
},
+ {
+ -600,
+ "empty",
+ N_("Empty Meson Project"),
+ N_("An empty Meson project skeleton"),
+ IDE_STRV_INIT ("C", "C++", "C♯", "JavaScript", "Python", "Rust", "Vala"),
+ empty_expansions, G_N_ELEMENTS (empty_expansions),
+ },
};
static GList *
@@ -195,14 +213,6 @@ gbp_meson_template_provider_get_project_templates (IdeTemplateProvider *provider
}
#if 0
- list = g_list_prepend (list,
- g_object_new (GBP_TYPE_MESON_TEMPLATE,
- "id", "meson-templates:shared-library",
- "name", _("Shared Library"),
- "description", _("A Meson-based project for a shared-library"),
- "languages", IDE_STRV_INIT ("C"),
- "priority", -800,
- NULL));
list = g_list_prepend (list,
g_object_new (GBP_TYPE_MESON_TEMPLATE,
"id", "meson-templates:cli",
@@ -219,14 +229,6 @@ gbp_meson_template_provider_get_project_templates (IdeTemplateProvider *provider
"languages", IDE_STRV_INIT ("C", "C++", "C♯", "JavaScript", "Python",
"Rust", "Vala"),
"priority", -600,
NULL));
- list = g_list_prepend (list,
- g_object_new (GBP_TYPE_MESON_TEMPLATE,
- "id", "meson-templates:empty",
- "name", _("Empty Meson Project"),
- "description", _("A empty Meson-based project"),
- "languages", IDE_STRV_INIT ("C", "C++", "C♯", "JavaScript", "Python",
"Rust", "Vala"),
- "priority", -500,
- NULL));
#endif
return list;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]