Install introspection data and lib into a private dir
This commit is contained in:
@@ -19,7 +19,11 @@ AM_CPPFLAGS = \
|
||||
xed_SOURCES = \
|
||||
xed.c
|
||||
|
||||
xed_LDADD = libxed.la $(XED_LIBS) $(EGG_SMCLIENT_LIBS) $(INTROSPECTION_LIBS)
|
||||
xed_LDADD = \
|
||||
libxed.la \
|
||||
$(XED_LIBS) \
|
||||
$(EGG_SMCLIENT_LIBS) \
|
||||
$(INTROSPECTION_LIBS)
|
||||
|
||||
xed_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
|
||||
|
||||
@@ -152,8 +156,8 @@ libxed_c_files = \
|
||||
xedtextregion.c
|
||||
|
||||
libxed_la_SOURCES = \
|
||||
$(libxed_c_files) \
|
||||
$(BUILT_SOURCES) \
|
||||
$(libxed_c_files) \
|
||||
$(BACON_FILES) \
|
||||
$(POSIXIO_FILES) \
|
||||
$(NOINST_H_FILES) \
|
||||
@@ -194,22 +198,26 @@ CLEANFILES = $(BUILT_SOURCES)
|
||||
if HAVE_INTROSPECTION
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS = Xed-1.0.gir
|
||||
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
|
||||
|
||||
|
||||
|
||||
Xed-1.0.gir: xed
|
||||
Xed_1_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
|
||||
Xed_1_0_gir_FILES = $(INST_H_FILES) $(libxed_c_files) $(BUILT_SOURCES)
|
||||
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
|
||||
Xed_1_0_gir_NAMESPACE = Xed
|
||||
Xed_1_0_gir_VERSION = 1.0
|
||||
Xed_1_0_gir_PROGRAM = $(builddir)/xed
|
||||
Xed_1_0_gir_NAMESPACE = Xed
|
||||
Xed_1_0_gir_FILES = $(INST_H_FILES) $(libxed_c_files) $(BUILT_SOURCES)
|
||||
Xed_1_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
|
||||
|
||||
girdir = $(datadir)/gir-1.0
|
||||
girdir = $(datadir)/xed/gir-1.0
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(libdir)/girepository-1.0
|
||||
typelibdir = $(libdir)/xed/girepository-1.0
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
CLEANFILES += \
|
||||
$(gir_DATA) \
|
||||
$(typelib_DATA)
|
||||
endif
|
||||
|
||||
dist-hook:
|
||||
|
@@ -55,7 +55,7 @@ XedPluginsEngine *default_engine = NULL;
|
||||
static void
|
||||
xed_plugins_engine_init (XedPluginsEngine *engine)
|
||||
{
|
||||
gchar *private_path;
|
||||
gchar *typelib_dir;
|
||||
GError *error = NULL;
|
||||
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
@@ -66,6 +66,17 @@ xed_plugins_engine_init (XedPluginsEngine *engine)
|
||||
|
||||
peas_engine_enable_loader (PEAS_ENGINE (engine), "python3");
|
||||
|
||||
typelib_dir = g_build_filename (xed_dirs_get_xed_lib_dir (), "girepository-1.0", NULL);
|
||||
|
||||
if (!g_irepository_require_private (g_irepository_get_default (), typelib_dir, "Xed", "1.0", 0, &error))
|
||||
{
|
||||
g_warning ("Could not load Xed repository: %s", error->message);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
g_free (typelib_dir);
|
||||
|
||||
/* This should be moved to libpeas */
|
||||
if (!g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error))
|
||||
{
|
||||
@@ -81,16 +92,16 @@ xed_plugins_engine_init (XedPluginsEngine *engine)
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
private_path = g_build_filename (LIBDIR, "girepository-1.0", NULL);
|
||||
// private_path = g_build_filename (LIBDIR, "girepository-1.0", NULL);
|
||||
|
||||
if (!g_irepository_require_private (g_irepository_get_default (), private_path, "Xed", "1.0", 0, &error))
|
||||
{
|
||||
g_warning ("Could not load Xed repository: %s", error->message);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
}
|
||||
// if (!g_irepository_require_private (g_irepository_get_default (), private_path, "Xed", "1.0", 0, &error))
|
||||
// {
|
||||
// g_warning ("Could not load Xed repository: %s", error->message);
|
||||
// g_error_free (error);
|
||||
// error = NULL;
|
||||
// }
|
||||
|
||||
g_free (private_path);
|
||||
// g_free (private_path);
|
||||
|
||||
peas_engine_add_search_path (PEAS_ENGINE (engine),
|
||||
xed_dirs_get_user_plugins_dir (),
|
||||
@@ -131,13 +142,11 @@ xed_plugins_engine_class_init (XedPluginsEngineClass *klass)
|
||||
XedPluginsEngine *
|
||||
xed_plugins_engine_get_default (void)
|
||||
{
|
||||
if (default_engine != NULL)
|
||||
if (default_engine == NULL)
|
||||
{
|
||||
return default_engine;
|
||||
default_engine = XED_PLUGINS_ENGINE (g_object_new (XED_TYPE_PLUGINS_ENGINE, NULL));
|
||||
g_object_add_weak_pointer (G_OBJECT (default_engine), (gpointer) &default_engine);
|
||||
}
|
||||
|
||||
default_engine = XED_PLUGINS_ENGINE (g_object_new (XED_TYPE_PLUGINS_ENGINE, NULL));
|
||||
g_object_add_weak_pointer (G_OBJECT (default_engine), (gpointer) &default_engine);
|
||||
|
||||
return default_engine;
|
||||
}
|
||||
|
Reference in New Issue
Block a user