[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] Win32 msmtp and NLS LOCALEDIR



Hi!

On Sat, 12 Nov 2016 17:32:10 +1100, andrew wrote:
> After a bit of pain I have successfully compiled msmtp 1.6.5 for
> Windows using MXE:

Great that it works now!

> It all works fine but the only jarring note is the NLS LOCALEDIR which
> is set by default to /usr/local/share/locale. unlikely under Windows.
> 
> Two questions:
> 
>  1. Is there a compile time option to alter this?

Yes, './configure --localedir=...'; see also './configure --help'.

>  2. What is a sensible location under Windows?

That is the problem. NLS support assumes that the localedir is
fixed system wide, and therefore it can be set at compile time.

However, this is not usually done on Windows. On Windows, a program is
typically put into its own directory along with all its data files, e.g.
something like 'c:\programs\msmtp' with a subdirectory 'locale'. This
means that on Windows, msmtp should not use a directory fixed at
compile time, but rather a directory relative to the location of the
binary, e.g. 'DIR_OF_MSMTP_EXE\locale'. Then, DIR_OF_MSMTP_EXE must be
found at runtime rather than compile time.

Programs that support this are known as relocatable in the GNU
gettext documentation. I never got around to make msmtp relocatable.
Instead, I just used './configure --disable-nls' for Windows
binaries... 

Cheers,
Martin