[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tools compiled for Windows under Cygwin: .mo files loaded from Cygwi
From: |
Michele Locati |
Subject: |
Re: Tools compiled for Windows under Cygwin: .mo files loaded from Cygwin prefix path |
Date: |
Tue, 24 Sep 2024 23:45:46 +0200 |
> > set_program_name is defined in progname.h and should expand to
> > set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
> > Here, we expect that
> > ARG0 = "C:\\Program Files (x86)\\gettext-iconv\\bin\\xgettext.exe"
> > INSTALLPREFIX = "C:\\cygwin\\installed" (1)
> > INSTALLDIR = "C:\\cygwin\\installed\\bin" (2)
> > (Are these the actual values? Or are Cygwin filenames passed here, that
> > start with /cygdrive/c/ ?)
>
> set_program_name_and_installdir() is called with:
> - argv0: "C:\\Program Files (x86)\\gettext-iconv\\bin\\xgettext.exe"
> - orig_installprefix: "/installed"
> - orig_installdir: "/installed/bin"
>
So, to summarize:
1. LOCALEDIR
It's "C:\\cygwin\\installed\\share\\locale" as expected
2. INSTALLPREFIX
it's "/installed" but it should be "C:\\cygwin\\installed"
In build/gettext-tools/config.h we have
#define INSTALLPREFIX "/installed"
and I *think* that that value comes from this line of
gettext-tools/configure:
printf "%s\n" "#define INSTALLPREFIX \"${reloc_final_prefix}\"" >>confdefs.h
and reloc_final_prefix comes from $prefix, and I don't see any call to
cygpath to convert it (but I may absolutely be wrong).
3. INSTALLDIR
it's "/installed/bin" but it should be "C:\\cygwin\\installed\\bin"
In build/gettext-tools/src/Makefile we have:
-DINSTALLDIR=\"$(bindir)\"
and
bindir = ${exec_prefix}/bin
bindir_c = "C:\\cygwin\\installed\\bin"
bindir_c_make = \"C:\\\\cygwin\\\\installed\\\\bin\"
So, we should use bindir_c instead of bindir_c, but I can't find any
reference to bindir_c.
...and I'm absolutely lost...
PS: at https://github.com/mlocati/gettext-iconv-windows/pull/16
you can see every step I perform, from installing cygwin to
configuring/compiling/installing iconv and gettext, for the 4
cases (shared/static and 32/64 bits).
You can also find the build log, which includes all the
files in the build VPATHs, as well as the installed stuff.