On Tue, Sep 22, 2026 at 02:19:08AM +0200, Pavel Sanda wrote:
On Sun, Sep 20, 2026 at 04:00:51PM +0200, Enrico Forestieri wrote:
Regarding the issue with .bat files on windows, some time ago we were using
QProcess, which was was also unable to launch batch files. At the time, I
wrote a wrapper that made it possible to do so simply by giving the
resulting executable the same name. I am attaching it here. This single
executable, when renamed appropriately, can launch any .bat file. We could
therefore distribute a maxima.exe file in LyX's bin folder on Windows to
resolve the issue. I tested it with your patch and it works.

It seems to me that _popen essentially reintroduces the shell I was trying to
avoid with this whole patch stack. So introducing the wrapper is not worth it -
shell remains, we "fix" only maxima and not other possible .bats and we have
+1 executable build to care about.

Note that it would Ok for CAS, because no parameters are passed on the command line. However, you are right that other batch files are not accounted for. My idea would be that we provide an executable that can simply be renamed in order to launch a batch file. Of course, this introduces the same problem that we are trying to avoid, but it would be the user that decides to take the risk, once he is warned about the possible issues.

Anyway, I think I lean to clean runCommand from common API, if you willing
to do some testing.

Yes, sure.

My proposal is going in two steps - first can you test whether the
following patch works for CAS on windows now with the attached?

Yes, it works, of course.

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

Reply via email to