diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-01-29 18:40:12 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-02-05 15:08:47 -0500 |
commit | b5100fe86aa83d64957cc2e502bd515dbe24e523 (patch) | |
tree | 129026a3cd49c7e3454e0a5eb6d2cf2ba354a579 /docs/markdown | |
parent | 9226a92fe0111bf84bdad0964e0381c31e5a2379 (diff) | |
download | meson-b5100fe86aa83d64957cc2e502bd515dbe24e523.zip meson-b5100fe86aa83d64957cc2e502bd515dbe24e523.tar.gz meson-b5100fe86aa83d64957cc2e502bd515dbe24e523.tar.bz2 |
gnome: Add post_install() method
Various GNOME projects have scripts that does similar task, better do it
directly in meson. This ensures it's done correctly regarding usage of
subprojects and pkg-config. See for example this gtk bug:
https://gitlab.gnome.org/GNOME/gtk/-/issues/3626.
Fixes: #8268
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Gnome-module.md | 17 | ||||
-rw-r--r-- | docs/markdown/snippets/gnome_install_script.md | 9 |
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index fd58d51..4088061 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -357,3 +357,20 @@ Takes as argument a module name and returns the path where that module's HTML files will be installed. Usually used with `install_data` to install extra files, such as images, to the output directory. + +### gnome.post_install() + +*Since 0.57.0* + +Post-install update of various system wide caches. Each script will be executed +only once even if `gnome.post_install()` is called multiple times from multiple +subprojects. If `DESTDIR` is specified during installation all scripts will be +skipped. + +It takes the following keyword arguments: +- `glib_compile_schemas`: If set to `true`, update `gschemas.compiled` file in + `<prefix>/<datadir>/glib-2.0/schemas`. +- `gio_querymodules`: List of directories relative to `prefix` where + `giomodule.cache` file will be updated. +- `gtk_update_icon_cache`: If set to `true`, update `icon-theme.cache` file in + `<prefix>/<datadir>/icons/hicolor`. diff --git a/docs/markdown/snippets/gnome_install_script.md b/docs/markdown/snippets/gnome_install_script.md new file mode 100644 index 0000000..03fcfe4 --- /dev/null +++ b/docs/markdown/snippets/gnome_install_script.md @@ -0,0 +1,9 @@ +## `gnome.post_install()` + +Post-install update of various system wide caches. Each script will be executed +only once even if `gnome.post_install()` is called multiple times from multiple +subprojects. If `DESTDIR` is specified during installation all scripts will be +skipped. + +Currently supports `glib-compile-schemas`, `gio-querymodules`, and +`gtk-update-icon-cache`. |