VOGONS


First post, by Azami

User metadata
Rank Newbie
Rank
Newbie

Hi,

Since I believe my port is now fairly usable, maybe I should post it here.

Short version, it's available here, with binary builds for convenience:
https://github.com/Toyoyo/putty-win32s/

Main changes from master:
- Build with Open Watcom as the C library is compatible (new Makefile, some unsupported preprocessor macros & recent C syntax).
- Use A API where Needed instead of W API (was mainly for CreateWindowEx and other related calls).
- Remove CreateThread() calls (they are now a synchronous function call, to make them at least work):
- This was mostly for puttygen, but also to make pasting work in the terminal window.
- Rewriting of the keyboard input routine.
- Session uses an adapted UNIX codepath to avoid dependency of the (very limited) win32s registry.
- Moved puttygen's window menu in system menu, window menu in dialog boxes somewhat works in win32s, but their win16 countercalls are buggy and produce visual glitches.
- Call CoInitialize() early to make z3dc.drv happy, in case it's used.

What works:
- Terminal works with the limitation that unicode is not supported at all.
if your server's libiconv supports CP1252, a locale can be added (Check the github wiki for a how-to).
- Puttygen key generation works, including with password-protected keys.
- Key-based auth in putty too.

What doesn't work
- pageant.exe
Won't be easily fixed, due to serious limitations in VirtualQuery().

- As win32s lacks any concept of console application, CLI tools won't work.
One solution would be to build them with OW's (extremely buggy and unsupported) default windowing system, which would mean to fix it in OW before.
Another issue is their heavy usage of CreateThread().

For now, I include 16-bit builds of and updated ssh2dos fork (https://github.com/AnttiTakala/SSH2DOS) as I had stability issues with 32-bit ones in win3.1's DOS VM. They'll require a working packet driver and WATTCP configuration (so either ndis3pkt or a second NIC).

The attachment putty-about.png is no longer available
The attachment puttygen.png is no longer available
The attachment puttyterm.png is no longer available

Reply 1 of 15, by Oerg866

User metadata
Rank Member
Rank
Member

this is severely underrated and a most excellent piece of software. thank you for your efforts!

Reply 2 of 15, by roytam1

User metadata
Rank Member
Rank
Member

trying to add UTF-8 support to it.
https://github.com/roytam1/putty-win32s/relea … s/tag/v20250127

noticed win32s' ExtTextOutW() is a stub, fixed this.
and lpDx array is incompatible with ExtTextOutA(), so not passing it to the function.

EDIT: lpDx problem is fixed by copying it into new array with proper values set.
EDIT2: also add WS_BORDER to various controls to make it look sane in windows.

emendelson wrote on 2023-08-24, 02:42:

I tried Azami's port of 0.76, but it gives me an error saying that OLE32.DLL didn't load.

this is a bug in older OpenWatcom, recompiled with latest one solved the problem.

Reply 3 of 15, by Zilch

User metadata
Rank Newbie
Rank
Newbie

This is actually such a cool piece of software!

I've been meaning to give Windows 3.1 a go sometime. I have access to a Nutanix cluster and will see if I can use this Putty release to SSH onto the CVM's from the Win3.1 install.

I'll follow up on Friday.

Reply 4 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

Thanks to AI, I finally have a 0.83 version working, with a new Makefile.wc based on putty's CMake build system declarations.

Lots of things changed since 0.76, like the whole build system, almost all the source filenames, even more 'W' functions and more anonymous unions that OpenWatcom don't properly handle.

The changes are cleaner than the last time, mostly using:

#ifdef WIN32S_COMPAT

Instead of modifying the functions directly.

The same restrictions as the 0.76 version are here, so no unicode support (I just made sure Win1252->Win1252 translation don't actually outputs garbage, 'use font encoding' works too), and only the GUI tools works.

Binaries and source are available on https://github.com/Toyoyo/putty-win32s

The attachment putty0.png is no longer available
The attachment putty1.png is no longer available
The attachment putty2.png is no longer available
The attachment putty3.png is no longer available

Reply 5 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

Updated the code and binaries to fix some cosmetic issues.

The attachment putty0.png is no longer available

Reply 7 of 15, by Yoghoo

User metadata
Rank Member
Rank
Member

Used the previous version which worked pretty good. Will definitely try the new version. Thanks for this.

Reply 8 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

Added a small utility named "winsftp", as a GUI wrapper around psftp, to use on win32s.

The attachment winsftp.png is no longer available

Reply 9 of 15, by roytam1

User metadata
Rank Member
Rank
Member

I forked your 0.76 to fix some problems I encountered (like UTF-8, DBCS, and others):
https://github.com/roytam1/putty-win32s

BTW I wonder if you can make PuTTY's CLI utilities working in NT 3.1?

Reply 10 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

You could try, building the 'all' target with the provided Makefile.wc makes psftp and pscp use winsock1 (and still works), maybe they'll work?

Reply 11 of 15, by roytam1

User metadata
Rank Member
Rank
Member
Azami wrote on Today, 12:18:

You could try, building the 'all' target with the provided Makefile.wc makes psftp and pscp use winsock1 (and still works), maybe they'll work?

I hope plink can work with winsock1, while it has code:

    if (p_WSAEventSelect == NULL) {
fprintf(stderr, "Plink requires WinSock 2\n");
return 1;
}

Reply 12 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

The repository now includes patches for plink as well 😀
I don't know how it behaves on NT 3.1, since I don't have a NT3.1 VM for now, but at least it works with winsock1 on wine.

The attachment plink.exe is no longer available

Reply 13 of 15, by roytam1

User metadata
Rank Member
Rank
Member
Azami wrote on Today, 13:47:

The repository now includes patches for plink as well 😀
I don't know how it behaves on NT 3.1, since I don't have a NT3.1 VM for now, but at least it works with winsock1 on wine.

The attachment plink.exe is no longer available

tested in NT 3.51 but it doesn't even print any text.

The attachment Snap1.png is no longer available

EDIT: I rebuilt it and it prints text now, but when I tried to connect a host it throws a fatal error.

The attachment Snap2.png is no longer available

Reply 14 of 15, by Azami

User metadata
Rank Newbie
Rank
Newbie

I made some changes last night, are you using the current source?

Asking because I can't reproduce on my side.

The attachment putty-3.51.png is no longer available

I just fixed another bug with hostkey saving on NT (fclose() missing, rename over an open file handle won't work on NT), but that's unrelated.

Reply 15 of 15, by roytam1

User metadata
Rank Member
Rank
Member
Azami wrote on Today, 15:36:
I made some changes last night, are you using the current source? […]
Show full quote

I made some changes last night, are you using the current source?

Asking because I can't reproduce on my side.

The attachment putty-3.51.png is no longer available

I just fixed another bug with hostkey saving on NT (fclose() missing, rename over an open file handle won't work on NT), but that's unrelated.

Tried again with your current source and it works now.
with some little API changes, it works on NT 3.50.

I should rebase my changes on top of your 0.83 later.