[gnome-builder: 2/2] build: add libgnome-builder-plugins for embedding plugins
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder: 2/2] build: add libgnome-builder-plugins for embedding plugins
- Date: Sat, 23 Sep 2017 02:52:39 +0000 (UTC)
commit e2f8a08d0172d2e2c5c29d8f16d93a72efa4344f
Author: Christian Hergert <chergert redhat com>
Date: Thu Sep 21 22:36:05 2017 -0700
build: add libgnome-builder-plugins for embedding plugins
This creates a new library that contains many plugins inside of it. The idea
here is that the gnome-builder executable will link against this library
allowing us to drastically reduce the number of files that are checked/loaded
when starting a gnome-builder process.
meson.build | 18 --------
src/libeditorconfig/meson.build | 25 ++++++-----
src/libide/meson.build | 46 +++++++++++---------
src/main.c | 28 ++++++++++++
src/meson.build | 18 ++++++++
src/plugins/autotools-templates/configure.ac | 11 -----
src/plugins/autotools/autotools-plugin.c | 2 +-
src/plugins/autotools/autotools.gresource.xml | 6 +++
src/plugins/autotools/autotools.plugin | 2 +-
src/plugins/autotools/meson.build | 29 +++---------
src/plugins/beautifier/beautifier.plugin | 1 +
src/plugins/beautifier/gb-beautifier-plugin.c | 2 +-
src/plugins/beautifier/gb-beautifier.gresource.xml | 1 +
src/plugins/beautifier/meson.build | 20 +-------
src/plugins/c-pack/c-pack-plugin.c | 2 +-
src/plugins/c-pack/c-pack.gresource.xml | 6 +++
src/plugins/c-pack/c-pack.plugin | 1 +
src/plugins/c-pack/meson.build | 23 +++------
src/plugins/clang/clang-plugin.c | 2 +-
src/plugins/clang/clang.gresource.xml | 6 +++
src/plugins/clang/clang.plugin | 1 +
src/plugins/clang/meson.build | 26 ++++-------
src/plugins/code-index/code-index-plugin.c | 2 +-
src/plugins/code-index/code-index.gresource.xml | 6 +++
src/plugins/code-index/code-index.plugin | 1 +
src/plugins/code-index/meson.build | 23 +++------
src/plugins/color-picker/color-picker.plugin | 1 +
src/plugins/color-picker/gb-color-picker-plugin.c | 2 +-
.../color-picker/gb-color-picker.gresource.xml | 4 ++
src/plugins/color-picker/meson.build | 24 +---------
src/plugins/command-bar/command-bar.plugin | 1 +
src/plugins/command-bar/gb-command-bar.c | 16 ++-----
.../command-bar/gb-command-bar.gresource.xml | 4 ++
src/plugins/command-bar/meson.build | 25 +---------
src/plugins/comment-code/comment-code.plugin | 1 +
src/plugins/comment-code/gbp-comment-code-plugin.c | 2 +-
.../comment-code/gbp-comment-code.gresource.xml | 3 +
src/plugins/comment-code/meson.build | 18 +-------
src/plugins/create-project/create-project.plugin | 1 +
.../create-project/gbp-create-project-plugin.c | 2 +-
.../gbp-create-project.gresource.xml | 4 ++
src/plugins/create-project/meson.build | 18 +-------
src/plugins/ctags/ctags-plugin.c | 2 +-
src/plugins/ctags/ctags.gresource.xml | 6 +++
src/plugins/ctags/ctags.plugin | 1 +
src/plugins/ctags/meson.build | 23 +++------
...sources.gresource.xml => devhelp.gresource.xml} | 3 +
src/plugins/devhelp/devhelp.plugin | 3 +-
src/plugins/devhelp/gbp-devhelp-plugin.c | 2 +-
src/plugins/devhelp/meson.build | 26 ++---------
.../documentation-card.gresource.xml | 9 ++++
.../documentation-card/documentation-card.plugin | 1 +
.../gbp-documentation-card-plugin.c | 2 +-
.../gbp-documentation-card-resources.gresource.xml | 6 ---
src/plugins/documentation-card/meson.build | 16 ++-----
src/plugins/file-search/file-search.gresource.xml | 6 +++
src/plugins/file-search/file-search.plugin | 6 +-
src/plugins/file-search/gb-file-search-provider.c | 2 +-
src/plugins/file-search/meson.build | 23 +++------
...sources.gresource.xml => flatpak.gresource.xml} | 3 +
src/plugins/flatpak/flatpak.plugin | 3 +-
src/plugins/flatpak/gbp-flatpak-plugin.c | 2 +-
src/plugins/flatpak/meson.build | 30 +++----------
src/plugins/gcc/gbp-gcc-plugin.c | 2 +-
src/plugins/gcc/gcc.gresource.xml | 6 +++
src/plugins/gcc/gcc.plugin | 1 +
src/plugins/gcc/meson.build | 23 +++------
src/plugins/gdb/gbp-gdb-plugin.c | 2 +-
src/plugins/gdb/gdb.gresource.xml | 6 +++
src/plugins/gdb/gdb.plugin | 3 +-
src/plugins/gdb/meson.build | 17 +++----
src/plugins/gettext/gettext-plugin.c | 2 +-
src/plugins/gettext/gettext.gresource.xml | 6 +++
src/plugins/gettext/gettext.plugin | 1 +
src/plugins/gettext/meson.build | 23 +++------
...t-resources.gresource.xml => git.gresource.xml} | 3 +
src/plugins/git/git.plugin | 2 +-
src/plugins/git/ide-git-plugin.c | 2 +-
src/plugins/git/meson.build | 24 ++--------
src/plugins/gnome-builder-plugins.c | 8 +++
src/plugins/gnome-code-assistance/gca-plugin.c | 2 +-
.../gnome-code-assistance.gresource.xml | 6 +++
.../gnome-code-assistance.plugin | 1 +
.../ide-gca-diagnostic-provider.c | 2 +-
.../gnome-code-assistance/ide-gca-service.c | 1 -
.../gnome-code-assistance/ide-gca-service.h | 3 +-
src/plugins/gnome-code-assistance/meson.build | 25 ++++-------
src/plugins/history/gbp-history-plugin.c | 2 +-
src/plugins/history/history.gresource.xml | 6 +++
src/plugins/history/history.plugin | 1 +
src/plugins/history/meson.build | 24 +++-------
.../html-completion/html-completion.gresource.xml | 6 +++
src/plugins/html-completion/html-completion.plugin | 1 +
.../html-completion/ide-html-completion-provider.c | 2 +-
src/plugins/html-completion/meson.build | 23 +++------
src/plugins/meson.build | 35 ++++++++++++---
src/plugins/mingw/meson.build | 23 +++------
src/plugins/mingw/mingw-plugin.c | 2 +-
src/plugins/mingw/mingw.gresource.xml | 6 +++
src/plugins/mingw/mingw.plugin | 1 +
src/plugins/notification/ide-notification-plugin.c | 2 +-
src/plugins/notification/meson.build | 23 +++------
.../notification/notification.gresource.xml | 6 +++
src/plugins/notification/notification.plugin | 1 +
src/plugins/plugins.map | 3 +-
src/plugins/project-tree/meson.build | 33 +++-----------
src/plugins/project-tree/project-tree-plugin.c | 2 +-
...ee.gresource.xml => project-tree.gresource.xml} | 3 +
src/plugins/project-tree/project-tree.plugin | 1 +
src/plugins/python-pack/meson.build | 23 +++------
src/plugins/python-pack/python-pack-plugin.c | 2 +-
src/plugins/python-pack/python-pack.gresource.xml | 6 +++
src/plugins/python-pack/python-pack.plugin | 1 +
.../quick-highlight/gbp-quick-highlight-plugin.c | 2 +-
src/plugins/quick-highlight/meson.build | 23 +++------
.../quick-highlight/quick-highlight.gresource.xml | 6 +++
src/plugins/quick-highlight/quick-highlight.plugin | 1 +
src/plugins/retab/gbp-retab-plugin.c | 2 +-
src/plugins/retab/gbp-retab.gresource.xml | 6 ---
src/plugins/retab/meson.build | 20 +-------
src/plugins/retab/retab.gresource.xml | 9 ++++
src/plugins/retab/retab.plugin | 1 +
src/plugins/spellcheck/meson.build | 21 +--------
src/plugins/spellcheck/spellcheck-plugin.c | 2 +-
src/plugins/spellcheck/spellcheck.gresource.xml | 3 +
src/plugins/spellcheck/spellcheck.plugin | 1 +
src/plugins/support/ide-support-plugin.c | 2 +-
.../support/ide-support-resources.gresource.xml | 6 ---
src/plugins/support/meson.build | 22 ++--------
src/plugins/support/support.gresource.xml | 9 ++++
src/plugins/support/support.plugin | 1 +
src/plugins/symbol-tree/meson.build | 19 +-------
src/plugins/symbol-tree/symbol-tree-plugin.c | 2 +-
src/plugins/symbol-tree/symbol-tree.gresource.xml | 3 +
src/plugins/symbol-tree/symbol-tree.plugin | 1 +
src/plugins/sysmon/gb-sysmon-addin.c | 2 +-
src/plugins/sysmon/gb-sysmon.gresource.xml | 6 ---
src/plugins/sysmon/meson.build | 21 +--------
src/plugins/sysmon/sysmon.gresource.xml | 9 ++++
src/plugins/sysmon/sysmon.plugin | 1 +
src/plugins/sysprof/gbp-sysprof-plugin.c | 2 +-
src/plugins/sysprof/meson.build | 24 ++--------
src/plugins/sysprof/sysprof.gresource.xml | 3 +
src/plugins/sysprof/sysprof.plugin | 1 +
src/plugins/terminal/gb-terminal-plugin.c | 2 +-
src/plugins/terminal/meson.build | 26 ++---------
...rminal.gresource.xml => terminal.gresource.xml} | 3 +
src/plugins/terminal/terminal.plugin | 1 +
src/plugins/todo/gbp-todo-plugin.c | 2 +-
src/plugins/todo/meson.build | 23 +++------
src/plugins/todo/todo.gresource.xml | 6 +++
src/plugins/todo/todo.plugin | 1 +
src/plugins/vala-pack/meson.build | 45 +++++++++----------
src/plugins/xml-pack/ide-xml.gresource.xml | 6 ---
src/plugins/xml-pack/meson.build | 23 ++--------
src/plugins/xml-pack/xml-pack-plugin.c | 2 +-
src/plugins/xml-pack/xml-pack.gresource.xml | 9 ++++
src/plugins/xml-pack/xml-pack.plugin | 1 +
158 files changed, 620 insertions(+), 779 deletions(-)
---
diff --git a/meson.build b/meson.build
index c9d3aff..a15405c 100644
--- a/meson.build
+++ b/meson.build
@@ -229,24 +229,6 @@ subdir('src')
subdir('po')
subdir('doc')
-exe_link_args = [ '-pie' ]
-exe_c_args = [ '-fPIE' ]
-
-gnome_builder_sources = [
- 'src/main.c',
- 'src/bug-buddy.c',
- 'src/bug-buddy.h',
-]
-
-executable('gnome-builder', gnome_builder_sources,
- gui_app: true,
- install: true,
- c_args: exe_c_args,
- link_args: exe_link_args,
- install_rpath: pkglibdir_abs,
- dependencies: libide_deps + [libide_dep],
-)
-
meson.add_install_script('build-aux/meson/post_install.py')
message('\n '.join(status))
diff --git a/src/libeditorconfig/meson.build b/src/libeditorconfig/meson.build
index 0fc0b8c..6c59ace 100644
--- a/src/libeditorconfig/meson.build
+++ b/src/libeditorconfig/meson.build
@@ -23,26 +23,27 @@ libeditorconfig_deps = [
# FIXME: Actually test these
libeditorconfig_args = [
- '-DHAVE_STRCASECMP',
- '-DHAVE_STRICMP',
- '-DHAVE_STRDUP',
- '-DHAVE_STRNDUP',
- '-DUNIX',
- '-Deditorconfig_VERSION_MAJOR=0',
- '-Deditorconfig_VERSION_MINOR=0',
- '-Deditorconfig_VERSION_PATCH=0',
- '-Deditorconfig_VERSION_SUFFIX=0',
+ '-DHAVE_STRCASECMP',
+ '-DHAVE_STRICMP',
+ '-DHAVE_STRDUP',
+ '-DHAVE_STRNDUP',
+ '-DUNIX',
+ '-Deditorconfig_VERSION_MAJOR=0',
+ '-Deditorconfig_VERSION_MINOR=0',
+ '-Deditorconfig_VERSION_PATCH=0',
+ '-Deditorconfig_VERSION_SUFFIX=0',
]
libeditorconfig = static_library('editorconfig',
libeditorconfig_sources,
dependencies: libeditorconfig_deps,
- c_args: libeditorconfig_args,
- pic: true,
+ c_args: libeditorconfig_args,
+ pic: true,
)
libeditorconfig_dep = declare_dependency(
- link_with: libeditorconfig,
+ link_with: libeditorconfig,
include_directories: include_directories('.'),
)
+
endif
diff --git a/src/libide/meson.build b/src/libide/meson.build
index c44b61d..1bfa0cc 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -1,5 +1,7 @@
libide_header_subdir = join_paths('gnome-builder', 'libide')
+libide_api_version = '1.0'
+
libide_enum_headers = []
libide_generated_headers = []
libide_public_headers = []
@@ -32,21 +34,6 @@ libide_build_ident_h = vcs_tag(
)
libide_generated_headers += [libide_build_ident_h]
-libide_deps = [
- libdazzle_dep,
- libgd_dep,
- libgio_dep,
- libgiounix_dep,
- libgtk_dep,
- libgtksource_dep,
- libjson_glib_dep,
- libjsonrpc_glib_dep,
- libpangoft2_dep,
- libpeas_dep,
- libtemplate_glib_dep,
- libxml2_dep,
-]
-
libide_public_headers += [
'ide.h',
'ide-context.h',
@@ -164,20 +151,15 @@ contrib_dir = join_paths(meson.source_root(), 'contrib/')
if get_option('with_webkit')
libide_sources += ['webkit/ide-webkit.c']
- libide_deps += [dependency('webkit2gtk-4.0', version: '>=2.12.0')]
endif
if get_option('with_editorconfig')
- libide_args += '-DENABLE_EDITORCONFIG'
- libide_deps += libeditorconfig_dep
libide_sources += [
'editorconfig/editorconfig-glib.c',
'editorconfig/ide-editorconfig-file-settings.c',
]
endif
-libide_api_version = '1.0'
-
# We want to find the subdirectory to install our override into:
python3 = find_program('python3')
@@ -216,6 +198,30 @@ if ld_supports_version_script
libide_link_args += [ '-Wl,--version-script,' + join_paths(meson.current_source_dir(), 'ide.map') ]
endif
+libide_deps = [
+ libdazzle_dep,
+ libgd_dep,
+ libgio_dep,
+ libgiounix_dep,
+ libgtk_dep,
+ libgtksource_dep,
+ libjson_glib_dep,
+ libjsonrpc_glib_dep,
+ libpangoft2_dep,
+ libpeas_dep,
+ libtemplate_glib_dep,
+ libxml2_dep,
+]
+
+if get_option('with_webkit')
+ libide_deps += [dependency('webkit2gtk-4.0', version: '>=2.12.0')]
+endif
+
+if get_option('with_editorconfig')
+ libide_args += '-DENABLE_EDITORCONFIG'
+ libide_deps += libeditorconfig_dep
+endif
+
libide = shared_library('ide-' + libide_api_version,
libide_resources + libide_icons_resources + libide_sources,
dependencies: libide_deps,
diff --git a/src/main.c b/src/main.c
index 8d69756..a9a8f79 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,6 +25,9 @@
#include "bug-buddy.h"
+/* Keep in sync with gnome-builder-plugins.c */
+extern void gnome_builder_plugins_init (void);
+
static IdeApplicationMode early_mode;
static gboolean
@@ -102,11 +105,21 @@ main (int argc,
IdeApplication *app;
int ret;
+ /* Setup our gdb fork()/exec() helper */
bug_buddy_init ();
+ /* Early init of logging so that we get messages in a consistent
+ * format. If we deferred this to GApplication, we'd get them in
+ * multiple formats.
+ */
ide_log_init (TRUE, NULL);
+
+ /* Extract options like -vvvv and --type=worker only */
early_params_check (&argc, &argv);
+ /* We might need to prime SSL environment and other bits before
+ * the application has had a chance to setup caches/etc.
+ */
early_ssl_check ();
g_message ("Initializing with Gtk+ version %d.%d.%d.",
@@ -129,11 +142,26 @@ main (int argc,
*/
g_type_ensure (G_TYPE_ZLIB_DECOMPRESSOR);
+ /* Setup the application instance */
app = ide_application_new ();
_ide_application_set_mode (app, early_mode);
+
+ /* Ensure that our static plugins init routine is called.
+ * This is necessary to ensure that -Wl,--as-needed does not
+ * drop our link to this shared library.
+ */
+ gnome_builder_plugins_init ();
+
+ /* Block until the application exits */
ret = g_application_run (G_APPLICATION (app), argc, argv);
+
+ /* Force disposal of the application (to help catch cleanup
+ * issues at shutdown) and then (hopefully) finalize the app.
+ */
+ g_object_run_dispose (G_OBJECT (app));
g_clear_object (&app);
+ /* Cleanup logging and flush anything that still needs it */
ide_log_shutdown ();
return ret;
diff --git a/src/meson.build b/src/meson.build
index f49e4ab..102b16b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -3,3 +3,21 @@ subdir('gstyle')
subdir('libide')
subdir('plugins')
subdir('tests')
+
+exe_link_args = [ '-pie' ]
+exe_c_args = [ '-fPIE' ]
+
+gnome_builder_sources = [
+ 'main.c',
+ 'bug-buddy.c',
+ 'bug-buddy.h',
+]
+
+executable('gnome-builder', gnome_builder_sources,
+ gui_app: true,
+ install: true,
+ c_args: exe_c_args,
+ link_args: exe_link_args,
+ install_rpath: pkglibdir_abs,
+ dependencies: gnome_builder_plugins_deps + [libide_dep, gnome_builder_plugins_dep],
+)
diff --git a/src/plugins/autotools/autotools-plugin.c b/src/plugins/autotools/autotools-plugin.c
index c1f94e7..5aa6c2a 100644
--- a/src/plugins/autotools/autotools-plugin.c
+++ b/src/plugins/autotools/autotools-plugin.c
@@ -25,7 +25,7 @@
#include "ide-autotools-project-miner.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_autotools_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_APPLICATION_ADDIN,
IDE_TYPE_AUTOTOOLS_APPLICATION_ADDIN);
peas_object_module_register_extension_type (module, IDE_TYPE_BUILD_PIPELINE_ADDIN,
IDE_TYPE_AUTOTOOLS_PIPELINE_ADDIN);
diff --git a/src/plugins/autotools/autotools.gresource.xml b/src/plugins/autotools/autotools.gresource.xml
new file mode 100644
index 0000000..0da868b
--- /dev/null
+++ b/src/plugins/autotools/autotools.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>autotools.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/autotools/autotools.plugin b/src/plugins/autotools/autotools.plugin
index 20cd9ac..0e77ccf 100644
--- a/src/plugins/autotools/autotools.plugin
+++ b/src/plugins/autotools/autotools.plugin
@@ -5,6 +5,6 @@ Description=Provides integration with the Autotools build system
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
-Hidden=true
+Embedded=ide_autotools_register_types
X-Project-File-Filter-Pattern=configure.ac,configure.in
X-Project-File-Filter-Name=Autotools Project (configure.ac)
diff --git a/src/plugins/autotools/meson.build b/src/plugins/autotools/meson.build
index 52049b1..c9b1c27 100644
--- a/src/plugins/autotools/meson.build
+++ b/src/plugins/autotools/meson.build
@@ -1,5 +1,11 @@
if get_option('with_autotools')
+autotools_resources = gnome.compile_resources(
+ 'ide-autotools-resources',
+ 'autotools.gresource.xml',
+ c_name: 'ide_autotools',
+)
+
autotools_sources = [
'autotools-plugin.c',
'ide-autotools-application-addin.c',
@@ -24,26 +30,7 @@ autotools_sources = [
'ide-makecache-target.h',
]
-make_exe_name = 'make'
-if find_program('gmake', required: false).found()
- make_exe_name = 'gmake'
-endif
-
-shared_module('autotools-plugin', autotools_sources,
- dependencies: plugin_deps,
- c_args: ['-DGNU_MAKE_NAME="@0@"'.format(make_exe_name)],
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'autotools.plugin',
- output: 'autotools.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(autotools_sources)
+gnome_builder_plugins_sources += autotools_resources[0]
endif
diff --git a/src/plugins/beautifier/beautifier.plugin b/src/plugins/beautifier/beautifier.plugin
index 9cc60c9..d30494d 100644
--- a/src/plugins/beautifier/beautifier.plugin
+++ b/src/plugins/beautifier/beautifier.plugin
@@ -6,3 +6,4 @@ Authors=Sébastien Lafargue <slafargue gnome org>
Copyright=Copyright © 2016 Sébastien Lafargue
Depends=editor
Builtin=true
+Embedded=gb_beautifier_register_types
diff --git a/src/plugins/beautifier/gb-beautifier-plugin.c b/src/plugins/beautifier/gb-beautifier-plugin.c
index 8745967..81dc4cf 100644
--- a/src/plugins/beautifier/gb-beautifier-plugin.c
+++ b/src/plugins/beautifier/gb-beautifier-plugin.c
@@ -22,7 +22,7 @@
#include "gb-beautifier-editor-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gb_beautifier_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_ADDIN,
diff --git a/src/plugins/beautifier/gb-beautifier.gresource.xml
b/src/plugins/beautifier/gb-beautifier.gresource.xml
index f5ec9f1..c1fb12f 100644
--- a/src/plugins/beautifier/gb-beautifier.gresource.xml
+++ b/src/plugins/beautifier/gb-beautifier.gresource.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/builder/plugins/beautifier_plugin">
+ <file>beautifier.plugin</file>
<file>gtk/menus.ui</file>
</gresource>
</gresources>
diff --git a/src/plugins/beautifier/meson.build b/src/plugins/beautifier/meson.build
index 3eea01a..6fa72b9 100644
--- a/src/plugins/beautifier/meson.build
+++ b/src/plugins/beautifier/meson.build
@@ -7,7 +7,6 @@ beautifier_resources = gnome.compile_resources(
)
beautifier_sources = [
- beautifier_resources,
'gb-beautifier-config.c',
'gb-beautifier-config.h',
'gb-beautifier-helper.c',
@@ -20,24 +19,11 @@ beautifier_sources = [
'gb-beautifier-editor-addin.h',
]
-beautifier_datadir = join_paths(get_option('prefix'), plugindatadir, 'beautifier_plugin')
-shared_module('beautifier_plugin', beautifier_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(beautifier_sources)
+gnome_builder_plugins_sources += beautifier_resources[0]
+beautifier_datadir = join_paths(get_option('prefix'), plugindatadir, 'beautifier_plugin')
install_subdir('beautifier_plugin/data', install_dir: beautifier_datadir)
install_subdir('beautifier_plugin/internal', install_dir: beautifier_datadir)
-configure_file(
- input: 'beautifier.plugin',
- output: 'beautifier.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
-
endif
diff --git a/src/plugins/c-pack/c-pack-plugin.c b/src/plugins/c-pack/c-pack-plugin.c
index 471caa0..1dd40bd 100644
--- a/src/plugins/c-pack/c-pack-plugin.c
+++ b/src/plugins/c-pack/c-pack-plugin.c
@@ -25,7 +25,7 @@ void _ide_c_indenter_register_type (GTypeModule *module);
void _ide_c_format_provider_register_type (GTypeModule *module);
void
-peas_register_types (PeasObjectModule *module)
+ide_c_pack_register_types (PeasObjectModule *module)
{
_ide_c_indenter_register_type (G_TYPE_MODULE (module));
_ide_c_format_provider_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/c-pack/c-pack.gresource.xml b/src/plugins/c-pack/c-pack.gresource.xml
new file mode 100644
index 0000000..b741794
--- /dev/null
+++ b/src/plugins/c-pack/c-pack.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>c-pack.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/c-pack/c-pack.plugin b/src/plugins/c-pack/c-pack.plugin
index ad71b54..7441e49 100644
--- a/src/plugins/c-pack/c-pack.plugin
+++ b/src/plugins/c-pack/c-pack.plugin
@@ -9,3 +9,4 @@ X-Indenter-Languages=c,chdr
X-Indenter-Languages-Priority=0
X-Completion-Provider-Languages=c,chdr
X-Completion-Provider-Languages-Priority=0
+Embedded=ide_c_pack_register_types
diff --git a/src/plugins/c-pack/meson.build b/src/plugins/c-pack/meson.build
index e34980b..87c8fbe 100644
--- a/src/plugins/c-pack/meson.build
+++ b/src/plugins/c-pack/meson.build
@@ -1,5 +1,11 @@
if get_option('with_c_pack')
+c_pack_resources = gnome.compile_resources(
+ 'c-pack-resources',
+ 'c-pack.gresource.xml',
+ c_name: 'ide_c',
+)
+
c_pack_sources = [
'c-pack-plugin.c',
'c-parse-helper.c',
@@ -10,20 +16,7 @@ c_pack_sources = [
'ide-c-format-provider.h',
]
-shared_module('c-pack-plugin', c_pack_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'c-pack.plugin',
- output: 'c-pack.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(c_pack_sources)
+gnome_builder_plugins_sources += c_pack_resources[0]
endif
diff --git a/src/plugins/clang/clang-plugin.c b/src/plugins/clang/clang-plugin.c
index 9347385..ae981c4 100644
--- a/src/plugins/clang/clang-plugin.c
+++ b/src/plugins/clang/clang-plugin.c
@@ -33,7 +33,7 @@
#include "ide-clang-translation-unit.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_clang_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_CODE_INDEXER,
diff --git a/src/plugins/clang/clang.gresource.xml b/src/plugins/clang/clang.gresource.xml
new file mode 100644
index 0000000..a2a3108
--- /dev/null
+++ b/src/plugins/clang/clang.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>clang.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/clang/clang.plugin b/src/plugins/clang/clang.plugin
index 1bdf2b1..b898b16 100644
--- a/src/plugins/clang/clang.plugin
+++ b/src/plugins/clang/clang.plugin
@@ -5,6 +5,7 @@ Description=Provides integration with Clang
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
+Embedded=ide_clang_register_types
X-Completion-Provider-Languages=c,chdr,cpp,cpphdr
X-Highlighter-Languages=c,chdr,cpp
X-Highlighter-Languages-Priority=100
diff --git a/src/plugins/clang/meson.build b/src/plugins/clang/meson.build
index 0af7e0c..6bdf713 100644
--- a/src/plugins/clang/meson.build
+++ b/src/plugins/clang/meson.build
@@ -1,5 +1,11 @@
if get_option('with_clang')
+clang_resources = gnome.compile_resources(
+ 'ide-clang-resources',
+ 'clang.gresource.xml',
+ c_name: 'ide_clang',
+)
+
clang_sources = [
'ide-clang-code-index-entries.c',
'ide-clang-code-index-entries.h',
@@ -58,24 +64,12 @@ if not cc.has_header('clang-c/Index.h', args: '-I' + clang_include)
endif
clang_dep = declare_dependency(
- dependencies: cc.find_library('libclang', dirs: clang_libdir),
+ dependencies: cc.find_library('libclang', dirs: clang_libdir),
include_directories: include_directories(clang_include),
)
-shared_module('clang-plugin', clang_sources,
- dependencies: plugin_deps + [clang_dep],
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'clang.plugin',
- output: 'clang.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_deps += [clang_dep]
+gnome_builder_plugins_sources += files(clang_sources)
+gnome_builder_plugins_sources += clang_resources[0]
endif
diff --git a/src/plugins/code-index/code-index-plugin.c b/src/plugins/code-index/code-index-plugin.c
index 8a7cc54..a0f2b8a 100644
--- a/src/plugins/code-index/code-index-plugin.c
+++ b/src/plugins/code-index/code-index-plugin.c
@@ -24,7 +24,7 @@
#include "ide-code-index-symbol-resolver.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_code_index_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_SERVICE,
diff --git a/src/plugins/code-index/code-index.gresource.xml b/src/plugins/code-index/code-index.gresource.xml
new file mode 100644
index 0000000..12fc75e
--- /dev/null
+++ b/src/plugins/code-index/code-index.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>code-index.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/code-index/code-index.plugin b/src/plugins/code-index/code-index.plugin
index c98b83a..33a7156 100644
--- a/src/plugins/code-index/code-index.plugin
+++ b/src/plugins/code-index/code-index.plugin
@@ -5,5 +5,6 @@ Description=Manages Code Index and does Global Search and Jump to Definition usi
Authors=Anoop Chandu <anoopchandu96 gmail com>
Copyright=Copyright © 2017 Anoop Chandu
Builtin=true
+Embedded=ide_code_index_register_types
X-Symbol-Resolver-Languages=c,chdr,cpp
X-Symbol-Resolver-Languages-Priority=200
diff --git a/src/plugins/code-index/meson.build b/src/plugins/code-index/meson.build
index 372b29f..e4b66e6 100644
--- a/src/plugins/code-index/meson.build
+++ b/src/plugins/code-index/meson.build
@@ -1,5 +1,11 @@
if get_option('with_code_index')
+code_index_resources = gnome.compile_resources(
+ 'ide-code-index-resources',
+ 'code-index.gresource.xml',
+ c_name: 'ide_code_index',
+)
+
code_index_sources = [
'code-index-plugin.c',
'ide-code-index-builder.c',
@@ -20,20 +26,7 @@ code_index_sources = [
'ide-persistent-map.h',
]
-shared_module('code-index-plugin', code_index_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'code-index.plugin',
- output: 'code-index.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(code_index_sources)
+gnome_builder_plugins_sources += code_index_resources[0]
endif
diff --git a/src/plugins/color-picker/color-picker.plugin b/src/plugins/color-picker/color-picker.plugin
index 9efb9fd..11fc624 100644
--- a/src/plugins/color-picker/color-picker.plugin
+++ b/src/plugins/color-picker/color-picker.plugin
@@ -6,3 +6,4 @@ Authors=Sébastien Lafargue <slafargue gnome org>
Copyright=Copyright © 2016 Sébastien Lafargue
Depends=editor
Builtin=true
+Embedded=gb_color_picker_register_types
diff --git a/src/plugins/color-picker/gb-color-picker-plugin.c
b/src/plugins/color-picker/gb-color-picker-plugin.c
index 181e053..b089b3d 100644
--- a/src/plugins/color-picker/gb-color-picker-plugin.c
+++ b/src/plugins/color-picker/gb-color-picker-plugin.c
@@ -23,7 +23,7 @@
#include "gb-color-picker-editor-view-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gb_color_picker_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_ADDIN,
diff --git a/src/plugins/color-picker/gb-color-picker.gresource.xml
b/src/plugins/color-picker/gb-color-picker.gresource.xml
index 69e8b98..c2139df 100644
--- a/src/plugins/color-picker/gb-color-picker.gresource.xml
+++ b/src/plugins/color-picker/gb-color-picker.gresource.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>color-picker.plugin</file>
+ </gresource>
+
<gresource prefix="/org/gnome/builder/plugins/color-picker-plugin">
<file>themes/Adwaita.css</file>
<file>themes/Adwaita-dark.css</file>
diff --git a/src/plugins/color-picker/meson.build b/src/plugins/color-picker/meson.build
index d9ffa05..198b4b5 100644
--- a/src/plugins/color-picker/meson.build
+++ b/src/plugins/color-picker/meson.build
@@ -25,32 +25,14 @@ color_picker_sources = [
'gb-color-picker-prefs-palette-row.c',
'gb-color-picker-prefs-palette-row.h',
'gb-color-picker-private.h',
- color_picker_resources[0],
]
-color_picker_deps = plugin_deps + [
- libgstyle_dep,
-]
-
-shared_module('color-picker-plugin', color_picker_sources,
- dependencies: color_picker_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
+gnome_builder_plugins_deps += [libgstyle_dep]
+gnome_builder_plugins_sources += files(color_picker_sources)
+gnome_builder_plugins_sources += color_picker_resources[0]
install_data('gsettings/org.gnome.builder.plugins.color_picker_plugin.gschema.xml',
install_dir: schema_dir,
)
-configure_file(
- input: 'color-picker.plugin',
- output: 'color-picker.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
-
endif
diff --git a/src/plugins/command-bar/command-bar.plugin b/src/plugins/command-bar/command-bar.plugin
index 68dfc79..48ea3d0 100644
--- a/src/plugins/command-bar/command-bar.plugin
+++ b/src/plugins/command-bar/command-bar.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
Hidden=true
+Embedded=gb_command_bar_register_types
diff --git a/src/plugins/command-bar/gb-command-bar.c b/src/plugins/command-bar/gb-command-bar.c
index 13f942d..61b8bd3 100644
--- a/src/plugins/command-bar/gb-command-bar.c
+++ b/src/plugins/command-bar/gb-command-bar.c
@@ -63,9 +63,8 @@ struct _GbCommandBar
static void workbench_addin_init (IdeWorkbenchAddinInterface *iface);
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (GbCommandBar, gb_command_bar, GTK_TYPE_REVEALER, 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (IDE_TYPE_WORKBENCH_ADDIN,
- workbench_addin_init))
+G_DEFINE_TYPE_EXTENDED (GbCommandBar, gb_command_bar, GTK_TYPE_REVEALER, 0,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_WORKBENCH_ADDIN, workbench_addin_init))
#define HISTORY_LENGTH 30
@@ -690,11 +689,6 @@ gb_command_bar_class_init (GbCommandBarClass *klass)
gtk_widget_class_bind_template_child (widget_class, GbCommandBar, flow_box);
}
-static void
-gb_command_bar_class_finalize (GbCommandBarClass *klass)
-{
-}
-
static const DzlShortcutEntry shortcuts[] = {
{ "org.gnome.builder.command-bar.show",
0, NULL,
@@ -762,11 +756,9 @@ workbench_addin_init (IdeWorkbenchAddinInterface *iface)
iface->unload = gb_command_bar_unload;
}
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
+void
+gb_command_bar_register_types (PeasObjectModule *module)
{
- gb_command_bar_register_type (G_TYPE_MODULE (module));
-
peas_object_module_register_extension_type (module,
IDE_TYPE_WORKBENCH_ADDIN,
GB_TYPE_COMMAND_BAR);
diff --git a/src/plugins/command-bar/gb-command-bar.gresource.xml
b/src/plugins/command-bar/gb-command-bar.gresource.xml
index d03d414..fbff576 100644
--- a/src/plugins/command-bar/gb-command-bar.gresource.xml
+++ b/src/plugins/command-bar/gb-command-bar.gresource.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>command-bar.plugin</file>
+ </gresource>
+
<gresource prefix="/org/gnome/builder/plugins/command-bar">
<file>gb-command-bar.ui</file>
<file>themes/shared.css</file>
diff --git a/src/plugins/command-bar/meson.build b/src/plugins/command-bar/meson.build
index 8431194..bee4fda 100644
--- a/src/plugins/command-bar/meson.build
+++ b/src/plugins/command-bar/meson.build
@@ -7,8 +7,6 @@ command_bar_resources = gnome.compile_resources(
)
command_bar_sources = [
- command_bar_resources[0],
- command_bar_resources[1],
'gb-command-bar.c',
'gb-command-bar.h',
'gb-command-gaction-provider.c',
@@ -31,25 +29,8 @@ command_bar_sources = [
'gb-vim.h',
]
-command_bar_deps = plugin_deps + [
- libgd_dep,
-]
-
-shared_module('command-bar', command_bar_sources,
- dependencies: command_bar_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
-
-configure_file(
- input: 'command-bar.plugin',
- output: 'command-bar.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_deps += [libgd_dep]
+gnome_builder_plugins_sources += files(command_bar_sources)
+gnome_builder_plugins_sources += command_bar_resources[0]
endif
diff --git a/src/plugins/comment-code/comment-code.plugin b/src/plugins/comment-code/comment-code.plugin
index 471314c..94a60f9 100644
--- a/src/plugins/comment-code/comment-code.plugin
+++ b/src/plugins/comment-code/comment-code.plugin
@@ -6,5 +6,6 @@ Authors=Sebastien Lafargue <slafargue gnome org>
Copyright=Copyright © 2016 Sebastien Lafargue
Builtin=true
Depends=editor
+Embedded=gbp_comment_code_register_types
X-Tool-Name=comment-code
X-Tool-Description=Comment code lines
diff --git a/src/plugins/comment-code/gbp-comment-code-plugin.c
b/src/plugins/comment-code/gbp-comment-code-plugin.c
index 5137a71..98cd8b8 100644
--- a/src/plugins/comment-code/gbp-comment-code-plugin.c
+++ b/src/plugins/comment-code/gbp-comment-code-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-comment-code-view-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_comment_code_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_VIEW_ADDIN,
diff --git a/src/plugins/comment-code/gbp-comment-code.gresource.xml
b/src/plugins/comment-code/gbp-comment-code.gresource.xml
index 5594a12..7358fec 100644
--- a/src/plugins/comment-code/gbp-comment-code.gresource.xml
+++ b/src/plugins/comment-code/gbp-comment-code.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>comment-code.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/comment-code-plugin">
<file>gtk/menus.ui</file>
</gresource>
diff --git a/src/plugins/comment-code/meson.build b/src/plugins/comment-code/meson.build
index 17f8f40..3c27211 100644
--- a/src/plugins/comment-code/meson.build
+++ b/src/plugins/comment-code/meson.build
@@ -10,23 +10,9 @@ comment_code_sources = [
'gbp-comment-code-plugin.c',
'gbp-comment-code-view-addin.c',
'gbp-comment-code-view-addin.h',
- comment_code_resources[0],
]
-shared_module('comment-code-plugin', comment_code_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'comment-code.plugin',
- output: 'comment-code.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(comment_code_sources)
+gnome_builder_plugins_sources += comment_code_resources[0]
endif
diff --git a/src/plugins/create-project/create-project.plugin
b/src/plugins/create-project/create-project.plugin
index 07c1e04..4bbb276 100644
--- a/src/plugins/create-project/create-project.plugin
+++ b/src/plugins/create-project/create-project.plugin
@@ -6,6 +6,7 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
Hidden=true
+Embedded=gbp_create_project_register_types
Depends=git-plugin
X-Tool-Name=create-project
X-Tool-Description=Create a new project
diff --git a/src/plugins/create-project/gbp-create-project-plugin.c
b/src/plugins/create-project/gbp-create-project-plugin.c
index 4c5d6b8..d721048 100644
--- a/src/plugins/create-project/gbp-create-project-plugin.c
+++ b/src/plugins/create-project/gbp-create-project-plugin.c
@@ -23,7 +23,7 @@
#include "gbp-create-project-tool.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_create_project_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_APPLICATION_TOOL,
diff --git a/src/plugins/create-project/gbp-create-project.gresource.xml
b/src/plugins/create-project/gbp-create-project.gresource.xml
index c26f02a..7c4b434 100644
--- a/src/plugins/create-project/gbp-create-project.gresource.xml
+++ b/src/plugins/create-project/gbp-create-project.gresource.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/builder/plugins/create-project-plugin">
+ <file>create-project.plugin</file>
+ </gresource>
+
+ <gresource prefix="/org/gnome/builder/plugins/create-project-plugin">
<file>gbp-create-project-widget.ui</file>
<file>gbp-create-project-template-icon.ui</file>
</gresource>
diff --git a/src/plugins/create-project/meson.build b/src/plugins/create-project/meson.build
index 685805c..bfd6371 100644
--- a/src/plugins/create-project/meson.build
+++ b/src/plugins/create-project/meson.build
@@ -16,23 +16,9 @@ create_project_sources = [
'gbp-create-project-tool.h',
'gbp-create-project-widget.c',
'gbp-create-project-widget.h',
- create_project_resources[0],
]
-shared_module('create-project-plugin', create_project_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'create-project.plugin',
- output: 'create-project.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(create_project_sources)
+gnome_builder_plugins_sources += create_project_resources[0]
endif
diff --git a/src/plugins/ctags/ctags-plugin.c b/src/plugins/ctags/ctags-plugin.c
index 7cbde47..9519c38 100644
--- a/src/plugins/ctags/ctags-plugin.c
+++ b/src/plugins/ctags/ctags-plugin.c
@@ -36,7 +36,7 @@ void _ide_ctags_service_register_type (GTypeModule *module);
void _ide_ctags_symbol_resolver_register_type (GTypeModule *module);
void
-peas_register_types (PeasObjectModule *module)
+ide_ctags_register_types (PeasObjectModule *module)
{
_ide_ctags_index_register_type (G_TYPE_MODULE (module));
_ide_ctags_completion_item_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/ctags/ctags.gresource.xml b/src/plugins/ctags/ctags.gresource.xml
new file mode 100644
index 0000000..6f6c91d
--- /dev/null
+++ b/src/plugins/ctags/ctags.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>ctags.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/ctags/ctags.plugin b/src/plugins/ctags/ctags.plugin
index b30963b..a9652c9 100644
--- a/src/plugins/ctags/ctags.plugin
+++ b/src/plugins/ctags/ctags.plugin
@@ -5,6 +5,7 @@ Description=Provides integration with Ctags for auto-completion and symbol resol
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
+Embedded=ide_ctags_register_types
X-Completion-Provider-Languages=c,cpp,chdr,cpphdr,python,python3,js,css,html,ruby
X-Highlighter-Languages=c,cpp,chdr,python,python3,js,css,html,ruby
X-Symbol-Resolver-Languages=c,cpp,chdr,python,python3,js,css,html,ruby
diff --git a/src/plugins/ctags/meson.build b/src/plugins/ctags/meson.build
index f2d9a62..20d1f27 100644
--- a/src/plugins/ctags/meson.build
+++ b/src/plugins/ctags/meson.build
@@ -1,5 +1,11 @@
if get_option('with_ctags')
+ctags_resources = gnome.compile_resources(
+ 'ctags-resources',
+ 'ctags.gresource.xml',
+ c_name: 'ide_ctags',
+)
+
ctags_sources = [
'ide-ctags-builder.c',
'ide-ctags-builder.h',
@@ -23,20 +29,7 @@ ctags_sources = [
'ctags-plugin.c',
]
-shared_module('ctags-plugin', ctags_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'ctags.plugin',
- output: 'ctags.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(ctags_sources)
+gnome_builder_plugins_sources += ctags_resources[0]
endif
diff --git a/src/plugins/devhelp/gbp-devhelp-resources.gresource.xml
b/src/plugins/devhelp/devhelp.gresource.xml
similarity index 77%
rename from src/plugins/devhelp/gbp-devhelp-resources.gresource.xml
rename to src/plugins/devhelp/devhelp.gresource.xml
index ac2eba0..0660faa 100644
--- a/src/plugins/devhelp/gbp-devhelp-resources.gresource.xml
+++ b/src/plugins/devhelp/devhelp.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>devhelp.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/devhelp-plugin">
<file>gtk/menus.ui</file>
<file>themes/shared.css</file>
diff --git a/src/plugins/devhelp/devhelp.plugin b/src/plugins/devhelp/devhelp.plugin
index d5d4359..4c2d2ef 100644
--- a/src/plugins/devhelp/devhelp.plugin
+++ b/src/plugins/devhelp/devhelp.plugin
@@ -4,5 +4,6 @@ Name=Devhelp
Description=Integration with devhelp documentation
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
-Depends=editor;webkit
+Depends=editor;webkit;
Builtin=true
+Embedded=gbp_devhelp_register_types
diff --git a/src/plugins/devhelp/gbp-devhelp-plugin.c b/src/plugins/devhelp/gbp-devhelp-plugin.c
index 627196c..be585de 100644
--- a/src/plugins/devhelp/gbp-devhelp-plugin.c
+++ b/src/plugins/devhelp/gbp-devhelp-plugin.c
@@ -25,7 +25,7 @@
#include "gbp-devhelp-layout-stack-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_devhelp_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_ADDIN,
diff --git a/src/plugins/devhelp/meson.build b/src/plugins/devhelp/meson.build
index 0c930f6..55e82c5 100644
--- a/src/plugins/devhelp/meson.build
+++ b/src/plugins/devhelp/meson.build
@@ -1,8 +1,8 @@
if get_option('with_devhelp')
devhelp_resources = gnome.compile_resources(
- 'gbp-devhelp-resources',
- 'gbp-devhelp-resources.gresource.xml',
+ 'devhelp-resources',
+ 'devhelp.gresource.xml',
c_name: 'gbp_devhelp',
)
@@ -23,29 +23,13 @@ devhelp_sources = [
'gbp-devhelp-search-private.h',
'gbp-devhelp-view.c',
'gbp-devhelp-view.h',
- devhelp_resources[0],
]
-devhelp_deps = plugin_deps + [
+gnome_builder_plugins_deps += [
dependency('libdevhelp-3.0', version: '>=3.25.1'),
- libgd_dep,
]
-shared_module('devhelp-plugin', devhelp_sources,
- dependencies: devhelp_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
-
-configure_file(
- input: 'devhelp.plugin',
- output: 'devhelp.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(devhelp_sources)
+gnome_builder_plugins_sources += devhelp_resources[0]
endif
diff --git a/src/plugins/documentation-card/documentation-card.gresource.xml
b/src/plugins/documentation-card/documentation-card.gresource.xml
new file mode 100644
index 0000000..5b1a95c
--- /dev/null
+++ b/src/plugins/documentation-card/documentation-card.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>documentation-card.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/documentation-card">
+ <file>gbp-documentation-card.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/documentation-card/documentation-card.plugin
b/src/plugins/documentation-card/documentation-card.plugin
index e0acc26..d877818 100644
--- a/src/plugins/documentation-card/documentation-card.plugin
+++ b/src/plugins/documentation-card/documentation-card.plugin
@@ -6,3 +6,4 @@ Authors=Lucie Charvat <luci charvat gmail com>
Copyright=Copyright © 2017 Lucie Charvat
Builtin=true
Depends=editor
+Embedded=gbp_documentation_card_register_types
diff --git a/src/plugins/documentation-card/gbp-documentation-card-plugin.c
b/src/plugins/documentation-card/gbp-documentation-card-plugin.c
index 1764925..a46af1b 100644
--- a/src/plugins/documentation-card/gbp-documentation-card-plugin.c
+++ b/src/plugins/documentation-card/gbp-documentation-card-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-documentation-card-view-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_documentation_card_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_VIEW_ADDIN,
diff --git a/src/plugins/documentation-card/meson.build b/src/plugins/documentation-card/meson.build
index 8e9b3ff..b4f565e 100644
--- a/src/plugins/documentation-card/meson.build
+++ b/src/plugins/documentation-card/meson.build
@@ -1,8 +1,8 @@
if get_option('with_documentation_card')
documentation_card_resources = gnome.compile_resources(
- 'gbp-documentation-card-resources',
- 'gbp-documentation-card-resources.gresource.xml',
+ 'documentation-card-resources',
+ 'documentation-card.gresource.xml',
c_name: 'gbp_documentation_card',
)
@@ -12,17 +12,9 @@ documentation_card_sources = [
'gbp-documentation-card-view-addin.c',
'gbp-documentation-card-view-addin.h',
'gbp-documentation-card-plugin.c',
- documentation_card_resources[0],
]
-shared_module('documentation-card-plugin', documentation_card_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-install_data('documentation-card.plugin', install_dir: plugindir)
+gnome_builder_plugins_sources += files(documentation_card_sources)
+gnome_builder_plugins_sources += documentation_card_resources[0]
endif
diff --git a/src/plugins/file-search/file-search.gresource.xml
b/src/plugins/file-search/file-search.gresource.xml
new file mode 100644
index 0000000..344062a
--- /dev/null
+++ b/src/plugins/file-search/file-search.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>file-search.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/file-search/file-search.plugin b/src/plugins/file-search/file-search.plugin
index 156866e..b356c43 100644
--- a/src/plugins/file-search/file-search.plugin
+++ b/src/plugins/file-search/file-search.plugin
@@ -1,8 +1,8 @@
[Plugin]
Module=file-search
Name=File Search
-Description=Search for files in the global search bar.
+Description=Search for files in the global search bar
Authors=Christian Hergert <christian hergert me>
-Copyright=Copyright © 2015 Christian Hergert
+Copyright=Copyright © 2015-2017 Christian Hergert
Builtin=true
-Hidden=true
+Embedded=gb_file_search_register_types
diff --git a/src/plugins/file-search/gb-file-search-provider.c
b/src/plugins/file-search/gb-file-search-provider.c
index e4b5659..2b04ecf 100644
--- a/src/plugins/file-search/gb-file-search-provider.c
+++ b/src/plugins/file-search/gb-file-search-provider.c
@@ -341,7 +341,7 @@ search_provider_iface_init (IdeSearchProviderInterface *iface)
}
void
-peas_register_types (PeasObjectModule *module)
+gb_file_search_register_types (PeasObjectModule *module)
{
gb_file_search_provider_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/file-search/meson.build b/src/plugins/file-search/meson.build
index 24e1ec3..aa32604 100644
--- a/src/plugins/file-search/meson.build
+++ b/src/plugins/file-search/meson.build
@@ -1,5 +1,11 @@
if get_option('with_file_search')
+file_search_resources = gnome.compile_resources(
+ 'file-search-resources',
+ 'file-search.gresource.xml',
+ c_name: 'gb_file_search',
+)
+
file_search_sources = [
'gb-file-search-provider.c',
'gb-file-search-provider.h',
@@ -9,20 +15,7 @@ file_search_sources = [
'gb-file-search-index.h',
]
-shared_module('file-search', file_search_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'file-search.plugin',
- output: 'file-search.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(file_search_sources)
+gnome_builder_plugins_sources += file_search_resources[0]
endif
diff --git a/src/plugins/flatpak/gbp-flatpak-resources.gresource.xml
b/src/plugins/flatpak/flatpak.gresource.xml
similarity index 69%
rename from src/plugins/flatpak/gbp-flatpak-resources.gresource.xml
rename to src/plugins/flatpak/flatpak.gresource.xml
index 7fba1b1..493fa41 100644
--- a/src/plugins/flatpak/gbp-flatpak-resources.gresource.xml
+++ b/src/plugins/flatpak/flatpak.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>flatpak.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/flatpak-plugin">
<file>gtk/menus.ui</file>
<file>gbp-flatpak-clone-widget.ui</file>
diff --git a/src/plugins/flatpak/flatpak.plugin b/src/plugins/flatpak/flatpak.plugin
index 4f11f19..1116a33 100644
--- a/src/plugins/flatpak/flatpak.plugin
+++ b/src/plugins/flatpak/flatpak.plugin
@@ -5,4 +5,5 @@ Description=Provides support for building with Flatpak
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2016 Christian Hergert
Builtin=true
-Depends=git-plugin
+Depends=git-plugin;
+Embedded=gbp_flatpak_register_types
diff --git a/src/plugins/flatpak/gbp-flatpak-plugin.c b/src/plugins/flatpak/gbp-flatpak-plugin.c
index 7ed481a..7453a5d 100644
--- a/src/plugins/flatpak/gbp-flatpak-plugin.c
+++ b/src/plugins/flatpak/gbp-flatpak-plugin.c
@@ -29,7 +29,7 @@
#include "gbp-flatpak-workbench-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_flatpak_register_types (PeasObjectModule *module)
{
ide_vcs_register_ignored (".flatpak-builder");
diff --git a/src/plugins/flatpak/meson.build b/src/plugins/flatpak/meson.build
index b43c60c..5449c81 100644
--- a/src/plugins/flatpak/meson.build
+++ b/src/plugins/flatpak/meson.build
@@ -1,13 +1,12 @@
if get_option('with_flatpak')
-flatpak_res = gnome.compile_resources(
- 'gbp-flatpak-resources',
- 'gbp-flatpak-resources.gresource.xml',
+flatpak_resources = gnome.compile_resources(
+ 'flatpak-resources',
+ 'flatpak.gresource.xml',
c_name: 'gbp_flatpak'
)
flatpak_sources = [
- flatpak_res,
'gbp-flatpak-application-addin.c',
'gbp-flatpak-application-addin.h',
'gbp-flatpak-build-system-discovery.c',
@@ -43,30 +42,13 @@ flatpak_sources = [
'gbp-flatpak-workbench-addin.h',
]
-
-
-flatpak_deps = plugin_deps + [
+gnome_builder_plugins_deps += [
dependency('flatpak', version: '>= 0.8.0'),
dependency('libsoup-2.4', version: '>= 2.52.0'),
libgit_dep,
]
-# FIXME: Check for libgit thread and ssh support
-
-shared_module('flatpak-plugin', flatpak_sources,
- dependencies: flatpak_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'flatpak.plugin',
- output: 'flatpak.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(flatpak_sources)
+gnome_builder_plugins_sources += flatpak_resources[0]
endif
diff --git a/src/plugins/gcc/gbp-gcc-plugin.c b/src/plugins/gcc/gbp-gcc-plugin.c
index d3ea3b2..7ce2c2c 100644
--- a/src/plugins/gcc/gbp-gcc-plugin.c
+++ b/src/plugins/gcc/gbp-gcc-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-gcc-pipeline-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_gcc_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_BUILD_PIPELINE_ADDIN,
GBP_TYPE_GCC_PIPELINE_ADDIN);
}
diff --git a/src/plugins/gcc/gcc.gresource.xml b/src/plugins/gcc/gcc.gresource.xml
new file mode 100644
index 0000000..f9b9c60
--- /dev/null
+++ b/src/plugins/gcc/gcc.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>gcc.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/gcc/gcc.plugin b/src/plugins/gcc/gcc.plugin
index b464cf0..e6b8fea 100644
--- a/src/plugins/gcc/gcc.plugin
+++ b/src/plugins/gcc/gcc.plugin
@@ -4,4 +4,5 @@ Name=GCC
Description=Provides various GCC integration hooks
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
+Embedded=gbp_gcc_register_types
Builtin=true
diff --git a/src/plugins/gcc/meson.build b/src/plugins/gcc/meson.build
index 8d6f930..648dc41 100644
--- a/src/plugins/gcc/meson.build
+++ b/src/plugins/gcc/meson.build
@@ -1,25 +1,18 @@
if get_option('with_gcc')
+gcc_resources = gnome.compile_resources(
+ 'gcc-resources',
+ 'gcc.gresource.xml',
+ c_name: 'gbp_gcc',
+)
+
gcc_sources = [
'gbp-gcc-pipeline-addin.c',
'gbp-gcc-pipeline-addin.h',
'gbp-gcc-plugin.c',
]
-shared_module('gcc-plugin', gcc_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'gcc.plugin',
- output: 'gcc.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(gcc_sources)
+gnome_builder_plugins_sources += gcc_resources[0]
endif
diff --git a/src/plugins/gdb/gbp-gdb-plugin.c b/src/plugins/gdb/gbp-gdb-plugin.c
index ccf7c17..d621314 100644
--- a/src/plugins/gdb/gbp-gdb-plugin.c
+++ b/src/plugins/gdb/gbp-gdb-plugin.c
@@ -21,7 +21,7 @@
#include "gbp-gdb-debugger.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_gdb_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_DEBUGGER, GBP_TYPE_GDB_DEBUGGER);
}
diff --git a/src/plugins/gdb/gdb.gresource.xml b/src/plugins/gdb/gdb.gresource.xml
new file mode 100644
index 0000000..a899d1f
--- /dev/null
+++ b/src/plugins/gdb/gdb.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>gdb.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/gdb/gdb.plugin b/src/plugins/gdb/gdb.plugin
index f7544dd..7912ab2 100644
--- a/src/plugins/gdb/gdb.plugin
+++ b/src/plugins/gdb/gdb.plugin
@@ -4,6 +4,7 @@ Name=Gdb
Description=Provides integration with the GNU Debugger
Authors=Christian Hergert <chergert redhat com>
Copyright=Copyright © 2017 Christian Hergert
-Depends=debugger;editor;terminal
+Depends=debugger;editor;terminal;
Builtin=true
+Embedded=gbp_gdb_register_types
X-Debugger-Languages=c,chdr,cpp,cpphdr,fortran,rust,vala
diff --git a/src/plugins/gdb/meson.build b/src/plugins/gdb/meson.build
index 8a363c7..f7d044e 100644
--- a/src/plugins/gdb/meson.build
+++ b/src/plugins/gdb/meson.build
@@ -1,5 +1,11 @@
if get_option('with_gdb')
+gdb_resources = gnome.compile_resources(
+ 'gdb-resources',
+ 'gdb.gresource.xml',
+ c_name: 'gbp_gdb',
+)
+
gdb_sources = [
'gbp-gdb-debugger.c',
'gbp-gdb-debugger.h',
@@ -8,14 +14,7 @@ gdb_sources = [
'gdbwire.h',
]
-shared_module('gdb-plugin', gdb_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-install_data('gdb.plugin', install_dir: plugindir)
+gnome_builder_plugins_sources += files(gdb_sources)
+gnome_builder_plugins_sources += gdb_resources[0]
endif
diff --git a/src/plugins/gettext/gettext-plugin.c b/src/plugins/gettext/gettext-plugin.c
index f5eda57..e5e772e 100644
--- a/src/plugins/gettext/gettext-plugin.c
+++ b/src/plugins/gettext/gettext-plugin.c
@@ -22,7 +22,7 @@
#include "ide-gettext-diagnostic-provider.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_gettext_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_DIAGNOSTIC_PROVIDER,
diff --git a/src/plugins/gettext/gettext.gresource.xml b/src/plugins/gettext/gettext.gresource.xml
new file mode 100644
index 0000000..a4326d6
--- /dev/null
+++ b/src/plugins/gettext/gettext.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>gettext.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/gettext/gettext.plugin b/src/plugins/gettext/gettext.plugin
index e6094cc..b84ab84 100644
--- a/src/plugins/gettext/gettext.plugin
+++ b/src/plugins/gettext/gettext.plugin
@@ -5,5 +5,6 @@ Description=Provides integration with Gettext
Authors=Daiki Ueno
Copyright=Copyright © 2016 Daiki Ueno
Builtin=true
+Embedded=ide_gettext_register_types
X-Diagnostic-Provider-Languages=c,chdr,cpp,js,python,vala
X-Diagnostic-Provider-Languages-Priority=100
diff --git a/src/plugins/gettext/meson.build b/src/plugins/gettext/meson.build
index 841f522..6bcf45e 100644
--- a/src/plugins/gettext/meson.build
+++ b/src/plugins/gettext/meson.build
@@ -1,25 +1,18 @@
if get_option('with_gettext')
+gettext_resources = gnome.compile_resources(
+ 'gettext-resources',
+ 'gettext.gresource.xml',
+ c_name: 'ide_gettext',
+)
+
gettext_sources = [
'ide-gettext-diagnostic-provider.c',
'ide-gettext-diagnostic-provider.h',
'gettext-plugin.c',
]
-shared_module('gettext-plugin', gettext_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'gettext.plugin',
- output: 'gettext.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(gettext_sources)
+gnome_builder_plugins_sources += gettext_resources[0]
endif
diff --git a/src/plugins/git/ide-git-resources.gresource.xml b/src/plugins/git/git.gresource.xml
similarity index 70%
rename from src/plugins/git/ide-git-resources.gresource.xml
rename to src/plugins/git/git.gresource.xml
index adf94aa..c5c3a8d 100644
--- a/src/plugins/git/ide-git-resources.gresource.xml
+++ b/src/plugins/git/git.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>git.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/git-plugin">
<file>ide-git-clone-widget.ui</file>
<file>themes/shared.css</file>
diff --git a/src/plugins/git/git.plugin b/src/plugins/git/git.plugin
index b399d01..040eca3 100644
--- a/src/plugins/git/git.plugin
+++ b/src/plugins/git/git.plugin
@@ -5,4 +5,4 @@ Description=Provides support for the Git version control system
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
-Hidden=true
+Embedded=ide_git_register_types
diff --git a/src/plugins/git/ide-git-plugin.c b/src/plugins/git/ide-git-plugin.c
index a33b0fb..ff323bb 100644
--- a/src/plugins/git/ide-git-plugin.c
+++ b/src/plugins/git/ide-git-plugin.c
@@ -51,7 +51,7 @@ register_ggit (void)
void
-peas_register_types (PeasObjectModule *module)
+ide_git_register_types (PeasObjectModule *module)
{
if (register_ggit ())
{
diff --git a/src/plugins/git/meson.build b/src/plugins/git/meson.build
index 6fe4d68..fdd9499 100644
--- a/src/plugins/git/meson.build
+++ b/src/plugins/git/meson.build
@@ -1,8 +1,8 @@
if get_option('with_git')
git_resources = gnome.compile_resources(
- 'ide-git-resources',
- 'ide-git-resources.gresource.xml',
+ 'git-resources',
+ 'git.gresource.xml',
c_name: 'ide_git',
)
@@ -22,27 +22,13 @@ git_sources = [
'ide-git-vcs-config.h',
'ide-git-vcs-initializer.c',
'ide-git-vcs-initializer.h',
- git_resources[0],
]
-git_deps = plugin_deps + [
+gnome_builder_plugins_deps += [
libgit_dep,
]
-shared_module('git-plugin', git_sources,
- dependencies: git_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'git.plugin',
- output: 'git.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(git_sources)
+gnome_builder_plugins_sources += git_resources[0]
endif
diff --git a/src/plugins/gnome-builder-plugins.c b/src/plugins/gnome-builder-plugins.c
new file mode 100644
index 0000000..fc50b97
--- /dev/null
+++ b/src/plugins/gnome-builder-plugins.c
@@ -0,0 +1,8 @@
+void
+gnome_builder_plugins_init (void)
+{
+ /* This function is a dummy function that is exported so that
+ * we can ensure that --as-needed does not drop linking against
+ * this particular shared library.
+ */
+}
diff --git a/src/plugins/gnome-code-assistance/gca-plugin.c b/src/plugins/gnome-code-assistance/gca-plugin.c
index 5300e35..47473d5 100644
--- a/src/plugins/gnome-code-assistance/gca-plugin.c
+++ b/src/plugins/gnome-code-assistance/gca-plugin.c
@@ -24,7 +24,7 @@
#include "ide-gca-service.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_gca_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_SERVICE,
diff --git a/src/plugins/gnome-code-assistance/gnome-code-assistance.gresource.xml
b/src/plugins/gnome-code-assistance/gnome-code-assistance.gresource.xml
new file mode 100644
index 0000000..bb51658
--- /dev/null
+++ b/src/plugins/gnome-code-assistance/gnome-code-assistance.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>gnome-code-assistance.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/gnome-code-assistance/gnome-code-assistance.plugin
b/src/plugins/gnome-code-assistance/gnome-code-assistance.plugin
index 5560fad..dd19ffc 100644
--- a/src/plugins/gnome-code-assistance/gnome-code-assistance.plugin
+++ b/src/plugins/gnome-code-assistance/gnome-code-assistance.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
X-Diagnostic-Provider-Languages=css,html,js,json,python,python3,ruby,scss,sh,xml
+Embedded=ide_gca_register_types
diff --git a/src/plugins/gnome-code-assistance/ide-gca-diagnostic-provider.c
b/src/plugins/gnome-code-assistance/ide-gca-diagnostic-provider.c
index 2c88338..a38a9d6 100644
--- a/src/plugins/gnome-code-assistance/ide-gca-diagnostic-provider.c
+++ b/src/plugins/gnome-code-assistance/ide-gca-diagnostic-provider.c
@@ -18,11 +18,11 @@
#define G_LOG_DOMAIN "ide-gca-diagnostic-provider"
-#include <gca-diagnostics.h>
#include <glib/gi18n.h>
#include "ide-internal.h"
+#include "gca-diagnostics.h"
#include "ide-gca-diagnostic-provider.h"
#include "ide-gca-service.h"
diff --git a/src/plugins/gnome-code-assistance/ide-gca-service.c
b/src/plugins/gnome-code-assistance/ide-gca-service.c
index bfba54d..597ef01 100644
--- a/src/plugins/gnome-code-assistance/ide-gca-service.c
+++ b/src/plugins/gnome-code-assistance/ide-gca-service.c
@@ -18,7 +18,6 @@
#define G_LOG_DOMAIN "ide-gca-service"
-#include <gca-service.h>
#include <glib/gi18n.h>
#include "ide-gca-service.h"
diff --git a/src/plugins/gnome-code-assistance/ide-gca-service.h
b/src/plugins/gnome-code-assistance/ide-gca-service.h
index d35a383..265cc3e 100644
--- a/src/plugins/gnome-code-assistance/ide-gca-service.h
+++ b/src/plugins/gnome-code-assistance/ide-gca-service.h
@@ -19,8 +19,7 @@
#ifndef IDE_GCA_SERVICE_H
#define IDE_GCA_SERVICE_H
-#include <gca-service.h>
-
+#include "gca-service.h"
#include "ide-service.h"
G_BEGIN_DECLS
diff --git a/src/plugins/gnome-code-assistance/meson.build b/src/plugins/gnome-code-assistance/meson.build
index 44d4ba6..fee9b7a 100644
--- a/src/plugins/gnome-code-assistance/meson.build
+++ b/src/plugins/gnome-code-assistance/meson.build
@@ -1,6 +1,12 @@
if get_option('with_gnome_code_assistance')
-gnome_code_assistance_sources = [
+gca_resources = gnome.compile_resources(
+ 'gca-resources',
+ 'gnome-code-assistance.gresource.xml',
+ c_name: 'ide_gca',
+)
+
+gca_sources = [
'gca-diagnostics.c',
'gca-diagnostics.h',
'gca-service.c',
@@ -16,21 +22,8 @@ gnome_code_assistance_sources = [
'ide-gca-service.h',
]
-shared_module('gnome-code-assistance-plugin', gnome_code_assistance_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'gnome-code-assistance.plugin',
- output: 'gnome-code-assistance.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(gca_sources)
+gnome_builder_plugins_sources += gca_resources[0]
install_data('org.gnome.builder.gnome-code-assistance.gschema.xml',
install_dir: schema_dir)
diff --git a/src/plugins/history/gbp-history-plugin.c b/src/plugins/history/gbp-history-plugin.c
index 77bea6c..69e0ec5 100644
--- a/src/plugins/history/gbp-history-plugin.c
+++ b/src/plugins/history/gbp-history-plugin.c
@@ -23,7 +23,7 @@
#include "gbp-history-layout-stack-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_history_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_VIEW_ADDIN,
diff --git a/src/plugins/history/history.gresource.xml b/src/plugins/history/history.gresource.xml
new file mode 100644
index 0000000..fdb0a5e
--- /dev/null
+++ b/src/plugins/history/history.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>history.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/history/history.plugin b/src/plugins/history/history.plugin
index eca9f73..a547cbf 100644
--- a/src/plugins/history/history.plugin
+++ b/src/plugins/history/history.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2017 Christian Hergert
Depends=editor
Builtin=true
+Embedded=gbp_history_register_types
diff --git a/src/plugins/history/meson.build b/src/plugins/history/meson.build
index c856566..6c58e54 100644
--- a/src/plugins/history/meson.build
+++ b/src/plugins/history/meson.build
@@ -1,5 +1,11 @@
if get_option('with_history')
+history_resources = gnome.compile_resources(
+ 'history-resources',
+ 'history.gresource.xml',
+ c_name: 'gbp_history',
+)
+
history_sources = [
'gbp-history-layout-stack-addin.c',
'gbp-history-layout-stack-addin.h',
@@ -10,21 +16,7 @@ history_sources = [
'gbp-history-plugin.c',
]
-shared_module('history-plugin', history_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
-
-configure_file(
- input: 'history.plugin',
- output: 'history.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(history_sources)
+gnome_builder_plugins_sources += history_resources[0]
endif
diff --git a/src/plugins/html-completion/html-completion.gresource.xml
b/src/plugins/html-completion/html-completion.gresource.xml
new file mode 100644
index 0000000..cadc563
--- /dev/null
+++ b/src/plugins/html-completion/html-completion.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>html-completion.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/html-completion/html-completion.plugin
b/src/plugins/html-completion/html-completion.plugin
index 417bca9..4d2ee10 100644
--- a/src/plugins/html-completion/html-completion.plugin
+++ b/src/plugins/html-completion/html-completion.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
X-Completion-Provider-Languages=asp,dtl,html,php
+Embedded=ide_html_completion_register_types
diff --git a/src/plugins/html-completion/ide-html-completion-provider.c
b/src/plugins/html-completion/ide-html-completion-provider.c
index d2edded..9b1159d 100644
--- a/src/plugins/html-completion/ide-html-completion-provider.c
+++ b/src/plugins/html-completion/ide-html-completion-provider.c
@@ -909,7 +909,7 @@ completion_provider_init (GtkSourceCompletionProviderIface *iface)
}
void
-peas_register_types (PeasObjectModule *module)
+ide_html_completion_register_types (PeasObjectModule *module)
{
ide_html_completion_provider_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/html-completion/meson.build b/src/plugins/html-completion/meson.build
index f40dbe0..4520bd6 100644
--- a/src/plugins/html-completion/meson.build
+++ b/src/plugins/html-completion/meson.build
@@ -1,24 +1,17 @@
if get_option('with_html_completion')
+html_completion_resources = gnome.compile_resources(
+ 'html-completion-resources',
+ 'html-completion.gresource.xml',
+ c_name: 'gbp_html_completion',
+)
+
html_completion_sources = [
'ide-html-completion-provider.c',
'ide-html-completion-provider.h',
]
-shared_module('html-completion-plugin', html_completion_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'html-completion.plugin',
- output: 'html-completion.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(html_completion_sources)
+gnome_builder_plugins_sources += html_completion_resources[0]
endif
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 4f9f9e5..300ef1d 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -1,13 +1,14 @@
plugindir = join_paths(get_option('libdir'), 'gnome-builder/plugins')
plugindatadir = join_paths(get_option('datadir'), 'gnome-builder/plugins')
-plugin_deps = [
- libpeas_dep,
- libide_plugin_dep,
-]
-plugin_link_deps = join_paths(meson.current_source_dir(), 'plugins.map')
-plugin_link_args = [
- '-Wl,--version-script,' + plugin_link_deps,
+gnome_builder_plugins_sources = ['gnome-builder-plugins.c']
+gnome_builder_plugins_args = []
+gnome_builder_plugins_deps = [libpeas_dep, libide_plugin_dep, libide_dep]
+gnome_builder_plugins_link_with = []
+gnome_builder_plugins_link_whole = []
+gnome_builder_plugins_link_deps = join_paths(meson.current_source_dir(), 'plugins.map')
+gnome_builder_plugins_link_args = [
+ '-Wl,--version-script,' + gnome_builder_plugins_link_deps,
]
subdir('autotools')
@@ -66,6 +67,26 @@ subdir('vala-pack')
subdir('valgrind')
subdir('xml-pack')
+gnome_builder_plugins = shared_library(
+ 'gnome-builder-plugins',
+ gnome_builder_plugins_sources,
+
+ dependencies: gnome_builder_plugins_deps,
+ link_depends: 'plugins.map',
+ c_args: gnome_builder_plugins_args,
+ link_args: gnome_builder_plugins_link_args,
+ link_with: gnome_builder_plugins_link_with,
+ install: true,
+ install_dir: pkglibdir,
+ install_rpath: pkglibdir_abs,
+)
+
+gnome_builder_plugins_dep = declare_dependency(
+ dependencies: libide_deps,
+ link_with: gnome_builder_plugins_link_with + [gnome_builder_plugins],
+ link_whole: gnome_builder_plugins_link_whole,
+)
+
status += [
'Plugins:',
'',
diff --git a/src/plugins/mingw/meson.build b/src/plugins/mingw/meson.build
index 7821666..9cdaa20 100644
--- a/src/plugins/mingw/meson.build
+++ b/src/plugins/mingw/meson.build
@@ -1,5 +1,11 @@
if get_option('with_mingw')
+mingw_resources = gnome.compile_resources(
+ 'mingw-resources',
+ 'mingw.gresource.xml',
+ c_name: 'ide_mingw',
+)
+
mingw_sources = [
'mingw-plugin.c',
'ide-mingw-device.c',
@@ -8,20 +14,7 @@ mingw_sources = [
'ide-mingw-device-provider.h',
]
-shared_module('mingw-plugin', mingw_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'mingw.plugin',
- output: 'mingw.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(mingw_sources)
+gnome_builder_plugins_sources += mingw_resources[0]
endif
diff --git a/src/plugins/mingw/mingw-plugin.c b/src/plugins/mingw/mingw-plugin.c
index 4cae607..64b37bb 100644
--- a/src/plugins/mingw/mingw-plugin.c
+++ b/src/plugins/mingw/mingw-plugin.c
@@ -25,7 +25,7 @@ void _ide_mingw_device_provider_register_type (GTypeModule *module);
void _ide_mingw_device_register_type (GTypeModule *module);
void
-peas_register_types (PeasObjectModule *module)
+ide_mingw_register_types (PeasObjectModule *module)
{
_ide_mingw_device_provider_register_type (G_TYPE_MODULE (module));
_ide_mingw_device_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/mingw/mingw.gresource.xml b/src/plugins/mingw/mingw.gresource.xml
new file mode 100644
index 0000000..3b98430
--- /dev/null
+++ b/src/plugins/mingw/mingw.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>mingw.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/mingw/mingw.plugin b/src/plugins/mingw/mingw.plugin
index 945fdf8..4fcd2c7 100644
--- a/src/plugins/mingw/mingw.plugin
+++ b/src/plugins/mingw/mingw.plugin
@@ -5,3 +5,4 @@ Description=Provides cross-compilation support using MinGW
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
+Embedded=ide_mingw_register_types
diff --git a/src/plugins/notification/ide-notification-plugin.c
b/src/plugins/notification/ide-notification-plugin.c
index 0a64bff..54f69b6 100644
--- a/src/plugins/notification/ide-notification-plugin.c
+++ b/src/plugins/notification/ide-notification-plugin.c
@@ -22,7 +22,7 @@
#include "ide-notification-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_notification_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_BUILD_PIPELINE_ADDIN,
IDE_TYPE_NOTIFICATION_ADDIN);
}
diff --git a/src/plugins/notification/meson.build b/src/plugins/notification/meson.build
index 5445df5..a306847 100644
--- a/src/plugins/notification/meson.build
+++ b/src/plugins/notification/meson.build
@@ -1,25 +1,18 @@
if get_option('with_notification')
+notification_resources = gnome.compile_resources(
+ 'notification-resources',
+ 'notification.gresource.xml',
+ c_name: 'ide_notification',
+)
+
notification_sources = [
'ide-notification-plugin.c',
'ide-notification-addin.c',
'ide-notification-addin.h',
]
-shared_module('notification-plugin', notification_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'notification.plugin',
- output: 'notification.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(notification_sources)
+gnome_builder_plugins_sources += notification_resources[0]
endif
diff --git a/src/plugins/notification/notification.gresource.xml
b/src/plugins/notification/notification.gresource.xml
new file mode 100644
index 0000000..a4906c6
--- /dev/null
+++ b/src/plugins/notification/notification.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>notification.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/notification/notification.plugin b/src/plugins/notification/notification.plugin
index 143ad1b..3f1f0c7 100644
--- a/src/plugins/notification/notification.plugin
+++ b/src/plugins/notification/notification.plugin
@@ -5,3 +5,4 @@ Description=Notification of progress when Builder application is not on foregrou
Authors=Lucie Charvat <luci charvat gmail com>
Copyright=Copyright © 2017 Lucie Charvat
Builtin=true
+Embedded=ide_notification_register_types
diff --git a/src/plugins/plugins.map b/src/plugins/plugins.map
index cc1cad7..d8aee5c 100644
--- a/src/plugins/plugins.map
+++ b/src/plugins/plugins.map
@@ -1,6 +1,7 @@
{
global:
- peas_register_types;
+ gnome_builder_plugins_init;
+ *_register_types;
local:
*;
};
diff --git a/src/plugins/project-tree/meson.build b/src/plugins/project-tree/meson.build
index 8e1ee12..ac178a6 100644
--- a/src/plugins/project-tree/meson.build
+++ b/src/plugins/project-tree/meson.build
@@ -1,14 +1,12 @@
if get_option('with_project_tree')
project_tree_resources = gnome.compile_resources(
- 'gb-project-tree-resources',
- 'gb-project-tree.gresource.xml',
+ 'project-tree-resources',
+ 'project-tree.gresource.xml',
c_name: 'gb_project_tree',
)
project_tree_sources = [
- project_tree_resources[0],
- project_tree_resources[1],
'gb-new-file-popover.c',
'gb-new-file-popover.h',
'gb-project-file.c',
@@ -30,31 +28,12 @@ project_tree_sources = [
'project-tree-plugin.c',
]
-project_tree_deps = plugin_deps
-project_tree_cflags = []
-
if get_option('with_terminal')
-
-project_tree_deps += dependency('vte-2.91', version: '>=0.40.2')
-project_tree_cflags += '-DHAVE_VTE'
-
+ gnome_builder_plugins_deps += dependency('vte-2.91', version: '>=0.40.2')
+ gnome_builder_plugins_args += '-DHAVE_VTE'
endif
-shared_module('project-tree-plugin', project_tree_sources,
- dependencies: project_tree_deps,
- c_args: project_tree_cflags,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'project-tree.plugin',
- output: 'project-tree.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(project_tree_sources)
+gnome_builder_plugins_sources += project_tree_resources[0]
endif
diff --git a/src/plugins/project-tree/project-tree-plugin.c b/src/plugins/project-tree/project-tree-plugin.c
index baefa26..3a543e9 100644
--- a/src/plugins/project-tree/project-tree-plugin.c
+++ b/src/plugins/project-tree/project-tree-plugin.c
@@ -23,7 +23,7 @@
#include "gb-project-tree-editor-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gb_project_tree_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_WORKBENCH_ADDIN,
diff --git a/src/plugins/project-tree/gb-project-tree.gresource.xml
b/src/plugins/project-tree/project-tree.gresource.xml
similarity index 74%
rename from src/plugins/project-tree/gb-project-tree.gresource.xml
rename to src/plugins/project-tree/project-tree.gresource.xml
index f7d3512..0c6b165 100644
--- a/src/plugins/project-tree/gb-project-tree.gresource.xml
+++ b/src/plugins/project-tree/project-tree.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>project-tree.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/project-tree-plugin">
<file>gb-new-file-popover.ui</file>
<file>gb-rename-file-popover.ui</file>
diff --git a/src/plugins/project-tree/project-tree.plugin b/src/plugins/project-tree/project-tree.plugin
index edd378b..c8dd44a 100644
--- a/src/plugins/project-tree/project-tree.plugin
+++ b/src/plugins/project-tree/project-tree.plugin
@@ -7,3 +7,4 @@ Copyright=Copyright © 2015 Christian Hergert
Depends=editor
Builtin=true
Hidden=true
+Embedded=gb_project_tree_register_types
diff --git a/src/plugins/python-pack/meson.build b/src/plugins/python-pack/meson.build
index 6e728e2..1aef9eb 100644
--- a/src/plugins/python-pack/meson.build
+++ b/src/plugins/python-pack/meson.build
@@ -1,5 +1,11 @@
if get_option('with_python_pack')
+python_pack_resources = gnome.compile_resources(
+ 'python-pack-resources',
+ 'python-pack.gresource.xml',
+ c_name: 'ide_python_pack',
+)
+
python_pack_sources = [
'ide-python-indenter.c',
'ide-python-indenter.h',
@@ -8,20 +14,7 @@ python_pack_sources = [
'python-pack-plugin.c',
]
-shared_module('python-pack-plugin', python_pack_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'python-pack.plugin',
- output: 'python-pack.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(python_pack_sources)
+gnome_builder_plugins_sources += python_pack_resources[0]
endif
diff --git a/src/plugins/python-pack/python-pack-plugin.c b/src/plugins/python-pack/python-pack-plugin.c
index 1844dc7..7213653 100644
--- a/src/plugins/python-pack/python-pack-plugin.c
+++ b/src/plugins/python-pack/python-pack-plugin.c
@@ -25,7 +25,7 @@ void _ide_python_indenter_register_type (GTypeModule *module);
void _ide_python_format_provider_register_type (GTypeModule *module);
void
-peas_register_types (PeasObjectModule *module)
+ide_python_pack_register_types (PeasObjectModule *module)
{
_ide_python_indenter_register_type (G_TYPE_MODULE (module));
_ide_python_format_provider_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/python-pack/python-pack.gresource.xml
b/src/plugins/python-pack/python-pack.gresource.xml
new file mode 100644
index 0000000..a272e6f
--- /dev/null
+++ b/src/plugins/python-pack/python-pack.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>python-pack.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/python-pack/python-pack.plugin b/src/plugins/python-pack/python-pack.plugin
index 42bd664..97401a2 100644
--- a/src/plugins/python-pack/python-pack.plugin
+++ b/src/plugins/python-pack/python-pack.plugin
@@ -5,6 +5,7 @@ Description=Provides auto-indentation for the Python programming language
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
+Embedded=ide_python_pack_register_types
X-Indenter-Languages=python,python3
X-Indenter-Languages-Priority=0
X-Completion-Provider-Languages=python,python3
diff --git a/src/plugins/quick-highlight/gbp-quick-highlight-plugin.c
b/src/plugins/quick-highlight/gbp-quick-highlight-plugin.c
index 1d38adb..727d679 100644
--- a/src/plugins/quick-highlight/gbp-quick-highlight-plugin.c
+++ b/src/plugins/quick-highlight/gbp-quick-highlight-plugin.c
@@ -23,7 +23,7 @@
#include "gbp-quick-highlight-preferences.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_quick_highlight_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_VIEW_ADDIN,
diff --git a/src/plugins/quick-highlight/meson.build b/src/plugins/quick-highlight/meson.build
index c8e7b32..5bbf6ac 100644
--- a/src/plugins/quick-highlight/meson.build
+++ b/src/plugins/quick-highlight/meson.build
@@ -1,5 +1,11 @@
if get_option('with_quick_highlight')
+quick_highlight_resources = gnome.compile_resources(
+ 'quick-highlight-resources',
+ 'quick-highlight.gresource.xml',
+ c_name: 'gbp_quick_highlight',
+)
+
quick_highlight_sources = [
'gbp-quick-highlight-plugin.c',
'gbp-quick-highlight-view-addin.c',
@@ -8,20 +14,7 @@ quick_highlight_sources = [
'gbp-quick-highlight-preferences.h',
]
-shared_module('quick-highlight-plugin', quick_highlight_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'quick-highlight.plugin',
- output: 'quick-highlight.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(quick_highlight_sources)
+gnome_builder_plugins_sources += quick_highlight_resources[0]
endif
diff --git a/src/plugins/quick-highlight/quick-highlight.gresource.xml
b/src/plugins/quick-highlight/quick-highlight.gresource.xml
new file mode 100644
index 0000000..721f608
--- /dev/null
+++ b/src/plugins/quick-highlight/quick-highlight.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>quick-highlight.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/quick-highlight/quick-highlight.plugin
b/src/plugins/quick-highlight/quick-highlight.plugin
index aaf78ae..5272941 100644
--- a/src/plugins/quick-highlight/quick-highlight.plugin
+++ b/src/plugins/quick-highlight/quick-highlight.plugin
@@ -5,3 +5,4 @@ Description=Highlights every occurrences of selected text
Authors=Martin Blanchard <tchaik gmx com>
Copyright=Copyright © 2016 Martin Blanchard
Builtin=true
+Embedded=gbp_quick_highlight_register_types
diff --git a/src/plugins/retab/gbp-retab-plugin.c b/src/plugins/retab/gbp-retab-plugin.c
index e0aa8aa..987d26b 100644
--- a/src/plugins/retab/gbp-retab-plugin.c
+++ b/src/plugins/retab/gbp-retab-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-retab-view-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_retab_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_EDITOR_VIEW_ADDIN,
diff --git a/src/plugins/retab/meson.build b/src/plugins/retab/meson.build
index 9701e52..c0b61aa 100644
--- a/src/plugins/retab/meson.build
+++ b/src/plugins/retab/meson.build
@@ -2,7 +2,7 @@ if get_option('with_retab')
retab_resources = gnome.compile_resources(
'gbp-retab-resources',
- 'gbp-retab.gresource.xml',
+ 'retab.gresource.xml',
c_name: 'gbp_retab',
)
@@ -10,23 +10,9 @@ retab_sources = [
'gbp-retab-plugin.c',
'gbp-retab-view-addin.c',
'gbp-retab-view-addin.h',
- retab_resources[0],
]
-shared_module('retab-plugin', retab_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'retab.plugin',
- output: 'retab.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(retab_sources)
+gnome_builder_plugins_sources += retab_resources[0]
endif
diff --git a/src/plugins/retab/retab.gresource.xml b/src/plugins/retab/retab.gresource.xml
new file mode 100644
index 0000000..c0b7870
--- /dev/null
+++ b/src/plugins/retab/retab.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>retab.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/retab-plugin">
+ <file>gtk/menus.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/retab/retab.plugin b/src/plugins/retab/retab.plugin
index 746f184..5e9f1cf 100644
--- a/src/plugins/retab/retab.plugin
+++ b/src/plugins/retab/retab.plugin
@@ -6,3 +6,4 @@ Authors=Lucie Charvat <luci charvat gmail com>
Copyright=Copyright © 2017 Lucie Charvat
Builtin=true
Depends=editor
+Embedded=gbp_retab_register_types
diff --git a/src/plugins/spellcheck/meson.build b/src/plugins/spellcheck/meson.build
index a8dc003..54c956b 100644
--- a/src/plugins/spellcheck/meson.build
+++ b/src/plugins/spellcheck/meson.build
@@ -25,29 +25,14 @@ spellcheck_sources = [
'gbp-spell-widget.c',
'gbp-spell-widget.h',
'gbp-spell-widget-actions.c',
- spellcheck_resources[0],
]
-spellcheck_deps = plugin_deps + [
+gnome_builder_plugins_deps += [
dependency('gspell-1', version: '>= 1.2.0'),
dependency('enchant'),
]
-shared_module('spellcheck-plugin', spellcheck_sources,
- dependencies: spellcheck_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
-
-configure_file(
- input: 'spellcheck.plugin',
- output: 'spellcheck.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(spellcheck_sources)
+gnome_builder_plugins_sources += spellcheck_resources[0]
endif
diff --git a/src/plugins/spellcheck/spellcheck-plugin.c b/src/plugins/spellcheck/spellcheck-plugin.c
index 5b42da4..9656361 100644
--- a/src/plugins/spellcheck/spellcheck-plugin.c
+++ b/src/plugins/spellcheck/spellcheck-plugin.c
@@ -24,7 +24,7 @@
#include "gbp-spell-editor-view-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_spellcheck_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_BUFFER_ADDIN, GBP_TYPE_SPELL_BUFFER_ADDIN);
peas_object_module_register_extension_type (module, IDE_TYPE_EDITOR_ADDIN, GBP_TYPE_SPELL_EDITOR_ADDIN);
diff --git a/src/plugins/spellcheck/spellcheck.gresource.xml b/src/plugins/spellcheck/spellcheck.gresource.xml
index d8a6f59..7ca7d4b 100644
--- a/src/plugins/spellcheck/spellcheck.gresource.xml
+++ b/src/plugins/spellcheck/spellcheck.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>spellcheck.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/spellcheck-plugin">
<file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
<file compressed="true" preprocess="xml-stripblanks">gbp-spell-widget.ui</file>
diff --git a/src/plugins/spellcheck/spellcheck.plugin b/src/plugins/spellcheck/spellcheck.plugin
index d88fc49..6ab54b7 100644
--- a/src/plugins/spellcheck/spellcheck.plugin
+++ b/src/plugins/spellcheck/spellcheck.plugin
@@ -6,3 +6,4 @@ Authors=Sébastien Lafargue <slafargue gnome org>
Copyright=Copyright © 2016 Sébastien Lafargue
Depends=editor
Builtin=true
+Embedded=gbp_spellcheck_register_types
diff --git a/src/plugins/support/ide-support-plugin.c b/src/plugins/support/ide-support-plugin.c
index 78c0a3b..114420d 100644
--- a/src/plugins/support/ide-support-plugin.c
+++ b/src/plugins/support/ide-support-plugin.c
@@ -22,7 +22,7 @@
#include "ide-support-application-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+ide_support_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_APPLICATION_ADDIN,
diff --git a/src/plugins/support/meson.build b/src/plugins/support/meson.build
index 4a931cf..1e1d9fb 100644
--- a/src/plugins/support/meson.build
+++ b/src/plugins/support/meson.build
@@ -1,8 +1,8 @@
if get_option('with_support')
support_resources = gnome.compile_resources(
- 'ide-support-resources',
- 'ide-support-resources.gresource.xml',
+ 'support-resources',
+ 'support.gresource.xml',
c_name: 'ide_support',
)
@@ -12,23 +12,9 @@ support_sources = [
'ide-support.c',
'ide-support.h',
'ide-support-plugin.c',
- support_resources[0],
]
-shared_module('support-plugin', support_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'support.plugin',
- output: 'support.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(support_sources)
+gnome_builder_plugins_sources += support_resources[0]
endif
diff --git a/src/plugins/support/support.gresource.xml b/src/plugins/support/support.gresource.xml
new file mode 100644
index 0000000..03ae369
--- /dev/null
+++ b/src/plugins/support/support.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>support.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/support-plugin">
+ <file>gtk/menus.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/support/support.plugin b/src/plugins/support/support.plugin
index bc0c1d3..5ce7621 100644
--- a/src/plugins/support/support.plugin
+++ b/src/plugins/support/support.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
Hidden=true
+Embedded=ide_support_register_types
diff --git a/src/plugins/symbol-tree/meson.build b/src/plugins/symbol-tree/meson.build
index 093bc16..7db64e2 100644
--- a/src/plugins/symbol-tree/meson.build
+++ b/src/plugins/symbol-tree/meson.build
@@ -7,8 +7,6 @@ symbol_tree_resources = gnome.compile_resources(
)
symbol_tree_sources = [
- symbol_tree_resources[0],
- symbol_tree_resources[1],
'gbp-symbol-layout-stack-addin.c',
'gbp-symbol-layout-stack-addin.h',
'gbp-symbol-menu-button.c',
@@ -18,20 +16,7 @@ symbol_tree_sources = [
'symbol-tree-plugin.c',
]
-shared_module('symbol-tree-plugin', symbol_tree_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'symbol-tree.plugin',
- output: 'symbol-tree.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(symbol_tree_sources)
+gnome_builder_plugins_sources += symbol_tree_resources[0]
endif
diff --git a/src/plugins/symbol-tree/symbol-tree-plugin.c b/src/plugins/symbol-tree/symbol-tree-plugin.c
index 861e16f..6edcb0a 100644
--- a/src/plugins/symbol-tree/symbol-tree-plugin.c
+++ b/src/plugins/symbol-tree/symbol-tree-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-symbol-layout-stack-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_symbol_tree_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_LAYOUT_STACK_ADDIN,
diff --git a/src/plugins/symbol-tree/symbol-tree.gresource.xml
b/src/plugins/symbol-tree/symbol-tree.gresource.xml
index e0d01a5..66a5934 100644
--- a/src/plugins/symbol-tree/symbol-tree.gresource.xml
+++ b/src/plugins/symbol-tree/symbol-tree.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>symbol-tree.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/symbol-tree-plugin">
<file>themes/shared.css</file>
<file>gbp-symbol-menu-button.ui</file>
diff --git a/src/plugins/symbol-tree/symbol-tree.plugin b/src/plugins/symbol-tree/symbol-tree.plugin
index 8780015..844edc7 100644
--- a/src/plugins/symbol-tree/symbol-tree.plugin
+++ b/src/plugins/symbol-tree/symbol-tree.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Depends=editor
Builtin=true
+Embedded=gbp_symbol_tree_register_types
diff --git a/src/plugins/sysmon/gb-sysmon-addin.c b/src/plugins/sysmon/gb-sysmon-addin.c
index 632615d..0188710 100644
--- a/src/plugins/sysmon/gb-sysmon-addin.c
+++ b/src/plugins/sysmon/gb-sysmon-addin.c
@@ -102,7 +102,7 @@ gb_sysmon_addin_init (GbSysmonAddin *self)
}
void
-peas_register_types (PeasObjectModule *module)
+gb_sysmon_register_types (PeasObjectModule *module)
{
gb_sysmon_addin_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/sysmon/meson.build b/src/plugins/sysmon/meson.build
index a7664d7..7b5dce7 100644
--- a/src/plugins/sysmon/meson.build
+++ b/src/plugins/sysmon/meson.build
@@ -2,33 +2,18 @@ if get_option('with_sysmon')
sysmon_resources = gnome.compile_resources(
'gb-sysmon-resources',
- 'gb-sysmon.gresource.xml',
+ 'sysmon.gresource.xml',
c_name: 'gb_sysmon',
)
sysmon_sources = [
- sysmon_resources[0],
- sysmon_resources[1],
'gb-sysmon-panel.c',
'gb-sysmon-panel.h',
'gb-sysmon-addin.c',
'gb-sysmon-addin.h',
]
-shared_module('sysmon', sysmon_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'sysmon.plugin',
- output: 'sysmon.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(sysmon_sources)
+gnome_builder_plugins_sources += sysmon_resources[0]
endif
diff --git a/src/plugins/sysmon/sysmon.gresource.xml b/src/plugins/sysmon/sysmon.gresource.xml
new file mode 100644
index 0000000..e1bc8c0
--- /dev/null
+++ b/src/plugins/sysmon/sysmon.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>sysmon.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/sysmon">
+ <file>gb-sysmon-panel.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/sysmon/sysmon.plugin b/src/plugins/sysmon/sysmon.plugin
index 453dceb..71b1e93 100644
--- a/src/plugins/sysmon/sysmon.plugin
+++ b/src/plugins/sysmon/sysmon.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Depends=editor
Builtin=true
+Embedded=gb_sysmon_register_types
diff --git a/src/plugins/sysprof/gbp-sysprof-plugin.c b/src/plugins/sysprof/gbp-sysprof-plugin.c
index c133d40..19d83cd 100644
--- a/src/plugins/sysprof/gbp-sysprof-plugin.c
+++ b/src/plugins/sysprof/gbp-sysprof-plugin.c
@@ -23,7 +23,7 @@
#include "gbp-sysprof-workbench-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_sysprof_register_types (PeasObjectModule *module)
{
sp_clock_init ();
diff --git a/src/plugins/sysprof/meson.build b/src/plugins/sysprof/meson.build
index 3a6803e..3dff46f 100644
--- a/src/plugins/sysprof/meson.build
+++ b/src/plugins/sysprof/meson.build
@@ -7,8 +7,6 @@ sysprof_resources = gnome.compile_resources(
)
sysprof_sources = [
- sysprof_resources[0],
- sysprof_resources[1],
'gbp-sysprof-plugin.c',
'gbp-sysprof-perspective.c',
'gbp-sysprof-perspective.h',
@@ -16,24 +14,12 @@ sysprof_sources = [
'gbp-sysprof-workbench-addin.h',
]
-sysprof_deps = plugin_deps + [
- dependency('sysprof-ui-2', version: '>= 3.23.91'),
+gnome_builder_plugins_deps += [
+ dependency('sysprof-2', version: '>= 3.26.0'),
+ dependency('sysprof-ui-2', version: '>= 3.26.0'),
]
-shared_module('sysprof-plugin', sysprof_sources,
- dependencies: sysprof_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'sysprof.plugin',
- output: 'sysprof.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(sysprof_sources)
+gnome_builder_plugins_sources += sysprof_resources[0]
endif
diff --git a/src/plugins/sysprof/sysprof.gresource.xml b/src/plugins/sysprof/sysprof.gresource.xml
index b87cb50..3d6cdc7 100644
--- a/src/plugins/sysprof/sysprof.gresource.xml
+++ b/src/plugins/sysprof/sysprof.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>sysprof.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/sysprof-plugin">
<file>gtk/menus.ui</file>
<file>themes/shared.css</file>
diff --git a/src/plugins/sysprof/sysprof.plugin b/src/plugins/sysprof/sysprof.plugin
index 784959d..1fbd719 100644
--- a/src/plugins/sysprof/sysprof.plugin
+++ b/src/plugins/sysprof/sysprof.plugin
@@ -5,3 +5,4 @@ Description=Integration with the Sysprof system profiler
Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2016 Christian Hergert
Builtin=true
+Embedded=gbp_sysprof_register_types
diff --git a/src/plugins/terminal/gb-terminal-plugin.c b/src/plugins/terminal/gb-terminal-plugin.c
index ce3b04b..f454189 100644
--- a/src/plugins/terminal/gb-terminal-plugin.c
+++ b/src/plugins/terminal/gb-terminal-plugin.c
@@ -24,7 +24,7 @@
#include "gb-terminal-workbench-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gb_terminal_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_WORKBENCH_ADDIN,
diff --git a/src/plugins/terminal/meson.build b/src/plugins/terminal/meson.build
index f5720e7..5b65c67 100644
--- a/src/plugins/terminal/meson.build
+++ b/src/plugins/terminal/meson.build
@@ -1,13 +1,12 @@
if get_option('with_terminal')
terminal_resources = gnome.compile_resources(
- 'gb-terminal-resources',
- 'gb-terminal.gresource.xml',
+ 'terminal-resources',
+ 'terminal.gresource.xml',
c_name: 'gb_terminal',
)
terminal_sources = [
- terminal_resources,
'gb-terminal.c',
'gb-terminal.h',
'gb-terminal-plugin.c',
@@ -26,26 +25,11 @@ terminal_sources = [
'gb-terminal-workbench-addin.h',
]
-terminal_deps = plugin_deps + [
+gnome_builder_plugins_deps += [
dependency('vte-2.91', version: '>=0.40.2'),
- libgd_dep,
]
-shared_module('terminal', terminal_sources,
- dependencies: terminal_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
-)
-
-configure_file(
- input: 'terminal.plugin',
- output: 'terminal.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(terminal_sources)
+gnome_builder_plugins_sources += terminal_resources[0]
endif
diff --git a/src/plugins/terminal/gb-terminal.gresource.xml b/src/plugins/terminal/terminal.gresource.xml
similarity index 74%
rename from src/plugins/terminal/gb-terminal.gresource.xml
rename to src/plugins/terminal/terminal.gresource.xml
index d5c6aa1..cfffef1 100644
--- a/src/plugins/terminal/gb-terminal.gresource.xml
+++ b/src/plugins/terminal/terminal.gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>terminal.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/terminal">
<file>gb-terminal-view.ui</file>
<file>gb-terminal-search.ui</file>
diff --git a/src/plugins/terminal/terminal.plugin b/src/plugins/terminal/terminal.plugin
index 118e4a4..0a81faf 100644
--- a/src/plugins/terminal/terminal.plugin
+++ b/src/plugins/terminal/terminal.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Depends=editor
Builtin=true
+Embedded=gb_terminal_register_types
diff --git a/src/plugins/todo/gbp-todo-plugin.c b/src/plugins/todo/gbp-todo-plugin.c
index 5c7fd01..362fa9a 100644
--- a/src/plugins/todo/gbp-todo-plugin.c
+++ b/src/plugins/todo/gbp-todo-plugin.c
@@ -22,7 +22,7 @@
#include "gbp-todo-workbench-addin.h"
void
-peas_register_types (PeasObjectModule *module)
+gbp_todo_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
IDE_TYPE_WORKBENCH_ADDIN,
diff --git a/src/plugins/todo/meson.build b/src/plugins/todo/meson.build
index d145ee8..cc76a72 100644
--- a/src/plugins/todo/meson.build
+++ b/src/plugins/todo/meson.build
@@ -1,5 +1,11 @@
if get_option('with_todo')
+todo_resources = gnome.compile_resources(
+ 'todo-resources',
+ 'todo.gresource.xml',
+ c_name: 'gbp_todo',
+)
+
todo_sources = [
'gbp-todo-item.c',
'gbp-todo-item.h',
@@ -12,20 +18,7 @@ todo_sources = [
'gbp-todo-workbench-addin.h',
]
-shared_module('todo-plugin', todo_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'todo.plugin',
- output: 'todo.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(todo_sources)
+gnome_builder_plugins_sources += todo_resources[0]
endif
diff --git a/src/plugins/todo/todo.gresource.xml b/src/plugins/todo/todo.gresource.xml
new file mode 100644
index 0000000..793c8ce
--- /dev/null
+++ b/src/plugins/todo/todo.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>todo.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/todo/todo.plugin b/src/plugins/todo/todo.plugin
index bf5a742..580dc8c 100644
--- a/src/plugins/todo/todo.plugin
+++ b/src/plugins/todo/todo.plugin
@@ -6,3 +6,4 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015-2017 Christian Hergert
Builtin=true
Depends=editor
+Embedded=gbp_todo_register_types
diff --git a/src/plugins/vala-pack/meson.build b/src/plugins/vala-pack/meson.build
index 42f32bd..7c3b396 100644
--- a/src/plugins/vala-pack/meson.build
+++ b/src/plugins/vala-pack/meson.build
@@ -52,32 +52,31 @@ vala_pack_sources = [
vala_pack_deps = [
libvala,
libide_vapi,
+ libpeas_dep,
+ libide_plugin_dep,
]
shared_module('vala-pack-plugin', vala_pack_sources,
- dependencies: plugin_deps + vala_pack_deps,
- vala_args: [
- '--target-glib=2.52',
- '--pkg=posix',
- '--pkg=libpeas-1.0',
- '--pkg=gtksourceview-3.0',
- '--pkg=gio-2.0',
- '--pkg=libvala-' + libvala_version,
- '--pkg=libdazzle-1.0',
- ],
- c_args: [
- '-DVALA_VERSION="@0@"'.format(libvala_version),
- '-DLOG_DOMAIN="vala-pack-plugin"',
- '-DGETTEXT_PACKAGE="gnome-builder"',
- '-DPACKAGE_DATADIR="@0@"'.format(join_paths(get_option('prefix'),
- get_option('datadir'),
- 'gnome-builder')),
- ],
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
- install_rpath: pkglibdir_abs,
+ link_args: gnome_builder_plugins_link_args,
+ link_depends: gnome_builder_plugins_link_deps,
+ dependencies: vala_pack_deps,
+ install: true,
+ install_dir: plugindir,
+ install_rpath: pkglibdir_abs,
+
+ vala_args: [ '--target-glib=2.52',
+ '--pkg=posix',
+ '--pkg=libpeas-1.0',
+ '--pkg=gtksourceview-3.0',
+ '--pkg=gio-2.0',
+ '--pkg=libvala-' + libvala_version,
+ '--pkg=libdazzle-1.0',
+ ],
+ c_args: [ '-DVALA_VERSION="@0@"'.format(libvala_version),
+ '-DLOG_DOMAIN="vala-pack-plugin"',
+ '-DGETTEXT_PACKAGE="gnome-builder"',
+ '-DPACKAGE_DATADIR="@0@"'.format(join_paths(get_option('prefix'), get_option('datadir'),
'gnome-builder')),
+ ],
)
configure_file(
diff --git a/src/plugins/xml-pack/meson.build b/src/plugins/xml-pack/meson.build
index d8878c1..9d59586 100644
--- a/src/plugins/xml-pack/meson.build
+++ b/src/plugins/xml-pack/meson.build
@@ -1,12 +1,12 @@
if get_option('with_xml_pack')
xml_pack_resources = gnome.compile_resources(
- 'ide-xml-resources',
- 'ide-xml.gresource.xml',
+ 'xml-pack-resources',
+ 'xml-pack.gresource.xml',
c_name: 'ide_xml'
)
+
xml_pack_sources = [
- xml_pack_resources,
'ide-xml-analysis.c',
'ide-xml-analysis.h',
'ide-xml-completion-attributes.c',
@@ -70,20 +70,7 @@ xml_pack_sources = [
'xml-pack-plugin.c',
]
-shared_module('xml-pack-plugin', xml_pack_sources,
- dependencies: plugin_deps,
- link_args: plugin_link_args,
- link_depends: plugin_link_deps,
- install: true,
- install_dir: plugindir,
-)
-
-configure_file(
- input: 'xml-pack.plugin',
- output: 'xml-pack.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += files(xml_pack_sources)
+gnome_builder_plugins_sources += xml_pack_resources[0]
endif
diff --git a/src/plugins/xml-pack/xml-pack-plugin.c b/src/plugins/xml-pack/xml-pack-plugin.c
index 41d20db..e97b2a6 100644
--- a/src/plugins/xml-pack/xml-pack-plugin.c
+++ b/src/plugins/xml-pack/xml-pack-plugin.c
@@ -32,7 +32,7 @@ void _ide_xml_symbol_resolver_register_type (GTypeModule *module);
void _ide_xml_service_register_type (GTypeModule *module);
void
-peas_register_types (PeasObjectModule *module)
+ide_xml_register_types (PeasObjectModule *module)
{
_ide_xml_completion_provider_register_type (G_TYPE_MODULE (module));
_ide_xml_highlighter_register_type (G_TYPE_MODULE (module));
diff --git a/src/plugins/xml-pack/xml-pack.gresource.xml b/src/plugins/xml-pack/xml-pack.gresource.xml
new file mode 100644
index 0000000..510405d
--- /dev/null
+++ b/src/plugins/xml-pack/xml-pack.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>xml-pack.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/xml-pack-plugin">
+ <file>schemas/gtkbuilder.rng</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/xml-pack/xml-pack.plugin b/src/plugins/xml-pack/xml-pack.plugin
index 4ec42e0..0b5530d 100644
--- a/src/plugins/xml-pack/xml-pack.plugin
+++ b/src/plugins/xml-pack/xml-pack.plugin
@@ -15,3 +15,4 @@ X-Diagnostic-Provider-Languages=xml,html
X-Diagnostic-Provider-Languages-Priority=0
X-Completion-Provider-Languages=xml,html
X-Completion-Provider-Languages-Priority=0
+Embedded=ide_xml_register_types
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]