mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 13:32:16 +00:00
player: dump list of satisfied deps instead of config.h with -v
Starting to get tired of seeing the full config.h in verbose output every time. Make it slightly more elegant by outputting the list of satisfied dependencies instead.
This commit is contained in:
parent
7e9c441d41
commit
8a4239e0c2
@ -130,7 +130,7 @@ void mp_print_version(struct mp_log *log, int always)
|
||||
// Only in verbose mode.
|
||||
if (!always) {
|
||||
mp_msg(log, MSGL_V, "Configuration: " CONFIGURATION "\n");
|
||||
mp_msg(log, MSGL_V, "config.h:\n%s\n", FULLCONFIG);
|
||||
mp_msg(log, MSGL_V, "List of enabled features: %s\n", FULLCONFIG);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,11 +39,21 @@ def __write_version_h__(ctx):
|
||||
def __escape_c_string(s):
|
||||
return s.replace("\"", "\\\"").replace("\n", "\\n")
|
||||
|
||||
def __get_features_string__(ctx):
|
||||
from inflectors import DependencyInflector
|
||||
stuff = []
|
||||
for dependency_identifier in ctx.satisfied_deps:
|
||||
defkey = DependencyInflector(dependency_identifier).define_key()
|
||||
if ctx.is_defined(defkey) and ctx.get_define(defkey) == "1":
|
||||
stuff.append(dependency_identifier)
|
||||
stuff.sort()
|
||||
return " ".join(stuff)
|
||||
|
||||
def __add_mpv_defines__(ctx):
|
||||
from sys import argv
|
||||
ctx.define("CONFIGURATION", " ".join(argv))
|
||||
ctx.define("MPV_CONFDIR", ctx.env.CONFDIR)
|
||||
ctx.define("FULLCONFIG", "\\n" + __escape_c_string(ctx.get_config_header()) + "\\n")
|
||||
ctx.define("FULLCONFIG", __escape_c_string(__get_features_string__(ctx)))
|
||||
|
||||
def configure(ctx):
|
||||
__add_mpv_defines__(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user