[gnome-builder/wip/albfan/flatpak-plugin-extensions] flatpak: Add plugin extension point
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/albfan/flatpak-plugin-extensions] flatpak: Add plugin extension point
- Date: Tue, 23 Jun 2020 05:43:19 +0000 (UTC)
commit d72198c65acc0cc7658cc57862308585c81c4312
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Wed Apr 8 02:06:57 2020 +0200
flatpak: Add plugin extension point
build-aux/flatpak/org.gnome.Builder.json | 11 +++++++++++
src/libide/gui/ide-application-plugins.c | 22 ++++++++++++++++------
2 files changed, 27 insertions(+), 6 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Builder.json b/build-aux/flatpak/org.gnome.Builder.json
index e5ce4acb1..97bea5a2a 100644
--- a/build-aux/flatpak/org.gnome.Builder.json
+++ b/build-aux/flatpak/org.gnome.Builder.json
@@ -8,6 +8,17 @@
"nightly"
],
"desktop-file-name-prefix" : "(Nightly) ",
+ "add-extensions": {
+ "org.gnome.Builder.Plugin": {
+ "version": "master",
+ "directory": "extensions",
+ "add-ld-path": "lib",
+ "merge-dirs": "lib/gnome-builder/plugins",
+ "subdirectories": true,
+ "no-autodownload": true,
+ "autodelete": true
+ }
+ },
"finish-args" : [
"--require-version=1.0.0",
"--allow=devel",
diff --git a/src/libide/gui/ide-application-plugins.c b/src/libide/gui/ide-application-plugins.c
index a543b040f..c5defe5e3 100644
--- a/src/libide/gui/ide-application-plugins.c
+++ b/src/libide/gui/ide-application-plugins.c
@@ -358,6 +358,8 @@ _ide_application_load_plugins (IdeApplication *self)
g_autoptr(GError) error = NULL;
const GList *plugins;
PeasEngine *engine;
+ g_autofree gchar *extensions_plugins_dir = NULL;
+ g_autofree gchar *plugins_dir = NULL;
g_assert (IDE_IS_APPLICATION (self));
@@ -373,13 +375,21 @@ _ide_application_load_plugins (IdeApplication *self)
if (ide_is_flatpak ())
{
- g_autofree gchar *plugins_dir = g_build_filename (g_get_home_dir (),
- ".local",
- "share",
- "gnome-builder",
- "plugins",
- NULL);
+ plugins_dir = g_build_filename (g_get_home_dir (),
+ ".local",
+ "share",
+ "gnome-builder",
+ "plugins",
+ NULL);
peas_engine_prepend_search_path (engine, plugins_dir, plugins_dir);
+
+ extensions_plugins_dir = g_build_filename ("/app",
+ "extensions",
+ "lib",
+ "gnome-builder",
+ "plugins",
+ NULL);
+ peas_engine_prepend_search_path (engine, extensions_plugins_dir, extensions_plugins_dir);
}
user_plugins_dir = g_build_filename (g_get_user_data_dir (),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]