[gnome-builder] build: add proper extern macros for internal plugin registration



commit 3d2e4adc2f0ab6541197064f019ff5c56cf6baba
Author: Christian Hergert <chergert redhat com>
Date:   Thu Mar 22 15:45:32 2018 -0700

    build: add proper extern macros for internal plugin registration
    
    For our internal plugins, we need to be able to register the types. And
    libpeas needs to be able to find those symbols.

 src/libide/buildconfig/ide-buildconfig-plugin.c | 4 +++-
 src/libide/buildui/ide-build-plugin.c           | 7 ++++---
 src/libide/debugger/ide-debugger-plugin.c       | 6 +++++-
 src/libide/directory/ide-directory-plugin.c     | 2 +-
 src/libide/editor/ide-editor-plugin.c           | 4 +++-
 src/libide/testing/testing-plugin.c             | 6 +++++-
 src/libide/webkit/ide-webkit.c                  | 6 +++++-
 src/libide/workbench/ide-workbench-header-bar.c | 2 ++
 8 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/src/libide/buildconfig/ide-buildconfig-plugin.c b/src/libide/buildconfig/ide-buildconfig-plugin.c
index 41a90aea4..565e91093 100644
--- a/src/libide/buildconfig/ide-buildconfig-plugin.c
+++ b/src/libide/buildconfig/ide-buildconfig-plugin.c
@@ -22,12 +22,14 @@
 
 #include <libpeas/peas.h>
 
+#include "ide-version-macros.h"
+
 #include "buildconfig/ide-buildconfig-configuration-provider.h"
 #include "buildconfig/ide-buildconfig-pipeline-addin.h"
 #include "buildsystem/ide-build-pipeline-addin.h"
 #include "config/ide-configuration-provider.h"
 
-void
+_IDE_EXTERN void
 ide_buildconfig_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module,
diff --git a/src/libide/buildui/ide-build-plugin.c b/src/libide/buildui/ide-build-plugin.c
index 57a509d72..14e08b7fd 100644
--- a/src/libide/buildui/ide-build-plugin.c
+++ b/src/libide/buildui/ide-build-plugin.c
@@ -21,12 +21,13 @@
 #include "config.h"
 
 #include <libpeas/peas.h>
-#include <ide.h>
 
-#include "buildui/ide-build-tool.h"
+#include "ide-version-macros.h"
+
+#include "workbench/ide-workbench-addin.h"
 #include "buildui/ide-build-workbench-addin.h"
 
-void
+_IDE_EXTERN void
 ide_build_tool_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module,
diff --git a/src/libide/debugger/ide-debugger-plugin.c b/src/libide/debugger/ide-debugger-plugin.c
index 683344f8e..319b4e6d5 100644
--- a/src/libide/debugger/ide-debugger-plugin.c
+++ b/src/libide/debugger/ide-debugger-plugin.c
@@ -16,13 +16,17 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <libpeas/peas.h>
 
+#include "ide-version-macros.h"
+
 #include "debugger/ide-debugger-editor-addin.h"
 #include "editor/ide-editor-addin.h"
 #include "editor/ide-editor-view-addin.h"
 
-void
+_IDE_EXTERN void
 ide_debugger_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module,
diff --git a/src/libide/directory/ide-directory-plugin.c b/src/libide/directory/ide-directory-plugin.c
index 1a5e1f68e..cc88df62d 100644
--- a/src/libide/directory/ide-directory-plugin.c
+++ b/src/libide/directory/ide-directory-plugin.c
@@ -26,7 +26,7 @@
 #include "directory/ide-directory-build-system.h"
 #include "directory/ide-directory-vcs.h"
 
-void
+_IDE_EXTERN void
 ide_directory_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module,
diff --git a/src/libide/editor/ide-editor-plugin.c b/src/libide/editor/ide-editor-plugin.c
index d92a5ebbe..3b8444997 100644
--- a/src/libide/editor/ide-editor-plugin.c
+++ b/src/libide/editor/ide-editor-plugin.c
@@ -22,10 +22,12 @@
 
 #include <libpeas/peas.h>
 
+#include "ide-version-macros.h"
+
 #include "editor/ide-editor-layout-stack-addin.h"
 #include "editor/ide-editor-workbench-addin.h"
 
-void
+_IDE_EXTERN void
 ide_editor_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module, IDE_TYPE_LAYOUT_STACK_ADDIN, 
IDE_TYPE_EDITOR_LAYOUT_STACK_ADDIN);
diff --git a/src/libide/testing/testing-plugin.c b/src/libide/testing/testing-plugin.c
index 9198df927..c57a30f44 100644
--- a/src/libide/testing/testing-plugin.c
+++ b/src/libide/testing/testing-plugin.c
@@ -16,12 +16,16 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <libpeas/peas.h>
 
+#include "ide-version-macros.h"
+
 #include "editor/ide-editor-addin.h"
 #include "testing/ide-test-editor-addin.h"
 
-void
+_IDE_EXTERN void
 ide_test_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module, IDE_TYPE_EDITOR_ADDIN, IDE_TYPE_TEST_EDITOR_ADDIN);
diff --git a/src/libide/webkit/ide-webkit.c b/src/libide/webkit/ide-webkit.c
index 6a3cf7114..c605ffe46 100644
--- a/src/libide/webkit/ide-webkit.c
+++ b/src/libide/webkit/ide-webkit.c
@@ -16,10 +16,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <libpeas/peas.h>
 #include <webkit2/webkit2.h>
 
-void
+#include "ide-version-macros.h"
+
+_IDE_EXTERN void
 ide_webkit_register_types (PeasObjectModule *module)
 {
   g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
diff --git a/src/libide/workbench/ide-workbench-header-bar.c b/src/libide/workbench/ide-workbench-header-bar.c
index 3f9657ec0..e87db708a 100644
--- a/src/libide/workbench/ide-workbench-header-bar.c
+++ b/src/libide/workbench/ide-workbench-header-bar.c
@@ -23,6 +23,7 @@
 #include <dazzle.h>
 
 #include "application/ide-application.h"
+#include "runner/ide-run-button.h"
 #include "search/ide-search-entry.h"
 #include "util/ide-gtk.h"
 #include "workbench/ide-perspective.h"
@@ -130,6 +131,7 @@ ide_workbench_header_bar_class_init (IdeWorkbenchHeaderBarClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, IdeWorkbenchHeaderBar, right_box);
   gtk_widget_class_bind_template_child_private (widget_class, IdeWorkbenchHeaderBar, search_entry);
 
+  g_type_ensure (IDE_TYPE_RUN_BUTTON);
   g_type_ensure (IDE_TYPE_SEARCH_ENTRY);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]