On Fri, Mar 24, 2006 at 11:09:00AM +0100, Georg Baum wrote:
> Jean-Marc Lasgouttes wrote:
> 
> > I thought the idea of cygwin_path_fix was that it is only needed for
> > latex. I am not so sure anymore.

Why do you say so?

> The lines
> 
>         //No backslashes in LaTeX files
>         dos_path = subst(dos_path,'\\','/');
> 
> would support the argument that external_path() is intended for latex on
> cygwin.

Indeed.

> This might also explain the need for patching qt on cygwin, since
> external_path() is used for paths in file dialogs, for example.

I really faced the opposite problem, as Qt was being passed posix paths,
which is right, but when using the native graphics version, calls to
the Windows API were being made and a conversion to win-style paths was
needed. If I remember correctly, I patched the Qt sources such that both
win-style and posix-style paths were ok. I also remember that I had to
do something for UNC paths (//machine/xxx), which otherwise would have
not worked.

That is because I was so wary about the unconditional call to external_path.
I am sure that my Qt port can cope with whatever path-style it is presented,
but I cannot be sure for other ports. Maybe Kayvan can shed some light?

I think that the current Qt version distributed with cygwin cannot be
used for compiling LyX as it is multi-threaded and there are problems
with the cygwin1.dll, as explained here:
http://www.mail-archive.com/cygwin@cygwin.com/msg65681.html

> Anyway, the patch is somewehat orthogonal to the question whether
> cygwin_path_fix should be used in external_path or not. We would need to
> change the implementation of latex_path() if that should be true, but the
> external usage would stay the same.

Well, I have been compiling by myself LyX and Qt/X11 since LyX 1.3.4 and
until 1.3.5 (then I have been using the Angus port) and never noticed a
problem. Even this latex_path issue was escaping me. But I am not sure
if this was because until a certain time I have been using the cygwin
tetex before switching to miktex.

> So what do you think about the patch? Should it go in, or should we first
> research the "use cygwin_path_fix in external_path or not" issue?

In my experience, if a cygwin application does not try to manipulate a
path by itself, i.e., if it simply use the pathname for loading, or saving,
or whatever, it can even be passed a true win-style path with '\'.
A notable exception is latex, which for some reason needs posix-style
paths in .tex files. So, given that things work as they stand now, why
changing?

Anyway, I have no problem in maintaining my own patches to the official
sources. To tell you the truth, there is almost no free software I use that
I do not patch for some reason or another. Sometimes it is because the
patches are really peculiar to me, but sometimes it is because I am scared
by the time you have to invest to have them accepted (I don't mean you in
this case, really).

-- 
Enrico

Reply via email to