diff --git a/common/Makefile.am b/common/Makefile.am index df62c44a7..968af5b82 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -239,7 +239,22 @@ endif # ENABLE_DARK endif #!ENABLE_TRANSPARENCY -#GTK32xCOMPILE + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ + compile-gresources.sh \ + $(ithemedir)/gtk-3.0/compile-gresources.sh + + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ + compile-gresources.sh \ + $(ithemedarkdir)/gtk-3.0/compile-gresources.sh + + cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ + 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/compile-gresources.sh b/common/compile-gresources.sh new file mode 100755 index 000000000..8278c375e --- /dev/null +++ b/common/compile-gresources.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# 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 diff --git a/common/gtk-3.0/3.20/compile-script.txt b/common/gtk-3.0/3.20/compile-script.txt deleted file mode 100644 index d1945b00b..000000000 --- a/common/gtk-3.0/3.20/compile-script.txt +++ /dev/null @@ -1,15 +0,0 @@ - cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ - compile-gresources.sh \ - $(ithemedir)/gtk-3.0/compile-gresources.sh - - cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ - compile-gresources.sh \ - $(ithemedarkdir)/gtk-3.0/compile-gresources.sh - - cd $(srcdir)/gtk-3.0/$(GNOME_VERSION) && cp -RL \ - 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 diff --git a/configure.ac b/configure.ac index 3ee382e7f..c3d0eef36 100644 --- a/configure.ac +++ b/configure.ac @@ -36,10 +36,3 @@ AC_CONFIG_FILES([ ]) AC_OUTPUT - -# For 3.2 and later add compile resources script -AS_IF( - [test `expr $GNOME_VERSMNR` != "18"], - [sed -i '/#GTK32xCOMPILE/r ./common/gtk-3.0/3.20/compile-script.txt' ./common/Makefile] - [AC_MSG_RESULT([Adding resource compilation])] -)