From 82f40a6f0502c31c1086840df61e1f67c7d523f9 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 3 Aug 2017 16:23:13 +0800 Subject: build: Fix running gen-thumbnailer.py on Windows We need to prepend the PATH envvar so that the main GDK-Pixbuf DLL that we just built can be loaded on Windows when running this script, as Windows do not support rpath. Since gdk-pixbuf-pixdata resides in the same path as the main GDK-Pixbuf DLL, we can just use its path so that we can acquire the needed path to it. https://bugzilla.gnome.org/show_bug.cgi?id=785767 --- build-aux/gen-thumbnailer.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build-aux') diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py index 9994043f9..05ac8218c 100644 --- a/build-aux/gen-thumbnailer.py +++ b/build-aux/gen-thumbnailer.py @@ -22,6 +22,10 @@ args = argparser.parse_args() newenv = os.environ.copy() newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders +# 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html +if os.name == 'nt': + gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata) + newenv['PATH'] = gdk_pixbuf_dll_buildpath + os.pathsep + newenv['PATH'] cmd = args.printer -- cgit v1.2.1