mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
Allow running gst-uninstalled when GStreamer is a subproject
As described in Merge request 222, the previous solution is not the best possible solution and was also missing documentation. Adjust the suggestion to the current GStreamer mono-repository. And apply this change after reverting the previous commit. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
This commit is contained in:
parent
683d0456d9
commit
57158f4194
1 changed files with 10 additions and 4 deletions
14
gst-env.py
14
gst-env.py
|
@ -390,10 +390,16 @@ def get_subprocess_env(options, gst_version):
|
||||||
os.path.join(options.builddir, root),
|
os.path.join(options.builddir, root),
|
||||||
options.sysroot)
|
options.sysroot)
|
||||||
|
|
||||||
with open(os.path.join(options.builddir, 'GstPluginsPath.json')) as f:
|
# Search for the Plugin paths file either in the build directory root
|
||||||
for plugin_path in json.load(f):
|
# or check if gstreamer is a subproject of another project
|
||||||
prepend_env_var(env, 'GST_PLUGIN_PATH', plugin_path,
|
for sub_directories in [[], ['subprojects', 'gstreamer']]:
|
||||||
options.sysroot)
|
plugin_paths = os.path.join(options.builddir, *sub_directories, 'GstPluginsPath.json')
|
||||||
|
if os.path.exists(plugin_paths):
|
||||||
|
with open(plugin_paths) as f:
|
||||||
|
for plugin_path in json.load(f):
|
||||||
|
prepend_env_var(env, 'GST_PLUGIN_PATH', plugin_path,
|
||||||
|
options.sysroot)
|
||||||
|
break
|
||||||
|
|
||||||
# Sort to iterate in a consistent order (`set`s and `hash`es are randomized)
|
# Sort to iterate in a consistent order (`set`s and `hash`es are randomized)
|
||||||
for p in sorted(paths):
|
for p in sorted(paths):
|
||||||
|
|
Loading…
Reference in a new issue