|Re: [hatari-devel] Debugger GUI enquiry|
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
On Donnerstag, 7. Mai 2020 11:33:48 CEST Steven Tattersall wrote:
> Obviously exposing remote debug is very powerful if the interface is right,
> and it means I could develop the tooling without tinkering with the core
> Hatari codebase too much. On the other side, that might be over-engineering
> it, when something simpler might do the job.
I once tried to implement something similar to hatari's python ui in aranym, and some of my experiences are:
- although of course more complicated, there is not much choice about implementing that through some kind of remote interface. Implementing it directly in the executable would mean you have to link Hatari with all the GUI libraries needed for it (GTK, KDE, QT, whatever). That is way to troublesome, and adds lots of dependencies that are not needed for normal operation.
- the hatariui embeds the SDL main window of hatari into a frame of the GUI. That looks really nice, but does not work on very well on windows.
- also mostly windows related: when using some scripting language like python (or perl as in my case), you run into trouble getting a working environment. I was using ActivePerl for that, but that does not provide all the needed interface libraries for GUIs (like GTK in my case).
- another problem (not only for windows) is that you have to make sure that the interface library that was compiled for python/perl used the same version of the GUI libs that are actually in use at runtime. And with "same" i mean not only the same major version, but really the exact same version.
- then there is the question which of the processes should be the server (creating the socket, and listen on it), and which one the client. Theoretically, it would be best to let hatari be the server, so that you can connect to it not only from the ui, but for example also using some commandline tool, thus being able to send commands to an already running hatari instance. However, that makes starting up a bit difficult, since you first have to run hatari, wait until it has created the socket, and then connect to it. OTOH, hatari may also have to wait for some initial commands from the ui before actually launching the OS. IIRC, the current solution does it the other way around, and the python script is the "server".
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|