[gedit] Install introspection data and lib into private dir



commit 30dab7fded8c048a7f45d1a1a3647aab5408e8ab
Author: Garrett Regier <alias301 gmail com>
Date:   Tue Jun 22 08:49:19 2010 -0700

    Install introspection data and lib into private dir

 gedit/Makefile.am |    4 ++--
 gedit/gedit.c     |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 6039062..0548420 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -270,10 +270,10 @@ Gedit_3_0_gir_PROGRAM = $(builddir)/gedit
 Gedit_3_0_gir_FILES = $(INST_H_FILES) $(libgedit_c_files)
 Gedit_3_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
 
-girdir = $(INTROSPECTION_GIRDIR)
+girdir = $(datadir)/gedit/gir-1.0
 gir_DATA = $(INTROSPECTION_GIRS)
 
-typelibdir = $(INTROSPECTION_TYPELIBDIR)
+typelibdir = $(libdir)/gedit/girepository-1.0
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES +=			\
diff --git a/gedit/gedit.c b/gedit/gedit.c
index a72acb8..c28df1b 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -56,6 +56,10 @@
 #include "gedit-metadata-manager.h"
 #endif
 
+#ifdef ENABLE_INTROSPECTION
+#include <girepository.h>
+#endif
+
 #ifdef G_OS_UNIX
 #include <gio/gunixinputstream.h>
 #include <unistd.h>
@@ -209,6 +213,23 @@ gedit_main (gboolean service)
 #endif
 }
 
+#ifdef ENABLE_INTROSPECTION
+static void
+setup_girepository (void)
+{
+	gchar *lib_dir;
+	gchar *typelib_dir;
+
+	lib_dir = gedit_dirs_get_gedit_lib_dir ();
+	typelib_dir = g_build_filename (lib_dir, "girepository-1.0", NULL);
+
+	g_irepository_prepend_search_path (typelib_dir);
+
+	g_free (typelib_dir);
+	g_free (lib_dir);
+}
+#endif
+
 int
 main (int argc, char *argv[])
 {
@@ -239,6 +260,10 @@ main (int argc, char *argv[])
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
+#ifdef ENABLE_INTROSPECTION
+	setup_girepository ();
+#endif
+
 	/* Parse command line arguments */
 	command_line = gedit_command_line_get_default ();
 



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