Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julian Bouzas
WirePlumber
Commits
2578ec42
Commit
2578ec42
authored
Nov 20, 2019
by
Julian Bouzas
Browse files
src: set the default configuration path when wireplumber starts
parent
77ec4c54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
2578ec42
...
...
@@ -13,6 +13,7 @@ clean:
run
:
all
WIREPLUMBER_MODULE_DIR
=
build/modules
\
WIREPLUMBER_CONFIG_FILE
=
src/wireplumber.conf
\
WIREPLUMBER_CONFIG_DIR
=
src/wireplumber
\
$(DBG)
./build/src/wireplumber
test
:
all
...
...
src/main.c
View file @
2578ec42
...
...
@@ -284,8 +284,10 @@ main (gint argc, gchar **argv)
struct
WpDaemonData
data
=
{
0
};
g_autoptr
(
GOptionContext
)
context
=
NULL
;
g_autoptr
(
GError
)
error
=
NULL
;
g_autoptr
(
WpConfiguration
)
config
=
NULL
;
g_autoptr
(
WpCore
)
core
=
NULL
;
g_autoptr
(
GMainLoop
)
loop
=
NULL
;
const
gchar
*
configuration_path
;
context
=
g_option_context_new
(
"- PipeWire Session/Policy Manager"
);
g_option_context_add_main_entries
(
context
,
entries
,
NULL
);
...
...
@@ -301,6 +303,14 @@ main (gint argc, gchar **argv)
g_signal_connect
(
core
,
"remote-state-changed"
,
(
GCallback
)
remote_state_changed
,
&
data
);
/* init configuration */
configuration_path
=
g_getenv
(
"WIREPLUMBER_CONFIG_DIR"
);
if
(
!
configuration_path
)
configuration_path
=
WIREPLUMBER_DEFAULT_CONFIG_DIR
;
config
=
wp_configuration_get_instance
(
core
);
wp_configuration_add_path
(
config
,
configuration_path
);
/* init main loop */
data
.
loop
=
loop
=
g_main_loop_new
(
NULL
,
FALSE
);
...
...
src/meson.build
View file @
2578ec42
...
...
@@ -7,6 +7,10 @@ install_data('wireplumber.conf',
install_dir: wireplumber_config_dir
)
install_subdir('wireplumber',
install_dir: wireplumber_config_dir
)
executable('wireplumber',
wp_sources,
c_args : [
...
...
@@ -14,6 +18,7 @@ executable('wireplumber',
'-DG_LOG_USE_STRUCTURED',
'-DG_LOG_DOMAIN="wireplumber"',
'-DWIREPLUMBER_DEFAULT_CONFIG_FILE="@0@"'.format(wireplumber_config_file),
'-DWIREPLUMBER_DEFAULT_CONFIG_DIR="@0@"'.format(wireplumber_config_dir),
],
install: true,
dependencies : [gobject_dep, gio_dep, wp_dep, pipewire_dep],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment