mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
debug-viewer: Allow running uninstalled with symlink
When uninstalled, we look at the directory of the executable to find the resources. This patch uses realpath in replacement to abspath so the path get expended, and symlink are followed.
This commit is contained in:
parent
a22c16a112
commit
498e78897b
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ def main ():
|
||||||
installed = True
|
installed = True
|
||||||
else:
|
else:
|
||||||
# Substitution has not been run, we are running uninstalled:
|
# Substitution has not been run, we are running uninstalled:
|
||||||
lib_dir = os.path.dirname (os.path.abspath (sys.argv[0]))
|
lib_dir = os.path.dirname (os.path.realpath (sys.argv[0]))
|
||||||
installed = False
|
installed = False
|
||||||
|
|
||||||
if lib_dir:
|
if lib_dir:
|
||||||
|
@ -59,7 +59,7 @@ def main ():
|
||||||
GstDebugViewer.Paths.setup_installed (data_dir)
|
GstDebugViewer.Paths.setup_installed (data_dir)
|
||||||
else:
|
else:
|
||||||
# Assume that we reside inside the source dist.
|
# Assume that we reside inside the source dist.
|
||||||
source_dir = os.path.dirname (os.path.abspath (sys.argv[0]))
|
source_dir = os.path.dirname (os.path.realpath (sys.argv[0]))
|
||||||
GstDebugViewer.Paths.setup_uninstalled (source_dir)
|
GstDebugViewer.Paths.setup_uninstalled (source_dir)
|
||||||
|
|
||||||
GstDebugViewer.run ()
|
GstDebugViewer.run ()
|
||||||
|
|
Loading…
Reference in a new issue