2017-09-05 13:35:25 +02:00
|
|
|
pipewire_daemon_sources = [
|
2021-02-25 13:35:04 +01:00
|
|
|
'pipewire.c',
|
2017-05-23 19:15:33 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
conf_config = configuration_data()
|
2018-10-11 09:41:30 +02:00
|
|
|
conf_config.set('VERSION', '"@0@"'.format(pipewire_version))
|
2021-06-02 15:22:49 +02:00
|
|
|
conf_config.set('PIPEWIRE_CONFIG_DIR', pipewire_configdir)
|
2021-06-16 19:50:16 +03:00
|
|
|
conf_config.set('session_manager_path', pipewire_bindir / 'pipewire-media-session')
|
|
|
|
|
conf_config.set('session_manager_args', '')
|
2021-04-15 14:41:04 +10:00
|
|
|
conf_config.set('pipewire_path', pipewire_bindir / 'pipewire')
|
|
|
|
|
conf_config.set('pipewire_pulse_path', pipewire_bindir / 'pipewire-pulse')
|
2021-09-08 08:40:42 +10:00
|
|
|
conf_config.set('sm_comment', '#')
|
|
|
|
|
conf_config.set('pulse_comment', '#')
|
2024-02-15 11:53:32 +01:00
|
|
|
conf_config.set('rtprio_server', get_option('rtprio-server'))
|
|
|
|
|
conf_config.set('rtprio_client', get_option('rtprio-client'))
|
2017-05-23 19:15:33 +02:00
|
|
|
|
2020-06-06 10:23:58 +02:00
|
|
|
conf_config_uninstalled = conf_config
|
2021-02-11 21:01:58 +01:00
|
|
|
conf_config_uninstalled.set('pipewire_path',
|
2021-12-28 16:35:20 +01:00
|
|
|
meson.project_build_root() / 'src' / 'daemon' / 'pipewire')
|
2020-11-12 17:43:42 +01:00
|
|
|
conf_config_uninstalled.set('pipewire_pulse_path',
|
2021-12-28 16:35:20 +01:00
|
|
|
meson.project_build_root() / 'src' / 'daemon' / 'pipewire-pulse')
|
2021-09-08 08:40:42 +10:00
|
|
|
conf_config_uninstalled.set('pulse_comment', '')
|
2020-06-06 10:23:58 +02:00
|
|
|
|
2021-10-26 12:46:05 +10:00
|
|
|
build_ms = 'media-session' in get_option('session-managers')
|
|
|
|
|
build_wp = 'wireplumber' in get_option('session-managers')
|
2021-09-08 08:47:46 +10:00
|
|
|
default_sm = get_option('session-managers').get(0, '')
|
2021-09-07 15:56:14 +10:00
|
|
|
|
2023-08-17 01:02:16 +02:00
|
|
|
build_vk = get_option('vulkan').enabled()
|
|
|
|
|
|
2021-09-07 15:56:14 +10:00
|
|
|
summary({'Build media-session': build_ms,
|
|
|
|
|
'Build wireplumber': build_wp,
|
2021-09-08 08:47:46 +10:00
|
|
|
'Default session-manager': default_sm},
|
2021-09-07 15:56:14 +10:00
|
|
|
section: 'Session managers',
|
|
|
|
|
bool_yn: true)
|
2021-06-24 16:54:36 +03:00
|
|
|
|
2021-09-08 08:47:46 +10:00
|
|
|
if build_wp
|
|
|
|
|
wp_proj = subproject('wireplumber', required : true)
|
2021-06-24 16:54:36 +03:00
|
|
|
endif
|
2021-10-14 10:24:21 +10:00
|
|
|
if build_ms
|
|
|
|
|
ms_proj = subproject('media-session', required : true)
|
|
|
|
|
endif
|
2021-06-16 19:50:16 +03:00
|
|
|
|
2021-09-08 08:47:46 +10:00
|
|
|
if default_sm == ''
|
|
|
|
|
summary({'No session manager': 'pw-uninstalled.sh will not work out of the box!'})
|
|
|
|
|
elif default_sm == 'media-session'
|
2021-10-14 10:24:21 +10:00
|
|
|
ms_bindir = ms_proj.get_variable('media_session_bin_dir', pipewire_bindir)
|
|
|
|
|
conf_config.set('session_manager_path', ms_bindir / 'pipewire-media-session')
|
|
|
|
|
|
2021-10-21 13:59:31 +10:00
|
|
|
ms_uninstalled = ms_proj.get_variable('media_session_uninstalled')
|
|
|
|
|
conf_config_uninstalled.set('session_manager_path', ms_uninstalled.full_path())
|
|
|
|
|
conf_config_uninstalled.set('session_manager_args', 'pipewire-media-session')
|
2021-09-08 08:47:46 +10:00
|
|
|
conf_config_uninstalled.set('sm_comment', '')
|
|
|
|
|
elif default_sm == 'wireplumber'
|
|
|
|
|
wp_bindir = wp_proj.get_variable('wireplumber_bin_dir', pipewire_bindir)
|
|
|
|
|
conf_config.set('session_manager_path', wp_bindir / 'wireplumber')
|
2021-06-16 19:50:16 +03:00
|
|
|
|
2021-10-21 13:59:31 +10:00
|
|
|
wp_uninstalled = wp_proj.get_variable('wireplumber_uninstalled')
|
|
|
|
|
conf_config_uninstalled.set('session_manager_path', wp_uninstalled.full_path())
|
|
|
|
|
conf_config_uninstalled.set('session_manager_args', 'wireplumber')
|
2021-09-08 08:47:46 +10:00
|
|
|
conf_config_uninstalled.set('sm_comment', '')
|
2021-10-23 10:51:16 +01:00
|
|
|
else
|
|
|
|
|
conf_config_uninstalled.set('session_manager_path', default_sm)
|
|
|
|
|
conf_config_uninstalled.set('sm_comment', '')
|
2021-06-16 19:50:16 +03:00
|
|
|
endif
|
2021-02-10 19:57:35 +01:00
|
|
|
|
2021-02-11 17:54:21 +01:00
|
|
|
conf_files = [
|
2021-06-11 11:58:32 +10:00
|
|
|
'pipewire.conf',
|
|
|
|
|
'client.conf',
|
2022-07-11 10:00:46 +02:00
|
|
|
'filter-chain.conf',
|
2021-06-11 11:58:32 +10:00
|
|
|
'jack.conf',
|
2022-01-18 12:47:52 +01:00
|
|
|
'minimal.conf',
|
2021-06-11 11:58:32 +10:00
|
|
|
'pipewire-pulse.conf',
|
2022-03-15 18:16:00 +01:00
|
|
|
'pipewire-avb.conf',
|
2022-11-03 11:56:00 +03:00
|
|
|
'pipewire-aes67.conf',
|
2021-02-11 17:54:21 +01:00
|
|
|
]
|
2021-02-10 19:57:35 +01:00
|
|
|
|
2023-08-17 01:02:16 +02:00
|
|
|
if build_vk
|
|
|
|
|
conf_files += 'pipewire-vulkan.conf'
|
|
|
|
|
endif
|
|
|
|
|
|
2021-02-11 17:54:21 +01:00
|
|
|
foreach c : conf_files
|
2024-03-26 18:08:52 +02:00
|
|
|
res = configure_file(input : '@0@.in'.format(c),
|
2021-06-11 11:58:32 +10:00
|
|
|
output : c,
|
2021-02-11 17:54:21 +01:00
|
|
|
configuration : conf_config,
|
2021-05-17 16:22:31 +02:00
|
|
|
install_dir : pipewire_confdatadir)
|
2024-03-26 18:08:52 +02:00
|
|
|
test(f'validate-json-@c@', spa_json_dump_exe, args : res)
|
2021-02-11 17:54:21 +01:00
|
|
|
endforeach
|
2017-05-23 19:15:33 +02:00
|
|
|
|
2024-03-26 18:08:52 +02:00
|
|
|
res = configure_file(input : 'pipewire.conf.in',
|
2020-06-06 10:23:58 +02:00
|
|
|
output : 'pipewire-uninstalled.conf',
|
2020-06-10 13:24:21 +02:00
|
|
|
configuration : conf_config_uninstalled)
|
2024-03-26 18:08:52 +02:00
|
|
|
test('validate-json-pipewire-uninstalled.conf', spa_json_dump_exe, args : res)
|
2017-08-17 19:01:11 +02:00
|
|
|
|
2023-03-24 22:13:34 +02:00
|
|
|
conf_avail_folders = [
|
|
|
|
|
'pipewire.conf.avail',
|
|
|
|
|
'client.conf.avail',
|
|
|
|
|
'pipewire-pulse.conf.avail',
|
2023-03-22 15:21:55 +01:00
|
|
|
]
|
|
|
|
|
|
2023-03-24 22:13:34 +02:00
|
|
|
foreach c : conf_avail_folders
|
2023-03-22 15:21:55 +01:00
|
|
|
subdir(c)
|
|
|
|
|
endforeach
|
|
|
|
|
|
2021-03-14 13:32:08 +08:00
|
|
|
pipewire_exec = executable('pipewire',
|
2017-09-05 13:35:25 +02:00
|
|
|
pipewire_daemon_sources,
|
2017-05-23 19:15:33 +02:00
|
|
|
install: true,
|
2022-11-03 11:56:00 +03:00
|
|
|
include_directories : [ configinc ],
|
|
|
|
|
dependencies : [ spa_dep, pipewire_dep, ],
|
|
|
|
|
)
|
|
|
|
|
|
2021-03-14 13:32:08 +08:00
|
|
|
ln = find_program('ln')
|
|
|
|
|
|
2023-08-17 01:02:16 +02:00
|
|
|
pipewire_aliases = [
|
|
|
|
|
'pipewire-pulse',
|
|
|
|
|
'pipewire-avb',
|
|
|
|
|
'pipewire-aes67',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if build_vk
|
|
|
|
|
pipewire_aliases += 'pipewire-vulkan'
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
foreach alias : pipewire_aliases
|
2023-03-10 01:13:09 +01:00
|
|
|
custom_target(
|
|
|
|
|
alias,
|
|
|
|
|
build_by_default: true,
|
|
|
|
|
install: false,
|
|
|
|
|
command: [ln, '-sf', meson.project_build_root() + '/@INPUT@', '@OUTPUT@'],
|
|
|
|
|
input: pipewire_exec,
|
|
|
|
|
output: alias,
|
|
|
|
|
)
|
|
|
|
|
install_symlink(
|
|
|
|
|
alias,
|
|
|
|
|
pointing_to: pipewire_exec.name(),
|
|
|
|
|
install_dir: pipewire_bindir,
|
|
|
|
|
)
|
|
|
|
|
endforeach
|
|
|
|
|
|
2021-03-14 13:32:08 +08:00
|
|
|
custom_target('pipewire-uninstalled',
|
|
|
|
|
build_by_default: true,
|
|
|
|
|
install: false,
|
|
|
|
|
input: pipewire_exec,
|
|
|
|
|
output: 'pipewire-uninstalled',
|
2021-12-28 16:35:20 +01:00
|
|
|
command: [ln, '-fs', meson.project_build_root() + '/@INPUT@', '@OUTPUT@'],
|
2021-03-14 13:32:08 +08:00
|
|
|
)
|
|
|
|
|
|
2021-01-08 11:04:03 +01:00
|
|
|
#desktop_file = i18n.merge_file(
|
|
|
|
|
# input : 'pipewire.desktop.in',
|
|
|
|
|
# output : 'pipewire.desktop',
|
|
|
|
|
# po_dir : po_dir,
|
|
|
|
|
# type : 'desktop',
|
2021-01-08 10:26:46 +01:00
|
|
|
# install : true,
|
2021-04-15 14:41:04 +10:00
|
|
|
# install_dir : pipewire_sysconfdir / 'xdg' / 'autostart'
|
2021-01-08 11:04:03 +01:00
|
|
|
#)
|
|
|
|
|
#
|
|
|
|
|
#desktop_utils = find_program('desktop-file-validate', required: false)
|
|
|
|
|
#if desktop_utils.found()
|
|
|
|
|
# test('Validate desktop file', desktop_utils,
|
|
|
|
|
# args: [ desktop_file ],
|
|
|
|
|
# )
|
|
|
|
|
#endif
|
2021-01-08 10:26:46 +01:00
|
|
|
|
2021-05-07 16:27:06 +02:00
|
|
|
subdir('filter-chain')
|
2021-03-10 15:36:27 -03:00
|
|
|
if systemd.found()
|
2018-10-18 09:50:43 +02:00
|
|
|
subdir('systemd')
|
2017-12-14 09:30:34 +01:00
|
|
|
endif
|