1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/windows
Simon Tatham a55aac71e4 New application: a Windows version of 'pterm'!
This fulfills our long-standing Mayhem-difficulty wishlist item
'win-command-prompt': this is a Windows pterm in the sense that when
you run it you get a local cmd.exe running inside a PuTTY-style window.

Advantages of this: you get the same free choice of fonts as PuTTY has
(no restriction to a strange subset of the system's available fonts);
you get the same copy-paste gestures as PuTTY (no mental gear-shifting
when you have command prompts and SSH sessions open on the same
desktop); you get scrollback with the PuTTY semantics (scrolling to
the bottom gets you to where the action is, as opposed to the way you
could accidentally find yourself 500 lines past the end of the action
in a real console).

'win-command-prompt' was at Mayhem difficulty ('Probably impossible')
basically on the grounds that with Windows's old APIs for accessing
the contents of consoles, there was no way I could find to get this to
work sensibly. What was needed to make it feasible was a major piece
of re-engineering work inside Windows itself.

But, of course, that's exactly what happened! In 2019, the new ConPTY
API arrived, which lets you create an object that behaves like a
Windows console at one end, and round the back, emits a stream of
VT-style escape sequences as the screen contents evolve, and accepts a
VT-style input stream in return which it will parse function and arrow
keys out of in the usual way.

So now it's actually _easy_ to get this to basically work. The new
backend, in conpty.c, has to do a handful of magic Windows API calls
to set up the pseudo-console and its feeder pipes and start a
subprocess running in it, a further magic call every time the PuTTY
window is resized, and detect the end of the session by watching for
the subprocess terminating. But apart from that, all it has to do is
pass data back and forth unmodified between those pipes and the
backend's associated Seat!

That said, this is new and experimental, and there will undoubtedly be
issues. One that I already know about is that you can't copy and paste
a word that has wrapped between lines without getting an annoying
newline in the middle of it. As far as I can see this is a fundamental
limitation: the ConPTY system sends the _same_ escape sequence stream
for a line that wrapped as it would send for a line that had a logical
\n at what would have been the wrap point. Probably the best we can do
to mitigate this is to adopt a different heuristic for newline elision
that's right more often than it's wrong.

For the moment, that experimental-ness is indicated by the fact that
Buildscr will build, sign and deliver a copy of pterm.exe for each
flavour of Windows, but won't include it in the .zip file or in the
installer. (In fact, that puts it in exactly the same ad-hoc category
as PuTTYtel, although for completely different reasons.)
2021-05-08 17:51:27 +01:00
..
utils Factor out Windows utility function get_system_dir(). 2021-05-08 17:18:17 +01:00
agent-client.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
be_conpty.c New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
cliloop.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
CMakeLists.txt New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
config.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
conpty.c New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
console.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
controls.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
cryptoapi.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
dialog.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
gss.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
handle-io.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
handle-socket.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
help.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
help.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
help.rc2 Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
installer.wxs Configurable CHM path in installer source. 2021-05-03 17:01:55 +01:00
jump-list.c Move some parts of window.c into putty.c. 2021-05-08 17:20:50 +01:00
local-proxy.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
make_install_images.sh Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
msifixup.py Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
named-pipe-client.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
named-pipe-server.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
network.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
no-jump-list.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
nohelp.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pageant-rc.h winpgnt: say 'click to focus' in async passphrase prompt. 2021-04-22 20:00:46 +01:00
pageant.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pageant.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pageant.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pageant.rc Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pageants.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
platform.h New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
plink.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
plink.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
printing.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pscp.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pscp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
psftp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
psocks.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.c New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
pterm.ico Make Windows versions of the pterm icons. 2021-05-08 17:33:25 +01:00
pterm.rc New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
ptermcfg.ico Make Windows versions of the pterm icons. 2021-05-08 17:33:25 +01:00
putty-common.rc2 Move icon declarations out of putty-common.rc2. 2021-05-08 17:33:25 +01:00
putty-rc.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty.c Move some parts of window.c into putty.c. 2021-05-08 17:20:50 +01:00
putty.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
putty.mft Windows 10: add per monitor DPI awareness support. 2021-04-02 19:04:19 +01:00
putty.rc Move icon declarations out of putty-common.rc2. 2021-05-08 17:33:25 +01:00
puttycfg.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen-rc.h PuTTYgen: option to control Argon2 flavour. 2021-02-23 18:26:50 +00:00
puttygen.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
puttygen.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttygen.rc Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
puttyins.ico `installer.ico' doesn't fit into 8.3, so gets truncated to INSTALLE.ICO in 2007-02-06 22:39:15 +00:00
puttytel.mft Windows 10: add per monitor DPI awareness support. 2021-04-02 19:04:19 +01:00
puttytel.rc Move icon declarations out of putty-common.rc2. 2021-05-08 17:33:25 +01:00
rcstuff.h Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
README-msi.txt Remove note about .CHM on network drives. 2019-03-18 21:53:45 +00:00
security-api.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
select-cli.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
select-gui.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
serial.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
sftp.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
sharing.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
sizetip.c Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
storage.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
unicode.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
version.rc2 FIXME about Windows resource CHMfulness hint. 2019-03-18 22:02:13 +00:00
website.url Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
win-gui-seat.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
window.c Move some parts of window.c into putty.c. 2021-05-08 17:20:50 +01:00
x11.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00