Commit 5c0ef12d authored by Florian Müllner's avatar Florian Müllner Committed by Florian Müllner

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.

GNOME/gnome-shell-extensions!28
parent b80aa8ee
Pipeline #3905 failed with stage
in 45 seconds
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
This diff is collapsed.
......@@ -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)
......
#!/bin/sh
INPUT=$1
OUTPUT=$2
if [ `which sassc` ]
then
sassc -a $INPUT | tee ${INPUT%%.scss}.css > $OUTPUT
fi
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment