[recipes] Compile all resources in one go
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Compile all resources in one go
- Date: Wed, 15 Mar 2017 03:17:07 +0000 (UTC)
commit 0b2268d3b0f494cf79f8810febfce65fe4f8a7a9
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 14 23:15:23 2017 -0400
Compile all resources in one go
I introduced a second resource file when we were loading
all of the big cuisine pictures as resources. But we are
no longer doing that, so this split serves no purpose
anymore.
src/Makefile.am | 24 ++++---------
src/meson.build | 17 +++------
src/recipes-images.gresource.xml | 45 -----------------------
src/recipes-ui.gresource.xml | 35 ------------------
src/recipes.gresource.xml | 75 ++++++++++++++++++++++++++++++++++++++
5 files changed, 87 insertions(+), 109 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 25ac6cf..0647243 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -130,8 +130,7 @@ gnome_recipes_SOURCES = \
gr-utils.c \
gr-window.h \
gr-window.c \
- resources-ui.c \
- resources-images.c \
+ resources.c \
types.h \
types.c \
gr-shell-search-provider.h \
@@ -140,8 +139,7 @@ gnome_recipes_SOURCES = \
gr-shell-search-provider-dbus.c
BUILT_SOURCES = \
- resources-ui.c \
- resources-images.c \
+ resources.c \
ingredients.inc \
no-ingredients.inc \
segments.inc \
@@ -151,8 +149,7 @@ BUILT_SOURCES = \
gr-shell-search-provider-dbus.c
DISTCLEANFILES = \
- resources-ui.c \
- resources-images.c \
+ resources.c \
ingredients.inc \
no-ingredients.inc \
segments.inc \
@@ -170,18 +167,12 @@ ingredients.inc: $(top_srcdir)/data/ingredients.list
no-ingredients.inc: $(top_srcdir)/data/ingredients.list
$(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/ N_("no \1"),/' $^ > $@
-resource_ui_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/recipes-ui.gresource.xml)
+resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/recipes.gresource.xml)
-resources-ui.c: recipes-ui.gresource.xml $(resource_ui_files)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/recipes-ui.gresource.xml \
+resources.c: recipes.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/recipes.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --generate-source
-resource_image_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/recipes-images.gresource.xml)
-
-resources-images.c: recipes-images.gresource.xml $(resource_image_files)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/recipes-images.gresource.xml \
- --target=$@ --sourcedir=$(srcdir) --generate-source
-
types.h: types.h.template gr-diet.h
$(AM_V_GEN) ($(GLIB_MKENUMS) --template $^ ) > xgen-eh && \
cp xgen-eh $@ && \
@@ -203,8 +194,7 @@ EXTRA_DIST = \
shell-search-provider-dbus-interfaces.xml \
recipes-ui.gresource.xml \
recipes-images.gresource.xml \
- $(resource_ui_files) \
- $(resource_image_files) \
+ $(resource_files) \
types.h.template \
types.c.template
diff --git a/src/meson.build b/src/meson.build
index a3fffc0..f4fe823 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -21,15 +21,10 @@ src += [custom_target('no-ingredients',
command : [list_to_c, '@INPUT@', '@OUTPUT@', 'no '])]
# Resource compilation
-resources_ui = gnome.compile_resources('resources_ui',
- 'recipes-ui.gresource.xml',
- c_name: '_recipes_ui',
- source_dir: 'src')
-
-resources_images = gnome.compile_resources('resources_images',
- 'recipes-images.gresource.xml',
- c_name: '_recipes_images',
- source_dir: 'src')
+resources = gnome.compile_resources('resources',
+ 'recipes.gresource.xml',
+ c_name: '_recipes',
+ source_dir: 'src')
enums += gnome.mkenums('types',
sources: 'gr-diet.h',
@@ -101,12 +96,10 @@ src += ['main.c',
'gr-window.c',
enums,
search_provider,
- resources_ui,
- resources_images]
+ resources]
executable('gnome-recipes',
src,
install : true,
include_directories : top_inc,
dependencies: deps)
-
diff --git a/src/recipes.gresource.xml b/src/recipes.gresource.xml
new file mode 100644
index 0000000..89d8e0d
--- /dev/null
+++ b/src/recipes.gresource.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/Recipes">
+ <file preprocess="xml-stripblanks">gr-category-tile.ui</file>
+ <file preprocess="xml-stripblanks">gr-chef-dialog.ui</file>
+ <file preprocess="xml-stripblanks">gr-chef-tile.ui</file>
+ <file preprocess="xml-stripblanks">gr-cooking-view.ui</file>
+ <file preprocess="xml-stripblanks">gr-cooking-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-cuisine-tile.ui</file>
+ <file preprocess="xml-stripblanks">gr-cuisine-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-cuisines-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-details-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-diet-row.ui</file>
+ <file preprocess="xml-stripblanks">gr-edit-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-image-viewer.ui</file>
+ <file preprocess="xml-stripblanks">gr-image-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-ingredient-row.ui</file>
+ <file preprocess="xml-stripblanks">gr-list-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-meal-row.ui</file>
+ <file preprocess="xml-stripblanks">gr-recipes-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-recipe-small-tile.ui</file>
+ <file preprocess="xml-stripblanks">gr-recipe-tile.ui</file>
+ <file preprocess="xml-stripblanks">gr-search-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-shopping-page.ui</file>
+ <file preprocess="xml-stripblanks">gr-spice-row.ui</file>
+ <file preprocess="xml-stripblanks">gr-time-widget.ui</file>
+ <file preprocess="xml-stripblanks">gr-query-editor.ui</file>
+ <file preprocess="xml-stripblanks">gr-window.ui</file>
+ <file preprocess="xml-stripblanks">chef-conflict-dialog.ui</file>
+ <file preprocess="xml-stripblanks">recipe-conflict-dialog.ui</file>
+ <file preprocess="xml-stripblanks">recipe-export-dialog.ui</file>
+ <file preprocess="xml-stripblanks">recipe-whats-new-dialog.ui</file>
+ <file preprocess="xml-stripblanks">menus.ui</file>
+ <file>recipes.css</file>
+ <file>recipes-light.css</file>
+ <file>recipes-dark.css</file>
+ <file>cuisine.css</file>
+ <file>icons/16x16/apps/garlic-content-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/garlic-content-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/garlic-content-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/garlic-content-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/garlic-content-symbolic.svg</file>
+ <file>icons/16x16/apps/spicy-content-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/spicy-content-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/spicy-content-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/spicy-content-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/spicy-content-symbolic.svg</file>
+ <file>icons/16x16/apps/dairy-content-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/dairy-content-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/dairy-content-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/dairy-content-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/dairy-content-symbolic.svg</file>
+ <file>icons/16x16/apps/egg-content-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/egg-content-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/egg-content-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/egg-content-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/egg-content-symbolic.svg</file>
+ <file>icons/16x16/apps/wheat-content-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/wheat-content-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/wheat-content-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/wheat-content-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/wheat-content-symbolic.svg</file>
+ <file>icons/16x16/apps/shopping-list-symbolic.symbolic.png</file>
+ <file>icons/24x24/apps/shopping-list-symbolic.symbolic.png</file>
+ <file>icons/32x32/apps/shopping-list-symbolic.symbolic.png</file>
+ <file>icons/48x48/apps/shopping-list-symbolic.symbolic.png</file>
+ <file>icons/symbolic/apps/shopping-list-symbolic.svg</file>
+ <file>built-with-builder-symbolic.symbolic.png</file>
+ <file>org.gnome.Recipes-symbolic.symbolic.png</file>
+ <file>help-cursor-keys.png</file>
+ <file>help-esc-key.png</file>
+ <file>help-key-double-press.png</file>
+ <file>help-key-press.png</file>
+ </gresource>
+</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]