octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cygwin, ptys, porting Quint to Windows


From: Michael Goffioul
Subject: Re: Cygwin, ptys, porting Quint to Windows
Date: Thu, 14 Jul 2011 09:32:45 +0100

2011/7/14 Jordi Gutiérrez Hermoso <address@hidden>:
> How can we make Quint work on Windows? Pedro Lucas, QtOctave's
> ex-maintainer, glanced over the Quint and rightfully noticed that it's
> not going to work on Windows because it's using ptys to do terminal
> emulation. I heard that cygwin can provide a compatibility layer that
> will let us use ptys on Windows and will not require a substantial
> rewrite of the terminal emulation code. Does anyone know more about
> this? Can it be done transparently for Windows users who download the
> binary?

There are basically 2 approaches:

1) Fake pty's using standard pipes and hack a terminal emulator to use
them. This is what I've done with VTE and the octaveDE tech preview
I shipped with an older MSVC-based octave build. The main drawback
is that octave (and any child process) does not see a real tty on stdin
and stdout (as in: istty() returns false). So you need to tricks to work
around various issues: additional flags to start octave (-i --line-editing),
hack in readline to handle terminal window resize, no support for CTRL-C...

2) Extract the relevant code from Console2. Console2 approach is different
from the above: it runs a real command prompt window (MS equivalent to
terminal) and mirror the content into another widget. Then you can embed
the Console2 control ("control" is the MS equivalent to "widget") into a
Qt widget to make it available from Qt apps. That's also something I've
done and is partially working.

Finally you can alternatively use cygwin. This will work only for the cygwin
version of octave.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]