Merge branch 'dist-css' into 'master'

dist: Add a dist script to generate css

See merge request GNOME/gtk!3074
This commit is contained in:
Matthias Clasen 2021-01-12 14:04:51 +00:00
commit 9861c7d25c
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/env python3
import os
from pathlib import PurePath
import subprocess
stylesheets = [ 'gtk/theme/Adwaita/Adwaita.css',
'gtk/theme/Adwaita/Adwaita-dark.css',
'gtk/theme/HighContrast/HighContrast.css',
'gtk/theme/HighContrast/HighContrast-inverse.css' ]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for stylesheet in stylesheets:
stylesheet_path = PurePath(stylesheet)
src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
dst = PurePath(distroot, stylesheet_path)
subprocess.call(['sassc', '-a', '-M', '-t', 'compact', src, dst])

View File

@ -803,6 +803,8 @@ else
message('Not executing post-install steps automatically when cross compiling') message('Not executing post-install steps automatically when cross compiling')
endif endif
meson.add_dist_script('build-aux/meson/dist-theme.py')
if host_machine.system() != 'windows' if host_machine.system() != 'windows'
# Install Valgrind suppression files (except on Windows, # Install Valgrind suppression files (except on Windows,
# as Valgrind is currently not supported on Windows) # as Valgrind is currently not supported on Windows)