post install: query media modules

This commit is contained in:
Luca Bacci 2022-01-14 18:53:36 +01:00
parent 06e5da456f
commit ef1905a665
No known key found for this signature in database
GPG Key ID: 8E3C8D989C98883D
2 changed files with 8 additions and 4 deletions

View File

@ -13,7 +13,7 @@ if 'DESTDIR' not in os.environ:
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version) gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends') gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules') gtk_mediamodule_dir = os.path.join(gtk_moduledir, 'media')
print('Compiling GSettings schemas...') print('Compiling GSettings schemas...')
glib_compile_schemas = subprocess.check_output(['pkg-config', glib_compile_schemas = subprocess.check_output(['pkg-config',
@ -40,6 +40,6 @@ if 'DESTDIR' not in os.environ:
gio_querymodules = 'gio-querymodules' gio_querymodules = 'gio-querymodules'
subprocess.call([gio_querymodules, gtk_printmodule_dir]) subprocess.call([gio_querymodules, gtk_printmodule_dir])
print('Updating module cache for input methods...') print('Updating module cache for media backends...')
os.makedirs(gtk_immodule_dir, exist_ok=True) os.makedirs(gtk_mediamodule_dir, exist_ok=True)
subprocess.call([gio_querymodules, gtk_immodule_dir]) subprocess.call([gio_querymodules, gtk_mediamodule_dir])

View File

@ -69,3 +69,7 @@ if gstplayer_dep.found() and gstgl_dep.found()
install: true, install: true,
) )
endif endif
if media_backends.length() > 0
gio_module_dirs += media_install_dir
endif