mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
conf: move config file to datadir
Install the config file in $PREFIX/share/pipewire so that a factory reset can be done by wiping /etc and /home. Add this new directory to the search path. System wide config can still be done in /etc, user config in $HOME/.config/pipewire/ by copying files from $PREFIX/share/pipewire Fixes #1191
This commit is contained in:
parent
d9240bb766
commit
1609126bcd
6 changed files with 25 additions and 15 deletions
|
|
@ -395,6 +395,9 @@
|
||||||
|
|
||||||
/* directory where config files are located */
|
/* directory where config files are located */
|
||||||
#mesondefine PIPEWIRE_CONFIG_DIR
|
#mesondefine PIPEWIRE_CONFIG_DIR
|
||||||
|
#
|
||||||
|
/* directory where data files are located */
|
||||||
|
#mesondefine PIPEWIRE_CONFDATADIR
|
||||||
|
|
||||||
/* directory where plugins are located */
|
/* directory where plugins are located */
|
||||||
#mesondefine PLUGINDIR
|
#mesondefine PLUGINDIR
|
||||||
|
|
|
||||||
21
meson.build
21
meson.build
|
|
@ -37,6 +37,7 @@ pipewire_localedir = prefix / get_option('localedir')
|
||||||
pipewire_sysconfdir = prefix / get_option('sysconfdir')
|
pipewire_sysconfdir = prefix / get_option('sysconfdir')
|
||||||
|
|
||||||
pipewire_configdir = pipewire_sysconfdir / 'pipewire'
|
pipewire_configdir = pipewire_sysconfdir / 'pipewire'
|
||||||
|
pipewire_confdatadir = pipewire_datadir / 'pipewire'
|
||||||
modules_install_dir = pipewire_libdir / pipewire_name
|
modules_install_dir = pipewire_libdir / pipewire_name
|
||||||
|
|
||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
|
|
@ -182,11 +183,11 @@ cdata.set('PIPEWIRE_VERSION_MAJOR', pipewire_version_major)
|
||||||
cdata.set('PIPEWIRE_VERSION_MINOR', pipewire_version_minor)
|
cdata.set('PIPEWIRE_VERSION_MINOR', pipewire_version_minor)
|
||||||
cdata.set('PIPEWIRE_VERSION_MICRO', pipewire_version_micro)
|
cdata.set('PIPEWIRE_VERSION_MICRO', pipewire_version_micro)
|
||||||
cdata.set('PIPEWIRE_VERSION_NANO', pipewire_version_nano)
|
cdata.set('PIPEWIRE_VERSION_NANO', pipewire_version_nano)
|
||||||
cdata.set('PIPEWIRE_API_VERSION', '"@0@"'.format(apiversion))
|
cdata.set_quoted('PIPEWIRE_API_VERSION', apiversion)
|
||||||
cdata.set('PIPEWIRE_DATADIR', '"@0@"'.format(pipewire_datadir))
|
cdata.set_quoted('PIPEWIRE_CONFDATADIR', pipewire_confdatadir)
|
||||||
cdata.set('LOCALEDIR', '"@0@"'.format(pipewire_localedir))
|
cdata.set_quoted('LOCALEDIR', pipewire_localedir)
|
||||||
cdata.set('LIBDIR', '"@0@"'.format(pipewire_libdir))
|
cdata.set_quoted('LIBDIR', pipewire_libdir)
|
||||||
cdata.set('GETTEXT_PACKAGE', '"@0@"'.format(meson.project_name()))
|
cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||||
cdata.set('PIPEWIRE_LICENSE', '"MIT"')
|
cdata.set('PIPEWIRE_LICENSE', '"MIT"')
|
||||||
cdata.set('PIPEWIRE_PACKAGE_ORIGIN', '"Unknown package origin"')
|
cdata.set('PIPEWIRE_PACKAGE_ORIGIN', '"Unknown package origin"')
|
||||||
cdata.set('PIPEWIRE_PACKAGE_NAME', '"PipeWire source release"')
|
cdata.set('PIPEWIRE_PACKAGE_NAME', '"PipeWire source release"')
|
||||||
|
|
@ -195,11 +196,11 @@ cdata.set('PACKAGE_NAME', '"PipeWire"')
|
||||||
cdata.set('PACKAGE_STRING', '"PipeWire @0@"'.format(pipewire_version))
|
cdata.set('PACKAGE_STRING', '"PipeWire @0@"'.format(pipewire_version))
|
||||||
cdata.set('PACKAGE_TARNAME', '"pipewire"')
|
cdata.set('PACKAGE_TARNAME', '"pipewire"')
|
||||||
cdata.set('PACKAGE_URL', '"http://pipewire.org"')
|
cdata.set('PACKAGE_URL', '"http://pipewire.org"')
|
||||||
cdata.set('PACKAGE_VERSION', '"@0@"'.format(pipewire_version))
|
cdata.set_quoted('PACKAGE_VERSION', pipewire_version)
|
||||||
cdata.set('MODULEDIR', '"@0@"'.format(modules_install_dir))
|
cdata.set_quoted('MODULEDIR', modules_install_dir)
|
||||||
cdata.set('PIPEWIRE_CONFIG_DIR', '"@0@"'.format(pipewire_configdir))
|
cdata.set_quoted('PIPEWIRE_CONFIG_DIR', pipewire_configdir)
|
||||||
cdata.set('VERSION', '"@0@"'.format(pipewire_version))
|
cdata.set_quoted('VERSION', pipewire_version)
|
||||||
cdata.set('PLUGINDIR', '"@0@"'.format(spa_plugindir))
|
cdata.set_quoted('PLUGINDIR', spa_plugindir)
|
||||||
# FIXME: --with-memory-alignment],[8,N,malloc,pagesize (default is 32)]) option
|
# FIXME: --with-memory-alignment],[8,N,malloc,pagesize (default is 32)]) option
|
||||||
cdata.set('MEMORY_ALIGNMENT_MALLOC', 1)
|
cdata.set('MEMORY_ALIGNMENT_MALLOC', 1)
|
||||||
cdata.set_quoted('PA_ALSA_PATHS_DIR', alsadatadir / 'paths')
|
cdata.set_quoted('PA_ALSA_PATHS_DIR', alsadatadir / 'paths')
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ foreach c : conf_files
|
||||||
configure_file(input : c.get(0),
|
configure_file(input : c.get(0),
|
||||||
output : c.get(1),
|
output : c.get(1),
|
||||||
configuration : conf_config,
|
configuration : conf_config,
|
||||||
install_dir : conf_install_dir / 'filter-chain')
|
install_dir : pipewire_confdatadir / 'filter-chain')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ foreach c : conf_files
|
||||||
configure_file(input : c.get(0),
|
configure_file(input : c.get(0),
|
||||||
output : c.get(1),
|
output : c.get(1),
|
||||||
configuration : conf_config,
|
configuration : conf_config,
|
||||||
install_dir : conf_install_dir / 'media-session.d')
|
install_dir : pipewire_confdatadir / 'media-session.d')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
sources : [
|
sources : [
|
||||||
'with-jack',
|
'with-jack',
|
||||||
'with-pulseaudio' ],
|
'with-pulseaudio' ],
|
||||||
install_dir : conf_install_dir / 'media-session.d')
|
install_dir : pipewire_confdatadir / 'media-session.d')
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ conf_config.set('media_session_path', pipewire_bindir / 'pipewire-media-session'
|
||||||
conf_config.set('pipewire_path', pipewire_bindir / 'pipewire')
|
conf_config.set('pipewire_path', pipewire_bindir / 'pipewire')
|
||||||
conf_config.set('pipewire_pulse_path', pipewire_bindir / 'pipewire-pulse')
|
conf_config.set('pipewire_pulse_path', pipewire_bindir / 'pipewire-pulse')
|
||||||
conf_config.set('comment', '#')
|
conf_config.set('comment', '#')
|
||||||
conf_install_dir = get_option('sysconfdir') / 'pipewire'
|
|
||||||
|
|
||||||
conf_config_uninstalled = conf_config
|
conf_config_uninstalled = conf_config
|
||||||
conf_config_uninstalled.set('media_session_path',
|
conf_config_uninstalled.set('media_session_path',
|
||||||
|
|
@ -38,7 +37,7 @@ foreach c : conf_files
|
||||||
configure_file(input : c.get(0),
|
configure_file(input : c.get(0),
|
||||||
output : c.get(1),
|
output : c.get(1),
|
||||||
configuration : conf_config,
|
configuration : conf_config,
|
||||||
install_dir : conf_install_dir)
|
install_dir : pipewire_confdatadir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
configure_file(input : 'pipewire.conf.in',
|
configure_file(input : 'pipewire.conf.in',
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,13 @@ static int get_read_path(char *path, size_t size, const char *prefix, const char
|
||||||
access(path, R_OK) == 0)
|
access(path, R_OK) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
dir = PIPEWIRE_CONFDATADIR;
|
||||||
|
if (dir != NULL) {
|
||||||
|
const char *paths[] = { dir, prefix, name, NULL };
|
||||||
|
if (make_path(path, size, paths) == 0 &&
|
||||||
|
access(path, R_OK) == 0)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue