From ea486975434e4b8f8670b54fed48b96d24634eeb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger 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 08968a173..600d8a4b7 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) import warnings