[glade/composite-templates-new: 1/5] Build fixes, now distcheck passes again (with the added tests).
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/composite-templates-new: 1/5] Build fixes, now distcheck passes again (with the added tests).
- Date: Mon, 8 Apr 2013 11:12:48 +0000 (UTC)
commit d2bc48eceea65286f30485e397949f49dc408d9c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Apr 8 20:10:20 2013 +0900
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.
configure.ac | 2 +-
gladeui/Makefile.am | 19 ++++++++++++-------
gladeui/glade-app.c | 5 -----
src/Makefile.am | 15 ++++++++++-----
src/main.c | 6 ------
5 files changed, 23 insertions(+), 24 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b006306..0bee33f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/gladeui/Makefile.am b/gladeui/Makefile.am
index 930add9..438dedb 100644
--- a/gladeui/Makefile.am
+++ b/gladeui/Makefile.am
@@ -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
diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c
index 1ccf3ff..b263527 100644
--- a/gladeui/glade-app.c
+++ b/gladeui/glade-app.c
@@ -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;
}
diff --git a/src/Makefile.am b/src/Makefile.am
index edaa56b..44d5d57 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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)
diff --git a/src/main.c b/src/main.c
index 008d053..15b01af 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]