OpenKh icon indicating copy to clipboard operation
OpenKh copied to clipboard

Ensure tools are portable across different systems

Open GovanifY opened this issue 6 years ago • 4 comments

Pretty self explanatory. Follows #55 discussion

GovanifY avatar Dec 25 '19 21:12 GovanifY

I was waiting for .NET Core 3.1 (released the 3rd of December) to understand how to move to a cross-platform GUI framework.

Personally, my first choice would be Avalonia, but I have yet to work on a POC to see pro and cons of it.

Luckily the entire project is structured to have the tools as just a front-end for the entire business logic of OpenKh. Plus, we use MVVM pattern to separate WPF specifics from the tools' logic. I am confident that a porting to MacOS and Linux will be painless.

Do you have any other suggestions to achieve it easily?

Xeeynamo avatar Dec 25 '19 21:12 Xeeynamo

"Easily" is a big word. I do not know much about the .NET ecosystem apart from its low-level implementation, so I might be fairly biased. The alternative GUI toolkit of choice would be, for me, Qt. It works well in all major OSes and it does have c# bindings, along with an IDE to design windows.

With that said your solution might just be easier, but we should see in the long run how that works out. I have no clue about Avalonia, so I'll have to look it up on my free time later.

GovanifY avatar Dec 26 '19 00:12 GovanifY

While I was still considering AvaloniaUI as a portable solution across different operating systems, Microsoft announced an updated framework to port WPF and Xamarin applications to Linux and macOS. Later in the year they will release a preview and we will be early adopters!

Meanwhile, the game engine and all the CLI tools are already cross-platform. I also created a script in #114 to facilitate the build and installation of OpenKH on Linux.

Xeeynamo avatar May 27 '20 11:05 Xeeynamo

Yup, that sounds good enough for me. C# is CLEARLY not ideal for portable development but it seems to work out. Thing to note though: AvaloniaUI doesn't support the Wayland rendering engine of Linux, which is slowly becoming the standard, so it would have been outdated before even beginning to work on it, unlike Qt which had support for it eons ago.

Let's hope the UI setup isn't insanely broken like WinApp under mono :D

GovanifY avatar May 27 '20 13:05 GovanifY