On Thu, Mar 30, 2006 at 10:09:07AM -0600, Bo Peng wrote: > > > > I tested it on cygwin. Here are the results. > > > > 1) After launching, the script was hanging in checkCygwinPath(). > > I had to kill the latex.exe process to let it continue (I use > > MikTeX, so latex.exe is a native win32 program, whereas python > > is a cygwin application). Doing so, the check for cygwin_path_fix > > was wrong, of course. > > Was the old configure.py working under this configuration? What will > happen if you run latex.exe directly from a cygwin environment?
I don't know because this is the first time that I test it. Anyway, I think I know why latex hangs. In the script you use mkstemp() to generate a temp file. As python is a cygwin app, it is returning a name of the form /tmp/xxx. Now, the MikTeX latex.exe doesn't understand this path and stops, asking you to input another filename. But, as it is not run interactively, it hangs (it would be better to call latex redirecting its stdin to /dev/null). Also note that when you run "latex /some/path/file.tex", file.log and file.aux will be left in the current directory. Please, attached find a patch correcting this problems. I have substituted "cmdOutput('cygpath -w ' + ...).replace('\\', '/')" with "cmdOutput('cygpath -m ' + ...)", as the -m flag to cygpath already does what you do with the replace(). I also have corrected the logic: path correction is not needed when the output from latex contains "Error". A last thing: I don't know why the script is not removing chklatex.ltx and chklatex.log, even if it should, as removeFiles() is called for them. > > I think that the configure script should also provide for a default > > \path_prefix in lyxrc.default, probably based on platform. When > > sys.platform == 'cygwin', it would be: > > > > \path_prefix "/usr/local/bin:/usr/bin:/usr/X11R6/bin" > > Where will it be used? It is used by LyX to set the PATH prefix. In *nix it should be omitted, as everything needed should already be in the PATH. In the native win32 LyX it will be set by the installer, so also in this case it is probably not needed. This leaves cygwin (I don't know for Mac) where the above is to be taken as the default (it can be later override by the user). -- Enrico