rrthomas / plptools

Tools for connection to EPOC devices
GNU General Public License v2.0
19 stars 8 forks source link

Add Windows support #5

Open dmitryelj opened 3 years ago

dmitryelj commented 3 years ago

It would be great if plptools will be working on Windows.

PsiWin does not work on modern Windows at all, my 5MX cannot read new CF cards, and plptools can be the only way to upload software on 5MX.

rrthomas commented 3 years ago

I'm afraid I have no interest myself in getting it to work on Windows, but I'll happily accept patches that add Windows support.

For starters, I would try building on Cygwin, since the serial code in plptools is UNIX-specific.

static-void commented 2 years ago

I got plpfuse to build on windows using WinSFP some time ago http://www.secfs.net/winfsp/

However, windows generates filesystem operations constantly and these make it unbearably slow. It may be possible to add some sort of caching somewhere but it is certainly not straightforward.

On the other hand, plpftp works fine.

@dmitryelj have you considered using psion java link? This works fine on windows 64 bit apparently https://sourceforge.net/projects/javapsionlink/

rrthomas commented 2 years ago

@static-void Have you tried building with WSL?

static-void commented 2 years ago

No I haven't tried that, but I don't think it will work because fuse does not work in WSL1 and serial port forwarding does not work in WSL2!

To be honest I was thinking about just creating a small debian VM and running it in qemu. It could have plptools installed and share the mount over smb. You could also have an alternative mode where the VM runs pppd for networking to a psion.

I haven't put that much time into solving this, basically because I am not a windows user and these things just work in Linux. But there are so many windows users trying to sync with psions that it would be nice to get it working.

I should probably spend a bit more time trying with WinSFP. I just had a quick review of what I did and basically I've just installed winfsp and cygwin, and done some hacky patching to get plptools to build (here's a diff https://pastebin.com/ULpbaV1c). As I said it does work at the moment, but it takes several minutes just to get a directory listing of the C drive...

static-void commented 2 years ago

It just occurred to me that you could compile ncpd with cygwin and plpfuse could run in WSL2. It's a bit convoluted but I think it would work. I am not sure if it is possible to make it simple for end users to install at the end of it. It may be as simple as wsl.exe --install followed by apt install plptools and a script to launch ncpd and plpfuse the right way... and map a network drive pointing at the right place. I will try to make some time to try it