meson: Use gnome module to compile schemas (#1987)

We don't update icon cache here because we don't install any icons to hicolor dir now.
This commit is contained in:
Ryo Nakano 2024-07-15 09:33:36 +09:00 committed by GitHub
parent f8346f0d4a
commit 5c7fd3629e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 22 deletions

View File

@ -6,7 +6,6 @@ A window & compositing manager based on libmutter and designed by elementary for
## Building, Testing, and Installation ## Building, Testing, and Installation
You'll need the following dependencies: You'll need the following dependencies:
* meson
* gettext (>= 0.19.6) * gettext (>= 0.19.6)
* gsettings-desktop-schemas-dev * gsettings-desktop-schemas-dev
* libcanberra-dev * libcanberra-dev
@ -18,6 +17,7 @@ You'll need the following dependencies:
* libgtk-3-dev (>= 3.10.0) * libgtk-3-dev (>= 3.10.0)
* libmutter-10-dev (>= 42.0) | libmutter-dev (>= 3.18.3) * libmutter-10-dev (>= 42.0) | libmutter-dev (>= 3.18.3)
* libxml2-utils * libxml2-utils
* meson (>= 0.59.0)
* valac (>= 0.46.0) * valac (>= 0.46.0)
Run `meson build` to configure the build environment. Change to the build directory and run `ninja` to build Run `meson build` to configure the build environment. Change to the build directory and run `ninja` to build

View File

@ -1,19 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(prefix, 'share')
# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])
print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', os.path.join(datadir, 'applications')])

View File

@ -1,7 +1,7 @@
project('gala', project('gala',
'c', 'vala', 'c', 'vala',
version: '7.1.3', version: '7.1.3',
meson_version: '>= 0.58.0', meson_version: '>= 0.59.0',
license: 'GPL3', license: 'GPL3',
) )
@ -195,4 +195,7 @@ if vapigen.found()
subdir('vapi') subdir('vapi')
endif endif
meson.add_install_script('build-aux/meson/post_install.py') gnome.post_install(
glib_compile_schemas: true,
update_desktop_database: true
)