Fixed library discovery on Windows
parent
f7b94b3e57
commit
9e356b1b0a
|
|
@ -243,6 +243,9 @@ def __win32_finddll():
|
||||||
|
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
libgs = __win32_finddll()
|
libgs = __win32_finddll()
|
||||||
|
if not libgs:
|
||||||
|
import ctypes.util
|
||||||
|
libgs = ctypes.util.find_library("".join(("gsdll", str(ctypes.sizeof(ctypes.c_voidp) * 8), ".dll"))) # finds in %PATH%
|
||||||
if not libgs:
|
if not libgs:
|
||||||
raise RuntimeError("Please make sure that Ghostscript is installed")
|
raise RuntimeError("Please make sure that Ghostscript is installed")
|
||||||
libgs = windll.LoadLibrary(libgs)
|
libgs = windll.LoadLibrary(libgs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue