Skip to content
Snippets Groups Projects
Commit 40f0d972 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

[mulander] improve intl.dll search. Fixes #6006

parent fb5ec816
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,15 @@ if os.name == 'nt':
locale.setlocale(locale.LC_ALL, '')
import ctypes
libintl = ctypes.cdll.LoadLibrary('gtk\\bin\\intl.dll')
import ctypes.util
libintl_path = ctypes.util.find_library('intl')
if libintl_path == None:
local_intl = ok.path.join('gtk', 'bin', 'intl.dll')
if os.path.exists(local_intl):
libintl_path = local_intl
if libintl_path == None:
raise ImportError('intl.dll library not found')
libintl = ctypes.cdll.LoadLibrary(libintl_path)
libintl.bindtextdomain(APP, DIR)
libintl.bind_textdomain_codeset(APP, 'UTF-8')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment