summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-08-03 16:23:13 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-08-17 15:13:30 +0800
commit82f40a6f0502c31c1086840df61e1f67c7d523f9 (patch)
treedcf86edc454baab73d92dff125a5c46320ad4b71 /build-aux
parentdc85e7d27a7436fb7e3f3a806a74050613ded933 (diff)
downloadgdk-pixbuf-82f40a6f0502c31c1086840df61e1f67c7d523f9.tar.gz
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
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/gen-thumbnailer.py4
1 files changed, 4 insertions, 0 deletions
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