uninstalled: Also set GST_PRESET_PATH and GST_ENCODING_TARGET_PATH

This commit is contained in:
Thibault Saunier 2016-12-19 10:10:58 -03:00
parent ba774df5a8
commit 7655cdcc58

View file

@ -81,6 +81,23 @@ def get_subprocess_env(options):
for p in paths:
prepend_env_var(env, 'PATH', p)
presets = set()
encoding_targets = set()
if '--installed' in subprocess.check_output([mesonintrospect, '-h']).decode():
installed_s = subprocess.check_output([sys.executable, mesonintrospect,
options.builddir, '--installed'])
for path, installpath in json.loads(installed_s.decode()).items():
if path.endswith('.prs'):
presets.add(os.path.dirname(path))
elif path.endswith('.gep'):
encoding_targets.add(
os.path.abspath(os.path.join(os.path.dirname(path), '..')))
for p in presets:
prepend_env_var(env, 'GST_PRESET_PATH', p)
for t in encoding_targets:
prepend_env_var(env, 'GST_ENCODING_TARGET_PATH', t)
return env