From bf01e3089868895872804a900fbabdc9071ddc2b Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Mon, 15 Jul 2024 07:07:27 +0900 Subject: [PATCH 1/2] meson: Use gnome module to compile schemas --- README.md | 2 +- build-aux/meson/post_install.py | 19 ------------------- meson.build | 8 ++++++-- 3 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 build-aux/meson/post_install.py diff --git a/README.md b/README.md index c660fc976..15e5f6367 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ A window & compositing manager based on libmutter and designed by elementary for ## Building, Testing, and Installation You'll need the following dependencies: -* meson * gettext (>= 0.19.6) * gsettings-desktop-schemas-dev * libcanberra-dev @@ -18,6 +17,7 @@ You'll need the following dependencies: * libgtk-3-dev (>= 3.10.0) * libmutter-10-dev (>= 42.0) | libmutter-dev (>= 3.18.3) * libxml2-utils +* meson (>= 0.59.0) * valac (>= 0.46.0) Run `meson build` to configure the build environment. Change to the build directory and run `ninja` to build diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py deleted file mode 100644 index 3b485435e..000000000 --- a/build-aux/meson/post_install.py +++ /dev/null @@ -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')]) - diff --git a/meson.build b/meson.build index b8c4e7d51..ef789036c 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('gala', 'c', 'vala', version: '7.1.3', - meson_version: '>= 0.58.0', + meson_version: '>= 0.59.0', license: 'GPL3', ) @@ -195,4 +195,8 @@ if vapigen.found() subdir('vapi') endif -meson.add_install_script('build-aux/meson/post_install.py') +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, + update_desktop_database: true +) From 0c12b4a05a7afd4ecf9bd758ceb2c0087f9c50cd Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Mon, 15 Jul 2024 09:22:12 +0900 Subject: [PATCH 2/2] Do not update icon cache Because we don't install any icons to hicolor dir now --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index ef789036c..03593c2a3 100644 --- a/meson.build +++ b/meson.build @@ -197,6 +197,5 @@ endif gnome.post_install( glib_compile_schemas: true, - gtk_update_icon_cache: true, update_desktop_database: true )