Commit d2bc48ec authored by Tristan Van Berkom's avatar Tristan Van Berkom

Build fixes, now distcheck passes again (with the added tests).

As a side effect, I also enhanced the GResources build commands,
now we also avoid explicitly calling _resources_register() but
rely on glib-compile-resources to automatically register the
compiled resources.
parent 6d3f6b87
......@@ -259,7 +259,7 @@ AC_CHECK_FUNCS(gtk_builder_add_from_resource)
dnl ================================================================
dnl Testing environment
dnl ================================================================
GLADE_TEST_ENVIRONMENT='GLADE_TESTING=1 GLADE_PIXMAP_DIR=$(top_builddir)/data/icons GLADE_CATALOG_SEARCH_PATH=$(top_builddir)/plugins/gtk+ GLADE_MODULE_SEARCH_PATH=$(top_builddir)/plugins/gtk+/.libs'
GLADE_TEST_ENVIRONMENT='GLADE_TESTING=1 GLADE_PIXMAP_DIR=$(top_srcdir)/data/icons GLADE_CATALOG_SEARCH_PATH=$(top_srcdir)/plugins/gtk+ GLADE_MODULE_SEARCH_PATH=$(top_builddir)/plugins/gtk+/.libs'
AC_SUBST(GLADE_TEST_ENVIRONMENT)
......
......@@ -50,13 +50,16 @@ BUILT_SOURCES = \
gladeui-resources.c \
gladeui-resources.h
UI_FILES = \
glade-project-properties.ui
EXTRA_DIST = \
$(UI_FILES) \
glade-marshallers.list \
gladeui.rc.in \
icon-naming-spec.c \
glade-previewer.rc.in \
gladeui-resources.gresource.xml \
glade-project-properties.ui
gladeui-resources.gresource.xml
# The glade core library
libgladeui_2_la_SOURCES = \
......@@ -229,8 +232,10 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
# This could be split in two, but its better to rebuild both, sources and header
# each time the xml or the actual resources files change, just in case.
gladeui-resources.c gladeui-resources.h: gladeui-resources.gresource.xml \
$(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gladeui-resources.gresource.xml)
# Generate resources
gladeui-resources.h: gladeui-resources.gresource.xml $(UI_FILES)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-header
gladeui-resources.c: gladeui-resources.gresource.xml $(UI_FILES)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-source
......@@ -33,7 +33,6 @@
#include "glade.h"
#include "glade-debug.h"
#include "gladeui-resources.h"
#include "glade-cursor.h"
#include "glade-catalog.h"
#include "glade-design-view.h"
......@@ -156,8 +155,6 @@ glade_app_finalize (GObject * app)
singleton_app = NULL;
check_initialised = FALSE;
gladeui_resources_unregister_resource ();
G_OBJECT_CLASS (glade_app_parent_class)->finalize (app);
}
......@@ -363,8 +360,6 @@ glade_init (void)
/* Register icons needed by the UI */
glade_app_register_stock_icons (GTK_ICON_SIZE_LARGE_TOOLBAR);
gladeui_resources_register_resource ();
init = TRUE;
}
......
......@@ -39,10 +39,13 @@ noinst_HEADERS = \
glade-resources.h \
glade-preferences.h
# This could be split in two, but its better to rebuild both, sources and header
# each time the xml or the actual resources files change, just in case.
glade-resources.c glade-resources.h: glade-resources.gresource.xml \
$(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies glade-resources.gresource.xml)
# Generate resources
glade-resources.h: glade-resources.gresource.xml $(UI_FILES)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/glade-resources.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _glade --generate-header
glade-resources.c: glade-resources.gresource.xml $(UI_FILES)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/glade-resources.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _glade --generate-source
if NATIVE_WIN32
glade_LDADD += glade-win32-res.o
......@@ -57,4 +60,6 @@ endif
glade-win32-res.o: glade.rc
$(WINDRES) $< $@
EXTRA_DIST = glade.rc.in glade-resources.gresource.xml glade.glade
UI_FILES = glade.glade
EXTRA_DIST = glade.rc.in glade-resources.gresource.xml $(UI_FILES)
......@@ -153,9 +153,6 @@ main (int argc, char *argv[])
glade_setup_log_handlers ();
/* Load resources needed at initialization */
glade_resources_register_resource ();
window = GLADE_WINDOW (glade_window_new ());
if (without_devhelp == FALSE)
......@@ -200,9 +197,6 @@ main (int argc, char *argv[])
if (!opened_project)
glade_window_new_project (window);
/* Free resources before entering the main loop */
glade_resources_unregister_resource ();
gtk_main ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment