Commit 5674e318 authored by Michael Natterer's avatar Michael Natterer

Generate icon resources where they are needed, and don't include .c files

Treat the gimp-core-pixbufs and gimp-icon-pixbufs resources like we
changed the cursor resources before, and clean out a lot of cruft from
icons/ (there is no need to generate stuff in all icon themes when we
include only one fallback icon from one theme).
parent de5babe9
......@@ -173,10 +173,11 @@ gimpconsoleldadd = \
$(libm)
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
$(AM_LDFLAGS) \
$(win32_ldflags) \
$(framework_cocoa) \
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog \
$(AM_LDFLAGS) \
$(win32_ldflags) \
$(framework_cocoa) \
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog \
-Wl,-u,$(SYMPREFIX)gimp_core_pixbufs_get_resource \
-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource
......
......@@ -3,6 +3,8 @@
/.libs
/Makefile
/Makefile.in
/gimp-core-pixbufs.c
/gimp-core-pixbufs.h
/gimpmarshal.c
/gimpmarshal.h
/libappcore.a
......
......@@ -461,8 +461,10 @@ libappcore_a_sources = \
gimpwaitable.h
libappcore_a_built_sources = \
core-enums.c \
gimpmarshal.c \
gimp-core-pixbufs.c \
gimp-core-pixbufs.h \
core-enums.c \
gimpmarshal.c \
gimpmarshal.h
libappcore_a_extra_sources = \
......@@ -477,7 +479,13 @@ EXTRA_DIST = \
# rules to generate built sources
#
# setup autogeneration dependencies
gen_sources = xgen-gmh xgen-gmc xgen-cec
gen_sources = \
gimp-core-pixbufs.c \
gimp-core-pixbufs.h \
xgen-gmh \
xgen-gmc \
xgen-cec
CLEANFILES = $(gen_sources)
gimpmarshal.h: $(srcdir)/gimpmarshal.list
......@@ -513,3 +521,13 @@ $(srcdir)/core-enums.c: xgen-cec
touch $@ 2> /dev/null \
|| true; \
fi
gimp-core-pixbufs.h: $(top_builddir)/icons/Color/gimp-core-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/icons/Color --generate-header \
--target=$@ $(top_builddir)/icons/Color/gimp-core-pixbufs.gresource.xml
gimp-core-pixbufs.c: gimp-core-pixbufs.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/icons/Color --generate-source \
--target=$@ $(top_builddir)/icons/Color/gimp-core-pixbufs.gresource.xml
......@@ -39,8 +39,6 @@
#include "gimptempbuf.h"
#include "gimpviewable.h"
#include "icons/Color/gimp-core-pixbufs.c"
enum
{
......
Makefile
Makefile.in
gimp-core-pixbufs.c
gimp-core-pixbufs.gresource.xml
gimp-icon-pixbufs.c
gimp-icon-pixbufs.gresource.xml
......@@ -52,14 +52,11 @@ EXTRA_DIST = \
color-scalable.svg
noinst_DATA = \
gimp-core-pixbufs.c \
gimp-icon-pixbufs.c
CLEANFILES = \
$(noinst_DATA) \
gimp-core-pixbufs.gresource.xml \
gimp-icon-pixbufs.gresource.xml
CLEANFILES = $(noinst_DATA)
gimp-core-pixbufs.gresource.xml: $(CORE_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
......@@ -72,12 +69,6 @@ gimp-core-pixbufs.gresource.xml: $(CORE_IMAGES) Makefile.am
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-core-pixbufs.c: gimp-core-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-core-pixbufs.gresource.xml
gimp-icon-pixbufs.gresource.xml: $(ICON_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
......@@ -88,8 +79,3 @@ gimp-icon-pixbufs.gresource.xml: $(ICON_IMAGES) Makefile.am
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-icon-pixbufs.c: gimp-icon-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-icon-pixbufs.gresource.xml
......@@ -496,15 +496,6 @@ icons256_DATA = \
256/gimp-wilber.png \
256/gimp-wilber-outline.png
## Compiled-in icons for both the core and libgimpwidgets
CORE_IMAGES = \
64/gimp-question.png
ICON_IMAGES = \
64/gimp-wilber-eek.png
EXTRA_DIST = \
$(icons_DATA) \
$(icons12_DATA) \
......@@ -521,46 +512,3 @@ EXTRA_DIST = \
$(icons192_DATA) \
$(icons256_DATA) \
$(tools22_DATA)
noinst_DATA = \
gimp-core-pixbufs.c \
gimp-icon-pixbufs.c
CLEANFILES = \
$(noinst_DATA) \
gimp-core-pixbufs.gresource.xml \
gimp-icon-pixbufs.gresource.xml
gimp-core-pixbufs.gresource.xml: $(CORE_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
echo '<gresources>' >> $@; \
echo ' <gresource prefix="/org/gimp/icons">' >> $@; \
for image in $(CORE_IMAGES); do \
echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-core-pixbufs.c: gimp-core-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-core-pixbufs.gresource.xml
gimp-icon-pixbufs.gresource.xml: $(ICON_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
echo '<gresources>' >> $@; \
echo ' <gresource prefix="/org/gimp/icons">' >> $@; \
for image in $(ICON_IMAGES); do \
echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-icon-pixbufs.c: gimp-icon-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-icon-pixbufs.gresource.xml
......@@ -25,14 +25,6 @@ endif
# SVG=`$(top_srcdir)/tools/extract-vector-icon.sh $< $*` && \
# echo $${SVG} > $@
## Compiled-in icons for both the core and libgimpwidgets
CORE_IMAGES = \
64/gimp-question.png
ICON_IMAGES = \
64/gimp-wilber-eek.png
EXTRA_DIST = \
$(icons_DATA) \
$(icons12_images) \
......@@ -52,46 +44,3 @@ EXTRA_DIST = \
$(symbolic_scalable_images) \
$(symbolic_vector24_images) \
symbolic-scalable.svg
noinst_DATA = \
gimp-core-pixbufs.c \
gimp-icon-pixbufs.c
CLEANFILES = \
$(noinst_DATA) \
gimp-core-pixbufs.gresource.xml \
gimp-icon-pixbufs.gresource.xml
gimp-core-pixbufs.gresource.xml: $(CORE_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
echo '<gresources>' >> $@; \
echo ' <gresource prefix="/org/gimp/icons">' >> $@; \
for image in $(CORE_IMAGES); do \
echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-core-pixbufs.c: gimp-core-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-core-pixbufs.gresource.xml
gimp-icon-pixbufs.gresource.xml: $(ICON_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
echo '<gresources>' >> $@; \
echo ' <gresource prefix="/org/gimp/icons">' >> $@; \
for image in $(ICON_IMAGES); do \
echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-icon-pixbufs.c: gimp-icon-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-icon-pixbufs.gresource.xml
......@@ -5,6 +5,10 @@
/Makefile
/Makefile.in
/_libs
/gimp-color-picker-cursors.c
/gimp-color-picker-cursors.h
/gimp-icon-pixbufs.c
/gimp-icon-pixbufs.h
/gimpwidgetsmarshal.c
/gimpwidgetsmarshal.h
/makefile.mingw
......@@ -13,5 +17,3 @@
/*.trs
/*.log
/xgen-wec
/gimp-color-picker-cursors.c
/gimp-color-picker-cursors.h
......@@ -198,6 +198,8 @@ libgimpwidgets_sources = \
libgimpwidgets_built_sources = \
gimp-color-picker-cursors.c \
gimp-color-picker-cursors.h \
gimp-icon-pixbufs.c \
gimp-icon-pixbufs.h \
gimpwidgetsenums.c \
gimpwidgetsmarshal.c \
gimpwidgetsmarshal.h
......@@ -316,9 +318,12 @@ endif
gen_sources = \
gimp-color-picker-cursors.c \
gimp-color-picker-cursors.h \
gimp-icon-pixbufs.c \
gimp-icon-pixbufs.h \
xgen-wec \
xgen-wmh \
xgen-wmc
CLEANFILES = $(gen_sources)
xgen-wec: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) Makefile.am
......@@ -365,6 +370,16 @@ gimp-color-picker-cursors.c: gimp-color-picker-cursors.h
--sourcedir=$(top_srcdir)/cursors --generate-source \
--target=$@ $(top_builddir)/cursors/gimp-color-picker-cursors.gresource.xml
gimp-icon-pixbufs.h: $(top_builddir)/icons/Color/gimp-icon-pixbufs.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/icons/Color --generate-header \
--target=$@ $(top_builddir)/icons/Color/gimp-icon-pixbufs.gresource.xml
gimp-icon-pixbufs.c: gimp-icon-pixbufs.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/icons/Color --generate-source \
--target=$@ $(top_builddir)/icons/Color/gimp-icon-pixbufs.gresource.xml
#
# test programs, not installed
......
......@@ -27,8 +27,6 @@
#include "gimpicons.h"
#include "icons/Color/gimp-icon-pixbufs.c"
#include "libgimp/libgimp-intl.h"
......
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