On 8. 2. 2016 5:30, Daniel Goldman wrote:
> I posted the following to the Discussion tab. I thought it would be best 
> to also post to the email list, in case someone looks here.
> 
> ------------------------
> 
> I wanted to thank Greg Jung for sending a very helpful response. It 
> might benefit some others.
> 
> Run "C:\msys64\usr\bin\bash.exe --login -i" from within the windows 7 
> command prompt ("dos shell") and get a bash prompt. Then run the curses 
> (compiled with pdcurses) program with "./txu1-tpl-eg1.exe" - it runs 
> perfectly! Arrow keys work, everything looks / functions perfectly.
> 
> Next, make a copy of the command prompt desktop icon, change the target 
> to the command line given above, it works perfectly.
> 
> ------------------------
> 
> I'm still confused about the difference between

Msys2 can be substituted for Cygwin in the explanations below. I also put a 
slightly different version of the text on our wiki: 
https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/

Non-graphical Cygwin (generally POSIX) and regular Windows programs use 
fundamentally different ways to display output and receive input.

> 1) mintty,

A terminal emulator built for Cygwin programs. It provides pty's and other 
POSIXy stuff to programs and it draws the result "manually". Cygwin programs 
"just know" how to use it and usually have no problems with it.

There are other terminal emulators, but they're not provided in MSYS2.

> 4) dos window itself.

The Windows terminal (console, conhost) does the same for regular Windows 
programs. It provides the back-end to Windows console handles and regular 
Windows programs "just know" how to use it.

The "DOS window itself" is actually a combination of this console and the 
Windows shell (cmd, command line).

> 3) bash.exe from within dos window, and

Cygwin allows some inter-operation between a Cygwin program and Windows console 
and between a Windows program and Cygwin terminal emulators. You can run bash 
in a Windows terminal and also run cmd in mintty. For basic stuff, it works 
fine. Anything more complicated, like colored text, TUIs and line editing, 
breaks.

> 2) winpty from within mintty,

Winpty is a wrapper program that starts a hidden Windows console window and 
open the wrapped program in it. It then relays input from your Cygwin terminal 
to the Windows program and output from the program to your terminal. This 
solves a lot of the issues when running regular Windows programs in a Cygwin 
terminal.

> For example, I notice that mc runs poorly under the 
> bash.exe environment. Arrow keys don't work, colors get messed up, it is 
> slow. Oddly, mc (same exe) runs perfectly when run directly from dos shell.

/usr/bin/mc.exe? On my system, this one runs perfectly in mintty, but is 
horribly broken in a regular Windows terminal.

> Obviously, I don't really understand what's going on. It would be nice 
> if someone who understands more about this could post some advice, 
> related to different options for compiling and running curses 
> applications under msys2.
> 
> Anyway, at least the bash.exe option is good progress.

-- 
David Macek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to