[gnome-builder] configuration: Move build commands into parent class
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] configuration: Move build commands into parent class
- Date: Thu, 30 Mar 2017 00:52:46 +0000 (UTC)
commit 2056810b1a0e200533cd2115159423911f8e650f
Author: Matthew Leeds <mleeds redhat com>
Date: Mon Mar 27 20:27:33 2017 -0500
configuration: Move build commands into parent class
Having the build-commands and post-install commands in IdeConfiguration
rather than GbpFlatpakConfiguration will make it possible for plugins
to access them, which will be useful to implement flatpak's "simple"
buildsystem as a plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=780674
libide/buildsystem/ide-configuration.c | 92 ++++++++++++++
libide/buildsystem/ide-configuration.h | 176 +++++++++++++-------------
plugins/flatpak/gbp-flatpak-configuration.c | 88 +-------------
plugins/flatpak/gbp-flatpak-configuration.h | 62 ++++-----
plugins/flatpak/gbp-flatpak-pipeline-addin.c | 4 +-
5 files changed, 215 insertions(+), 207 deletions(-)
---
diff --git a/libide/buildsystem/ide-configuration.c b/libide/buildsystem/ide-configuration.c
index 2fecd86..c2a2c2d 100644
--- a/libide/buildsystem/ide-configuration.c
+++ b/libide/buildsystem/ide-configuration.c
@@ -34,10 +34,12 @@
typedef struct
{
+ gchar **build_commands;
gchar *config_opts;
gchar *device_id;
gchar *display_name;
gchar *id;
+ gchar **post_install_commands;
gchar *prefix;
gchar *runtime_id;
gchar *app_id;
@@ -66,6 +68,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (IdeConfiguration, ide_configuration, IDE_TYPE_OBJECT
enum {
PROP_0,
+ PROP_BUILD_COMMANDS,
PROP_CONFIG_OPTS,
PROP_DEBUG,
PROP_DEVICE,
@@ -75,6 +78,7 @@ enum {
PROP_ENVIRON,
PROP_ID,
PROP_PARALLELISM,
+ PROP_POST_INSTALL_COMMANDS,
PROP_PREFIX,
PROP_READY,
PROP_RUNTIME,
@@ -333,11 +337,13 @@ ide_configuration_finalize (GObject *object)
g_clear_object (&priv->environment);
+ g_clear_pointer (&priv->build_commands, g_strfreev);
g_clear_pointer (&priv->internal, g_hash_table_unref);
g_clear_pointer (&priv->config_opts, g_free);
g_clear_pointer (&priv->device_id, g_free);
g_clear_pointer (&priv->display_name, g_free);
g_clear_pointer (&priv->id, g_free);
+ g_clear_pointer (&priv->post_install_commands, g_strfreev);
g_clear_pointer (&priv->prefix, g_free);
g_clear_pointer (&priv->runtime_id, g_free);
g_clear_pointer (&priv->app_id, g_free);
@@ -359,6 +365,10 @@ ide_configuration_get_property (GObject *object,
g_value_set_string (value, ide_configuration_get_config_opts (self));
break;
+ case PROP_BUILD_COMMANDS:
+ g_value_set_boxed (value, ide_configuration_get_build_commands (self));
+ break;
+
case PROP_DEBUG:
g_value_set_boolean (value, ide_configuration_get_debug (self));
break;
@@ -391,6 +401,10 @@ ide_configuration_get_property (GObject *object,
g_value_set_boolean (value, ide_configuration_get_ready (self));
break;
+ case PROP_POST_INSTALL_COMMANDS:
+ g_value_set_boxed (value, ide_configuration_get_post_install_commands (self));
+ break;
+
case PROP_PREFIX:
g_value_set_string (value, ide_configuration_get_prefix (self));
break;
@@ -426,6 +440,10 @@ ide_configuration_set_property (GObject *object,
ide_configuration_set_config_opts (self, g_value_get_string (value));
break;
+ case PROP_BUILD_COMMANDS:
+ ide_configuration_set_build_commands (self, g_value_get_boxed (value));
+ break;
+
case PROP_DEBUG:
ide_configuration_set_debug (self, g_value_get_boolean (value));
break;
@@ -450,6 +468,10 @@ ide_configuration_set_property (GObject *object,
ide_configuration_set_id (self, g_value_get_string (value));
break;
+ case PROP_POST_INSTALL_COMMANDS:
+ ide_configuration_set_post_install_commands (self, g_value_get_boxed (value));
+ break;
+
case PROP_PREFIX:
ide_configuration_set_prefix (self, g_value_get_string (value));
break;
@@ -490,6 +512,15 @@ ide_configuration_class_init (IdeConfigurationClass *klass)
klass->get_runtime = ide_configuration_real_get_runtime;
klass->set_runtime = ide_configuration_real_set_runtime;
+ properties [PROP_BUILD_COMMANDS] =
+ g_param_spec_boxed ("build-commands",
+ "Build commands",
+ "Build commands",
+ G_TYPE_STRV,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
+
properties [PROP_CONFIG_OPTS] =
g_param_spec_string ("config-opts",
"Config Options",
@@ -555,6 +586,15 @@ ide_configuration_class_init (IdeConfigurationClass *klass)
-1,
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ properties [PROP_POST_INSTALL_COMMANDS] =
+ g_param_spec_boxed ("post-install-commands",
+ "Post install commands",
+ "Post install commands",
+ G_TYPE_STRV,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
+
properties [PROP_PREFIX] =
g_param_spec_string ("prefix",
"Prefix",
@@ -1116,6 +1156,58 @@ ide_configuration_set_config_opts (IdeConfiguration *self,
}
}
+const gchar * const *
+ide_configuration_get_build_commands (IdeConfiguration *self)
+{
+ IdeConfigurationPrivate *priv = ide_configuration_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_CONFIGURATION (self), NULL);
+
+ return (const gchar * const *)priv->build_commands;
+}
+
+void
+ide_configuration_set_build_commands (IdeConfiguration *self,
+ const gchar * const *build_commands)
+{
+ IdeConfigurationPrivate *priv = ide_configuration_get_instance_private (self);
+
+ g_return_if_fail (IDE_IS_CONFIGURATION (self));
+
+ if (priv->build_commands != (gchar **)build_commands)
+ {
+ g_strfreev (priv->build_commands);
+ priv->build_commands = g_strdupv ((gchar **)build_commands);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BUILD_COMMANDS]);
+ }
+}
+
+const gchar * const *
+ide_configuration_get_post_install_commands (IdeConfiguration *self)
+{
+ IdeConfigurationPrivate *priv = ide_configuration_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_CONFIGURATION (self), NULL);
+
+ return (const gchar * const *)priv->post_install_commands;
+}
+
+void
+ide_configuration_set_post_install_commands (IdeConfiguration *self,
+ const gchar * const *post_install_commands)
+{
+ IdeConfigurationPrivate *priv = ide_configuration_get_instance_private (self);
+
+ g_return_if_fail (IDE_IS_CONFIGURATION (self));
+
+ if (priv->post_install_commands != (gchar **)post_install_commands)
+ {
+ g_strfreev (priv->post_install_commands);
+ priv->post_install_commands = g_strdupv ((gchar **)post_install_commands);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_POST_INSTALL_COMMANDS]);
+ }
+}
+
/**
* ide_configuration_snapshot:
*
diff --git a/libide/buildsystem/ide-configuration.h b/libide/buildsystem/ide-configuration.h
index dda3c4d..f646819 100644
--- a/libide/buildsystem/ide-configuration.h
+++ b/libide/buildsystem/ide-configuration.h
@@ -65,91 +65,97 @@ struct _IdeConfigurationClass
gpointer _reserved16;
};
-IdeConfiguration *ide_configuration_new (IdeContext *context,
- const gchar *id,
- const gchar *device_id,
- const gchar *runtime_id);
-const gchar *ide_configuration_get_id (IdeConfiguration *self);
-const gchar *ide_configuration_get_runtime_id (IdeConfiguration *self);
-void ide_configuration_set_runtime_id (IdeConfiguration *self,
- const gchar *runtime_id);
-const gchar *ide_configuration_get_device_id (IdeConfiguration *self);
-void ide_configuration_set_device_id (IdeConfiguration *self,
- const gchar *device_id);
-IdeDevice *ide_configuration_get_device (IdeConfiguration *self);
-void ide_configuration_set_device (IdeConfiguration *self,
- IdeDevice *device);
-gboolean ide_configuration_get_dirty (IdeConfiguration *self);
-void ide_configuration_set_dirty (IdeConfiguration *self,
- gboolean dirty);
-const gchar *ide_configuration_get_display_name (IdeConfiguration *self);
-void ide_configuration_set_display_name (IdeConfiguration *self,
- const gchar *display_name);
-gboolean ide_configuration_get_ready (IdeConfiguration *self);
-IdeRuntime *ide_configuration_get_runtime (IdeConfiguration *self);
-void ide_configuration_set_runtime (IdeConfiguration *self,
- IdeRuntime *runtime);
-gchar **ide_configuration_get_environ (IdeConfiguration *self);
-const gchar *ide_configuration_getenv (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_setenv (IdeConfiguration *self,
- const gchar *key,
- const gchar *value);
-gboolean ide_configuration_get_debug (IdeConfiguration *self);
-void ide_configuration_set_debug (IdeConfiguration *self,
- gboolean debug);
-const gchar *ide_configuration_get_prefix (IdeConfiguration *self);
-void ide_configuration_set_prefix (IdeConfiguration *self,
- const gchar *prefix);
-const gchar *ide_configuration_get_config_opts (IdeConfiguration *self);
-void ide_configuration_set_config_opts (IdeConfiguration *self,
- const gchar *config_opts);
-gint ide_configuration_get_parallelism (IdeConfiguration *self);
-void ide_configuration_set_parallelism (IdeConfiguration *self,
- gint parallelism);
-IdeEnvironment *ide_configuration_get_environment (IdeConfiguration *self);
-void ide_configuration_set_environment (IdeConfiguration *self,
- IdeEnvironment *environment);
-IdeConfiguration *ide_configuration_duplicate (IdeConfiguration *self);
-IdeConfiguration *ide_configuration_snapshot (IdeConfiguration *self);
-guint ide_configuration_get_sequence (IdeConfiguration *self);
-const gchar *ide_configuration_get_app_id (IdeConfiguration *self);
-void ide_configuration_set_app_id (IdeConfiguration *self,
- const gchar *app_id);
-gboolean ide_configuration_supports_device (IdeConfiguration *self,
- IdeDevice *device);
-gboolean ide_configuration_supports_runtime (IdeConfiguration *self,
- IdeRuntime *runtime);
-const gchar *ide_configuration_get_internal_string (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_string (IdeConfiguration *self,
- const gchar *key,
- const gchar *value);
-const gchar * const *ide_configuration_get_internal_strv (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_strv (IdeConfiguration *self,
- const gchar *key,
- const gchar * const *value);
-gboolean ide_configuration_get_internal_boolean (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_boolean (IdeConfiguration *self,
- const gchar *key,
- gboolean value);
-gint ide_configuration_get_internal_int (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_int (IdeConfiguration *self,
- const gchar *key,
- gint value);
-gint64 ide_configuration_get_internal_int64 (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_int64 (IdeConfiguration *self,
- const gchar *key,
- gint64 value);
-gpointer ide_configuration_get_internal_object (IdeConfiguration *self,
- const gchar *key);
-void ide_configuration_set_internal_object (IdeConfiguration *self,
- const gchar *key,
- gpointer instance);
+IdeConfiguration *ide_configuration_new (IdeContext *context,
+ const gchar *id,
+ const gchar *device_id,
+ const gchar *runtime_id);
+const gchar *ide_configuration_get_id (IdeConfiguration *self);
+const gchar *ide_configuration_get_runtime_id (IdeConfiguration *self);
+void ide_configuration_set_runtime_id (IdeConfiguration *self,
+ const gchar *runtime_id);
+const gchar *ide_configuration_get_device_id (IdeConfiguration *self);
+void ide_configuration_set_device_id (IdeConfiguration *self,
+ const gchar *device_id);
+IdeDevice *ide_configuration_get_device (IdeConfiguration *self);
+void ide_configuration_set_device (IdeConfiguration *self,
+ IdeDevice *device);
+gboolean ide_configuration_get_dirty (IdeConfiguration *self);
+void ide_configuration_set_dirty (IdeConfiguration *self,
+ gboolean dirty);
+const gchar *ide_configuration_get_display_name (IdeConfiguration *self);
+void ide_configuration_set_display_name (IdeConfiguration *self,
+ const gchar *display_name);
+gboolean ide_configuration_get_ready (IdeConfiguration *self);
+IdeRuntime *ide_configuration_get_runtime (IdeConfiguration *self);
+void ide_configuration_set_runtime (IdeConfiguration *self,
+ IdeRuntime *runtime);
+gchar **ide_configuration_get_environ (IdeConfiguration *self);
+const gchar *ide_configuration_getenv (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_setenv (IdeConfiguration *self,
+ const gchar *key,
+ const gchar *value);
+gboolean ide_configuration_get_debug (IdeConfiguration *self);
+void ide_configuration_set_debug (IdeConfiguration *self,
+ gboolean debug);
+const gchar *ide_configuration_get_prefix (IdeConfiguration *self);
+void ide_configuration_set_prefix (IdeConfiguration *self,
+ const gchar *prefix);
+const gchar *ide_configuration_get_config_opts (IdeConfiguration *self);
+void ide_configuration_set_config_opts (IdeConfiguration *self,
+ const gchar *config_opts);
+const gchar * const *ide_configuration_get_build_commands (IdeConfiguration *self);
+void ide_configuration_set_build_commands (IdeConfiguration *self,
+ const gchar *const *build_commands);
+const gchar * const *ide_configuration_get_post_install_commands (IdeConfiguration *self);
+void ide_configuration_set_post_install_commands (IdeConfiguration *self,
+ const gchar *const
*post_install_commands);
+gint ide_configuration_get_parallelism (IdeConfiguration *self);
+void ide_configuration_set_parallelism (IdeConfiguration *self,
+ gint parallelism);
+IdeEnvironment *ide_configuration_get_environment (IdeConfiguration *self);
+void ide_configuration_set_environment (IdeConfiguration *self,
+ IdeEnvironment *environment);
+IdeConfiguration *ide_configuration_duplicate (IdeConfiguration *self);
+IdeConfiguration *ide_configuration_snapshot (IdeConfiguration *self);
+guint ide_configuration_get_sequence (IdeConfiguration *self);
+const gchar *ide_configuration_get_app_id (IdeConfiguration *self);
+void ide_configuration_set_app_id (IdeConfiguration *self,
+ const gchar *app_id);
+gboolean ide_configuration_supports_device (IdeConfiguration *self,
+ IdeDevice *device);
+gboolean ide_configuration_supports_runtime (IdeConfiguration *self,
+ IdeRuntime *runtime);
+const gchar *ide_configuration_get_internal_string (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_string (IdeConfiguration *self,
+ const gchar *key,
+ const gchar *value);
+const gchar * const *ide_configuration_get_internal_strv (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_strv (IdeConfiguration *self,
+ const gchar *key,
+ const gchar *const *value);
+gboolean ide_configuration_get_internal_boolean (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_boolean (IdeConfiguration *self,
+ const gchar *key,
+ gboolean value);
+gint ide_configuration_get_internal_int (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_int (IdeConfiguration *self,
+ const gchar *key,
+ gint value);
+gint64 ide_configuration_get_internal_int64 (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_int64 (IdeConfiguration *self,
+ const gchar *key,
+ gint64 value);
+gpointer ide_configuration_get_internal_object (IdeConfiguration *self,
+ const gchar *key);
+void ide_configuration_set_internal_object (IdeConfiguration *self,
+ const gchar *key,
+ gpointer instance);
G_END_DECLS
diff --git a/plugins/flatpak/gbp-flatpak-configuration.c b/plugins/flatpak/gbp-flatpak-configuration.c
index a164a65..58526ab 100644
--- a/plugins/flatpak/gbp-flatpak-configuration.c
+++ b/plugins/flatpak/gbp-flatpak-configuration.c
@@ -29,12 +29,10 @@ struct _GbpFlatpakConfiguration
gchar *branch;
gchar **build_args;
- gchar **build_commands;
gchar *command;
gchar **finish_args;
GFile *manifest;
gchar *platform;
- gchar **post_install_commands;
gchar *primary_module;
gchar *sdk;
};
@@ -45,12 +43,10 @@ enum {
PROP_0,
PROP_BRANCH,
PROP_BUILD_ARGS,
- PROP_BUILD_COMMANDS,
PROP_COMMAND,
PROP_FINISH_ARGS,
PROP_MANIFEST,
PROP_PLATFORM,
- PROP_POST_INSTALL_COMMANDS,
PROP_PRIMARY_MODULE,
PROP_SDK,
N_PROPS
@@ -398,7 +394,7 @@ gbp_flatpak_configuration_load_from_file (GbpFlatpakConfiguration *self,
}
g_ptr_array_add (build_commands, NULL);
build_commands_strv = (gchar **)g_ptr_array_free (build_commands, FALSE);
- gbp_flatpak_configuration_set_build_commands (self, (const gchar * const *)build_commands_strv);
+ ide_configuration_set_build_commands (IDE_CONFIGURATION (self), (const gchar * const
*)build_commands_strv);
}
if (json_object_has_member (primary_module_object, "post-install"))
{
@@ -415,7 +411,7 @@ gbp_flatpak_configuration_load_from_file (GbpFlatpakConfiguration *self,
}
g_ptr_array_add (post_install_commands, NULL);
post_install_commands_strv = (gchar **)g_ptr_array_free (post_install_commands, FALSE);
- gbp_flatpak_configuration_set_post_install_commands (self, (const gchar * const
*)post_install_commands_strv);
+ ide_configuration_set_post_install_commands (IDE_CONFIGURATION (self), (const gchar * const
*)post_install_commands_strv);
}
}
@@ -441,28 +437,6 @@ gbp_flatpak_configuration_set_branch (GbpFlatpakConfiguration *self,
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BRANCH]);
}
-const gchar * const *
-gbp_flatpak_configuration_get_build_commands (GbpFlatpakConfiguration *self)
-{
- g_return_val_if_fail (GBP_IS_FLATPAK_CONFIGURATION (self), NULL);
-
- return (const gchar * const *)self->build_commands;
-}
-
-void
-gbp_flatpak_configuration_set_build_commands (GbpFlatpakConfiguration *self,
- const gchar * const *build_commands)
-{
- g_return_if_fail (GBP_IS_FLATPAK_CONFIGURATION (self));
-
- if (self->build_commands != (gchar **)build_commands)
- {
- g_strfreev (self->build_commands);
- self->build_commands = g_strdupv ((gchar **)build_commands);
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BUILD_COMMANDS]);
- }
-}
-
const gchar *
gbp_flatpak_configuration_get_command (GbpFlatpakConfiguration *self)
{
@@ -574,28 +548,6 @@ gbp_flatpak_configuration_set_platform (GbpFlatpakConfiguration *self,
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PLATFORM]);
}
-const gchar * const *
-gbp_flatpak_configuration_get_post_install_commands (GbpFlatpakConfiguration *self)
-{
- g_return_val_if_fail (GBP_IS_FLATPAK_CONFIGURATION (self), NULL);
-
- return (const gchar * const *)self->post_install_commands;
-}
-
-void
-gbp_flatpak_configuration_set_post_install_commands (GbpFlatpakConfiguration *self,
- const gchar * const *post_install_commands)
-{
- g_return_if_fail (GBP_IS_FLATPAK_CONFIGURATION (self));
-
- if (self->post_install_commands != (gchar **)post_install_commands)
- {
- g_strfreev (self->post_install_commands);
- self->post_install_commands = g_strdupv ((gchar **)post_install_commands);
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_POST_INSTALL_COMMANDS]);
- }
-}
-
const gchar *
gbp_flatpak_configuration_get_primary_module (GbpFlatpakConfiguration *self)
{
@@ -665,10 +617,6 @@ gbp_flatpak_configuration_get_property (GObject *object,
g_value_set_boxed (value, gbp_flatpak_configuration_get_build_args (self));
break;
- case PROP_BUILD_COMMANDS:
- g_value_set_boxed (value, gbp_flatpak_configuration_get_build_commands (self));
- break;
-
case PROP_COMMAND:
g_value_set_string (value, gbp_flatpak_configuration_get_command (self));
break;
@@ -685,10 +633,6 @@ gbp_flatpak_configuration_get_property (GObject *object,
g_value_set_string (value, gbp_flatpak_configuration_get_platform (self));
break;
- case PROP_POST_INSTALL_COMMANDS:
- g_value_set_boxed (value, gbp_flatpak_configuration_get_post_install_commands (self));
- break;
-
case PROP_PRIMARY_MODULE:
g_value_set_string (value, gbp_flatpak_configuration_get_primary_module (self));
break;
@@ -720,10 +664,6 @@ gbp_flatpak_configuration_set_property (GObject *object,
gbp_flatpak_configuration_set_build_args (self, g_value_get_boxed (value));
break;
- case PROP_BUILD_COMMANDS:
- gbp_flatpak_configuration_set_build_commands (self, g_value_get_boxed (value));
- break;
-
case PROP_COMMAND:
gbp_flatpak_configuration_set_command (self, g_value_get_string (value));
break;
@@ -740,10 +680,6 @@ gbp_flatpak_configuration_set_property (GObject *object,
gbp_flatpak_configuration_set_platform (self, g_value_get_string (value));
break;
- case PROP_POST_INSTALL_COMMANDS:
- gbp_flatpak_configuration_set_post_install_commands (self, g_value_get_boxed (value));
- break;
-
case PROP_PRIMARY_MODULE:
gbp_flatpak_configuration_set_primary_module (self, g_value_get_string (value));
break;
@@ -763,12 +699,10 @@ gbp_flatpak_configuration_finalize (GObject *object)
GbpFlatpakConfiguration *self = (GbpFlatpakConfiguration *)object;
g_clear_pointer (&self->branch, g_free);
- g_clear_pointer (&self->build_commands, g_strfreev);
g_clear_pointer (&self->command, g_free);
g_clear_pointer (&self->finish_args, g_strfreev);
g_clear_object (&self->manifest);
g_clear_pointer (&self->platform, g_free);
- g_clear_pointer (&self->post_install_commands, g_strfreev);
g_clear_pointer (&self->primary_module, g_free);
g_clear_pointer (&self->sdk, g_free);
@@ -805,15 +739,6 @@ gbp_flatpak_configuration_class_init (GbpFlatpakConfigurationClass *klass)
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
- properties [PROP_BUILD_COMMANDS] =
- g_param_spec_boxed ("build-commands",
- "Build commands",
- "Build commands",
- G_TYPE_STRV,
- (G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT |
- G_PARAM_STATIC_STRINGS));
-
properties [PROP_COMMAND] =
g_param_spec_string ("command",
"Command",
@@ -850,15 +775,6 @@ gbp_flatpak_configuration_class_init (GbpFlatpakConfigurationClass *klass)
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
- properties [PROP_POST_INSTALL_COMMANDS] =
- g_param_spec_boxed ("post-install-commands",
- "Post install commands",
- "Post install commands",
- G_TYPE_STRV,
- (G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT |
- G_PARAM_STATIC_STRINGS));
-
properties [PROP_PRIMARY_MODULE] =
g_param_spec_string ("primary-module",
"Primary module",
diff --git a/plugins/flatpak/gbp-flatpak-configuration.h b/plugins/flatpak/gbp-flatpak-configuration.h
index c5f1b3d..2cf842b 100644
--- a/plugins/flatpak/gbp-flatpak-configuration.h
+++ b/plugins/flatpak/gbp-flatpak-configuration.h
@@ -27,40 +27,34 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GbpFlatpakConfiguration, gbp_flatpak_configuration, GBP, FLATPAK_CONFIGURATION,
IdeConfiguration)
-GbpFlatpakConfiguration *gbp_flatpak_configuration_new (IdeContext
*context,
- const gchar *id,
- const gchar
*display_name);
-gboolean gbp_flatpak_configuration_load_from_file (GbpFlatpakConfiguration *self,
- GFile
*manifest);
-const gchar *gbp_flatpak_configuration_get_branch (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_branch (GbpFlatpakConfiguration *self,
- const gchar
*branch);
-const gchar * const *gbp_flatpak_configuration_get_build_commands (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_build_commands (GbpFlatpakConfiguration *self,
- const gchar *const
*build_commands);
-const gchar *gbp_flatpak_configuration_get_command (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_command (GbpFlatpakConfiguration *self,
- const gchar
*command);
-const gchar * const *gbp_flatpak_configuration_get_build_args (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_build_args (GbpFlatpakConfiguration *self,
- const gchar *const
*build_args);
-const gchar * const *gbp_flatpak_configuration_get_finish_args (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_finish_args (GbpFlatpakConfiguration *self,
- const gchar *const
*finish_args);
-GFile *gbp_flatpak_configuration_get_manifest (GbpFlatpakConfiguration
*self);
-gchar *gbp_flatpak_configuration_get_manifest_path (GbpFlatpakConfiguration
*self);
-const gchar *gbp_flatpak_configuration_get_platform (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_platform (GbpFlatpakConfiguration *self,
- const gchar
*platform);
-const gchar * const *gbp_flatpak_configuration_get_post_install_commands (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_post_install_commands (GbpFlatpakConfiguration *self,
- const gchar *const
*post_install_commands);
-const gchar *gbp_flatpak_configuration_get_primary_module (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_primary_module (GbpFlatpakConfiguration *self,
- const gchar
*primary_module);
-const gchar *gbp_flatpak_configuration_get_sdk (GbpFlatpakConfiguration
*self);
-void gbp_flatpak_configuration_set_sdk (GbpFlatpakConfiguration *self,
- const gchar *sdk);
+GbpFlatpakConfiguration *gbp_flatpak_configuration_new (IdeContext *context,
+ const gchar *id,
+ const gchar
*display_name);
+gboolean gbp_flatpak_configuration_load_from_file (GbpFlatpakConfiguration *self,
+ GFile *manifest);
+const gchar *gbp_flatpak_configuration_get_branch (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_branch (GbpFlatpakConfiguration *self,
+ const gchar *branch);
+const gchar *gbp_flatpak_configuration_get_command (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_command (GbpFlatpakConfiguration *self,
+ const gchar *command);
+const gchar * const *gbp_flatpak_configuration_get_build_args (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_build_args (GbpFlatpakConfiguration *self,
+ const gchar *const *build_args);
+const gchar * const *gbp_flatpak_configuration_get_finish_args (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_finish_args (GbpFlatpakConfiguration *self,
+ const gchar *const *finish_args);
+GFile *gbp_flatpak_configuration_get_manifest (GbpFlatpakConfiguration *self);
+gchar *gbp_flatpak_configuration_get_manifest_path (GbpFlatpakConfiguration *self);
+const gchar *gbp_flatpak_configuration_get_platform (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_platform (GbpFlatpakConfiguration *self,
+ const gchar *platform);
+const gchar *gbp_flatpak_configuration_get_primary_module (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_primary_module (GbpFlatpakConfiguration *self,
+ const gchar
*primary_module);
+const gchar *gbp_flatpak_configuration_get_sdk (GbpFlatpakConfiguration *self);
+void gbp_flatpak_configuration_set_sdk (GbpFlatpakConfiguration *self,
+ const gchar *sdk);
G_END_DECLS
#endif /* GBP_FLATPAK_CONFIGURATION_H */
diff --git a/plugins/flatpak/gbp-flatpak-pipeline-addin.c b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index 893fb1b..c69fe86 100644
--- a/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -377,7 +377,7 @@ register_build_commands_stage (GbpFlatpakPipelineAddin *self,
ide_subprocess_launcher_push_argv (launcher, "/bin/sh");
ide_subprocess_launcher_push_argv (launcher, "-c");
- build_commands = gbp_flatpak_configuration_get_build_commands (GBP_FLATPAK_CONFIGURATION (config));
+ build_commands = ide_configuration_get_build_commands (config);
if (build_commands == NULL)
return TRUE;
else
@@ -428,7 +428,7 @@ register_post_install_commands_stage (GbpFlatpakPipelineAddin *self,
ide_subprocess_launcher_push_argv (launcher, "/bin/sh");
ide_subprocess_launcher_push_argv (launcher, "-c");
- post_install_commands = gbp_flatpak_configuration_get_post_install_commands (GBP_FLATPAK_CONFIGURATION
(config));
+ post_install_commands = ide_configuration_get_post_install_commands (config);
if (post_install_commands == NULL)
return TRUE;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]