build: Require sassc for classic style
Meson has a strict separation of source- and build directory, and expects anything generated in the latter. That means that in order to maintain our current setup - shipping the generated CSS in the repo while also optionally updating it automatically when sassc is found - we have to fight the build system to some extent, which makes it less reliable than we would like. Since we switched to sassc which is a more acceptable build-time dependency than the original ruby-based tool, just drop the CSS from the repo and unconditionally generate it from SASS if classic mode is enabled. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/28
This commit is contained in:
committed by
Florian Müllner
parent
b80aa8ee11
commit
5c0ef12d13
@@ -1,6 +1,2 @@
|
||||
To generate the css files, from the project directory:
|
||||
|
||||
sassc -a gnome-classic.scss gnome-classic.css
|
||||
|
||||
To update the gnome-shell-sass submodule to latest upstream commit:
|
||||
git submodule update --rebase
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+9
-13
@@ -43,22 +43,18 @@ theme_data = [
|
||||
'classic-toggle-off-us.svg',
|
||||
'classic-toggle-on-intl.svg',
|
||||
'classic-toggle-on-us.svg',
|
||||
'gnome-classic.css',
|
||||
'gnome-classic-high-contrast.css'
|
||||
]
|
||||
|
||||
update_theme = files('update-theme.sh')
|
||||
|
||||
if sassc.found()
|
||||
style = 'gnome-classic'
|
||||
custom_target(style + '.css',
|
||||
input: style + '.scss',
|
||||
output: style + '.css',
|
||||
depend_files: theme_sources + files(style + '.css'),
|
||||
command: [update_theme, '@INPUT@', '@OUTPUT@'],
|
||||
build_by_default: true
|
||||
)
|
||||
endif
|
||||
style = 'gnome-classic'
|
||||
custom_target(style + '.css',
|
||||
input: style + '.scss',
|
||||
output: style + '.css',
|
||||
depend_files: theme_sources,
|
||||
command: [sassc, '-a', '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: themedir
|
||||
)
|
||||
|
||||
install_data(theme_data, install_dir: themedir)
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
INPUT=$1
|
||||
OUTPUT=$2
|
||||
|
||||
if [ `which sassc` ]
|
||||
then
|
||||
sassc -a $INPUT | tee ${INPUT%%.scss}.css > $OUTPUT
|
||||
fi
|
||||
+1
-1
@@ -23,7 +23,6 @@ xsessiondir = join_paths(datadir, 'xsession')
|
||||
extensionlib = files('lib/convenience.js')
|
||||
|
||||
js52 = find_program('js52', required: false)
|
||||
sassc = find_program('sassc', required: false)
|
||||
|
||||
ver_arr = meson.project_version().split('.')
|
||||
if ver_arr[1].to_int().is_even()
|
||||
@@ -92,6 +91,7 @@ foreach e : enabled_extensions
|
||||
endforeach
|
||||
|
||||
if classic_mode_enabled
|
||||
sassc = find_program('sassc', required: true)
|
||||
subdir('data')
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user