From 40f0d9725cb49eb5cb6efab4028f9be89e04773a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Wed, 27 Oct 2010 09:41:04 +0200 Subject: [PATCH] [mulander] improve intl.dll search. Fixes #6006 --- src/gajim.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gajim.py b/src/gajim.py index 01036ac465..5312cd4758 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -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') -- GitLab