From d3c029f102b5a96d0aeac488ac1a9c146d78388d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 19 Nov 2016 05:11:55 -0800 Subject: [PATCH] uninstalled: Properly setup uninstalled env on windows https://bugzilla.gnome.org/show_bug.cgi?id=775281 --- gst-uninstalled.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gst-uninstalled.py b/gst-uninstalled.py index c399d4c346..14778f71ad 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -59,8 +59,16 @@ def get_subprocess_env(options): env["GST_REGISTRY"] = os.path.normpath(options.builddir + "/registry.dat") filename = "meson.build" - sharedlib_reg = re.compile(r'\.so$|\.dylib$') + sharedlib_reg = re.compile(r'\.so$|\.dylib$|\.dll$') typelib_reg = re.compile(r'.*\.typelib$') + + if os.name is 'nt': + lib_path_envvar = 'PATH' + elif platform.system() == 'Darwin': + lib_path_envvar = 'DYLD_LIBRARY_PATH' + else: + lib_path_envvar = 'LD_LIBRARY_PATH' + for root, dirnames, filenames in os.walk(os.path.join(options.builddir, 'subprojects')): has_typelib = False @@ -74,9 +82,7 @@ def get_subprocess_env(options): break elif sharedlib_reg.search(filename) and not has_shared: has_shared = True - prepend_env_var(env, "LD_LIBRARY_PATH", - os.path.join(options.builddir, root)) - prepend_env_var(env, "DYLD_LIBRARY_PATH", + prepend_env_var(env, lib_path_envvar, os.path.join(options.builddir, root)) if has_typelib: break