forked from AuroraMiddleware/gtk
build: require sassc and drop generated .css files
Instead of requiring sassc to be installed add meson subprojects which build libsass and sassc (currently both forks of mine, tested under linux/mingw/msvc) when needed. This allows us to drop the generated .css files and build scripts from git. See #1502
This commit is contained in:
parent
99c89d61e1
commit
4071e1e734
@ -767,16 +767,19 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
|
||||
'@OUTPUT@'
|
||||
])
|
||||
|
||||
# Re-build the theme files if sassc is available
|
||||
# Build the theme files
|
||||
theme_deps = []
|
||||
sassc = find_program('sassc', required: false)
|
||||
if sassc.found()
|
||||
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
|
||||
|
||||
subdir('theme/Adwaita')
|
||||
subdir('theme/HighContrast')
|
||||
if not sassc.found()
|
||||
subproject('sassc')
|
||||
sassc = find_program('sassc', required: true)
|
||||
endif
|
||||
|
||||
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
|
||||
|
||||
subdir('theme/Adwaita')
|
||||
subdir('theme/HighContrast')
|
||||
|
||||
gtkresources = gnome.compile_resources('gtkresources',
|
||||
gtk_gresources_xml,
|
||||
dependencies: theme_deps,
|
||||
|
@ -1,13 +1,10 @@
|
||||
Summary
|
||||
-------
|
||||
|
||||
* Do not edit the CSS directly, edit the source SCSS files
|
||||
* To be able to use the latest/adequate version of sass, install sassc
|
||||
* The configure script will detect whether or not you have sassc installed;
|
||||
if you do, it will regenerate the CSS every time you modify the SCSS files.
|
||||
* meson will regenerate the CSS every time you modify the SCSS files.
|
||||
* Note that meson always builds out-of-tree, so the modified css files will
|
||||
appear in your builddir, and you need to copy them back to the srcdir
|
||||
to commit them.
|
||||
appear in your builddir.
|
||||
|
||||
How to tweak the theme
|
||||
----------------------
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ ! "$(which sassc 2> /dev/null)" ]; then
|
||||
echo sassc needs to be installed to generate the css.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SASSC_OPT="-M -t compact"
|
||||
|
||||
echo Generating the css...
|
||||
|
||||
sassc $SASSC_OPT gtk-contained.scss gtk-contained.css
|
||||
sassc $SASSC_OPT gtk-contained-dark.scss gtk-contained-dark.css
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ ! "$(which sassc 2> /dev/null)" ]; then
|
||||
echo sassc needs to be installed to generate the css.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SASSC_OPT="-M -t compact"
|
||||
|
||||
echo Generating the css...
|
||||
|
||||
sassc $SASSC_OPT gtk-contained.scss gtk-contained.css
|
||||
sassc $SASSC_OPT gtk-contained-inverse.scss gtk-contained-inverse.css
|
4
subprojects/libsass.wrap
Normal file
4
subprojects/libsass.wrap
Normal file
@ -0,0 +1,4 @@
|
||||
[wrap-git]
|
||||
directory=libsass
|
||||
url=https://github.com/lazka/libsass.git
|
||||
revision=meson
|
4
subprojects/sassc.wrap
Normal file
4
subprojects/sassc.wrap
Normal file
@ -0,0 +1,4 @@
|
||||
[wrap-git]
|
||||
directory=sassc
|
||||
url=https://github.com/lazka/sassc.git
|
||||
revision=meson
|
Loading…
Reference in New Issue
Block a user