DustinCampbell / ZDebug

Z-Machine Debugger
9 stars 7 forks source link

Great Tool but Windows Only; Question on Conversion Possibilities #37

Open jeffnyman opened 5 years ago

jeffnyman commented 5 years ago

This tool is probably one of the best I have ever seen for debugging the working state of a story file on the z-machine.

But ... it's Windows only. Mono can't run it because Mono doesn't support WPF. Wine, including with the most recent .NET Framework versions, also won't be able to run it due to the Windows-specific graphic hooks. You can't turn it into a browser app with the WPF Browser because that only works on Internet Explorer. Converting to .NET Core won't work because .NET Core also doesn't support WPF.

The question here is what are the options, if any for continuing work on this but making it a bit more cross-platform? Would the only option be converting to ASP.NET? Is that even possible? Or, rather, I'll assume it's possible. But is the idea of converting such a non-starter that it would better to just write this in something that's more cross-platform?

taradinoc commented 5 years ago

@jeffnyman Have you tried the ZLR console debugger? It should run under Mono, although you might have to run it in "dumb" mode.

ZLR's VM is written against a generic IO interface (IZMachineIO), and then that interface has various implementations for different front ends (console, Glk) and other scenarios (recording/replaying test transcripts). Presumably the same technique could be used with ZDebug.

jeffnyman commented 5 years ago

@taradinoc I haven't looked at that, no. Thanks for the reference; I'll definitely check it out.

Right now I've been looking at how I could port this to Python using something like PyQT. In playing around with GUI options in that context, I've found I can create GUI apps that look and run the same on all the major operating systems. The only problem is that it looks like converting this application to something like that would be a massive amount of work because you have to disentangle so much of the code.

I feel that had this app been made in something cross-platform, it would have been the killer Z-Machine app in terms of being able to see what's going on and helping people understand how to build interpreters. So right now I'm weighing that benefit against the cost of what seems to be a mammoth undertaking to convert this project.

I have also been checking out Avalonia (http://avaloniaui.net/) which some folks are recommending if you want a WPF experience but that's capable of running on Linux and Mac. That said, I've heard some horror stories about projects in mid-conversion so I'm trying to sort through those as well.

Electron might even be a better choice. After all, there's a reason why Microsoft wrote a lot of Visual Studio Code in Electron.

taradinoc commented 5 years ago

Another possibility would be to port it to Glk, without an intermediate layer like ZLR uses. Glk does most of the work of managing IF text panels; it doesn't support 100% of the Z-machine's screen features, but it supports most of them, and you can add conditional support for the rest with extensions.