diff --git a/common/Makefile.am b/common/Makefile.am index 8e496fbfc..24bb8dd2b 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -190,6 +190,23 @@ endif # ENABLE_DARK endif #!ENABLE_TRANSPARENCY + + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -R \ + compile-gresources.sh \ + $(ithemedir)/gtk-3.0/compile-gresources.sh + + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -R \ + compile-gresources.sh \ + $(ithemedarkdir)/gtk-3.0/compile-gresources.sh + + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -R \ + compile-gresources.sh \ + $(ithemedarkerdir)/gtk-3.0/compile-gresources.sh + + cd $(ithemedir)/gtk-3.0/ && ./compile-gresources.sh + cd $(ithemedarkdir)/gtk-3.0/ && ./compile-gresources.sh + cd $(ithemedarkerdir)/gtk-3.0/ && ./compile-gresources.sh + endif # ENABLE_GTK3 diff --git a/common/gtk-3.0/3.20/compile-gresources.sh b/common/gtk-3.0/3.20/compile-gresources.sh new file mode 100755 index 000000000..eb17d5c6b --- /dev/null +++ b/common/gtk-3.0/3.20/compile-gresources.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +# Setup +mv gtk.css gtk-main.css +mv gtk-dark.css gtk-main-dark.css + + +# Get processed assets lists +ls ./assets | sort > temp_asset_list.txt + + +# Build dynamic gresouce xml spec from css and assets +read -d '' RES_PART1 <<"EOF" + + + +EOF +echo $RES_PART1 > gtk.gresource.xml + + +# Import as nodes the file assets +xargs -i echo 'assets/{}' >> gtk.gresource.xml < temp_asset_list.txt +rm -f temp_asset_list.txt + + +# Write the css file information to the template +read -d '' RES_PART2 <<"EOF" +gtk-main.css +gtk-main-dark.css + + +EOF +echo $RES_PART2 >> gtk.gresource.xml + +# Compile the gresource file +glib-compile-resources gtk.gresource.xml +echo '@import url("resource:///org/gnome/arc-theme/gtk-main.css");' > gtk.css +echo '@import url("resource:///org/gnome/arc-theme/gtk-main-dark.css");' > gtk-dark.css + + +# Cleanup +rm -rf assets +rm -f gtk.gresource.xml +rm -f gtk-main.css +rm -f gtk-main-dark.css +rm -f compile-gresources.sh