On Fri, Sep 18, 2026 at 03:37:44AM +0200, Pavel Sanda wrote:
On Thu, Sep 17, 2026 at 10:02:33PM +0200, Enrico Forestieri wrote:
On Thu, Sep 17, 2026 at 03:02:05AM +0200, Pavel Sanda wrote:
> On Sun, Sep 13, 2026 at 07:05:33PM +0200, Pavel Sanda wrote:
> > Ok, with 03 class finished (invocation on load) I'll continue with
> > misc lefotvers (04 class).
> >
> > First - guard better esoteric biblio paperviewer from context menu.
>
> Last but one. Kicking runCommand() from CAS handling.
>
> To be clear, the current form is safe and if I was not pushing shell based
> runCommand() out of source code, it could stay as it is.
>
> The rewrite is not mechanical and it would be great if anyone on Windows
> could test that e.g. maxima still delivers results in mathed.
> On linux it works (tested octave and maxima).

Hi Pavel, on native Windows this patch works only with executables but not
with batch files. For example, it works with Mathematica but not with
maxima, which is launched by a batch file.

Arrgh, .bat wont ever work this way.

I am now split how to move on - incidentaly, the last patch was concerning
your area - cygwin.

The cygwin calller looks safe, while removing runCommand seemed tricky so I was 
about
to kill runCommand from the general code and keep it only #defined for the tiny
part of cygwin code - and leave it up to you.

Now we'll need to ifdef _WIN32 in MathExtern.cpp as well to call 
getEnv("COMSPEC").

I am no more sure whether complete elimination of runCommand is worth it.
It looked like reasonable hygiene, but for CAS and cygwin we need to
touch code, which is safe and working without clean substitution code.

Do you have opinion?

Below is preliminary draft fixing issue above, cygwin firewalling and removal
of runCommand for the rest of the code to give an idea what I am ambivalent
about now.

Any feedback welcome,
Pavel

I think there is a misunderstanding here. On cygwin everything works fine. In general, what works on *nix should also work on cygwin. Maxima for cygwin works fine, no problem (it is launched by a shell script that is executed like a normal executable). On cygwin, one can also make native Windows programs launched trough a .bat file to work by simply writing a wrapper shell script that simply calls the batch file.

I was speaking about *native* Windows. I compiled LyX using MinGW to test your patch, so Cygwin doesn't come into play in this case. You were probably misled by the fact that the string "cygwin" appeared in the error message, but that is simply because I use the Cygwin `/tmp` directory as the temporary directory for the native LyX. That's all.

--
Enrico
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to