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@'
|
'@OUTPUT@'
|
||||||
])
|
])
|
||||||
|
|
||||||
# Re-build the theme files if sassc is available
|
# Build the theme files
|
||||||
theme_deps = []
|
theme_deps = []
|
||||||
sassc = find_program('sassc', required: false)
|
sassc = find_program('sassc', required: false)
|
||||||
if sassc.found()
|
if not sassc.found()
|
||||||
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
|
subproject('sassc')
|
||||||
|
sassc = find_program('sassc', required: true)
|
||||||
subdir('theme/Adwaita')
|
|
||||||
subdir('theme/HighContrast')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
|
||||||
|
|
||||||
|
subdir('theme/Adwaita')
|
||||||
|
subdir('theme/HighContrast')
|
||||||
|
|
||||||
gtkresources = gnome.compile_resources('gtkresources',
|
gtkresources = gnome.compile_resources('gtkresources',
|
||||||
gtk_gresources_xml,
|
gtk_gresources_xml,
|
||||||
dependencies: theme_deps,
|
dependencies: theme_deps,
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
Summary
|
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
|
* 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;
|
* meson will regenerate the CSS every time you modify the SCSS files.
|
||||||
if you do, it 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
|
* 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
|
appear in your builddir.
|
||||||
to commit them.
|
|
||||||
|
|
||||||
How to tweak the theme
|
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