Merge maui-linux into maui-main
lytico opened this issue ยท 9 comments
Plan to merge
https://github.com/jsuarezruiz/maui-linux/tree/main-linux
with
https://github.com/dotnet/maui main
GtkSharp-Workload
a GtkSharp-Workload is needed
this should happen upstream in https://github.com/GtkSharp/
see also: tizen-workload https://github.com/Samsung/Tizen.NET
Microsoft.Maui.Graphics
make a recent GtkSharp-Version of
https://github.com/dotnet/Microsoft.Maui.Graphics
get https://github.com/dotnet/maui main to compile on linux
currently, the build.cake is windows-specific and broken on linux:
https://github.com/dotnet/maui/blob/main/build.cake
merge
main problem will be the build-scripts & build-variables
and, of cause, all the files cluttered with
platform-specific preprocessor-directives
here, merge all lines as is main-linux
in you find with
#elif GTK
and
#if GTK
update api changes
it's not so hard, as it looks at the first glance.
general, look at maui-tizen as a reference
see eg. https://github.com/dotnet/maui/tree/main/src/Core/src/Platform/Tizen
Currently, main-linux
is using net5.0
as a target for Gtk's backend to fill in the lack of a dedicated net6.0-linux
TFM.
This forces MAUI for GTK to be stuck on net5.0, or at least, behind other targets.
Are there any plans to mitigate this? (For example, by using separate MSBuild projects or somehow create a new TFM?,...)
no, no plans for supporting net5.
it should be migrated to net6
and, the TFM will be net6.0-Gkt (not linux! Gtk runs on more than linux)
it should be migrated to net6 and, the TFM will be net6.0-Gkt (not linux! Gtk runs on more than linux)
Yes, that was what I expected. Also Linux doesn't guarantee to have GTK installed so making it net6.0-linux
to access GTK does not make much sense.
no, no plans for supporting net5.
I was not asking for net5
support. net5
seems to be a hack the MAUI for GTK devs were using to get a TFM specialized for GTK.
the TFM will be net6.0-Gkt
You mean net6.0-gtk
right? If that's the case, do we actually have to modify the SDK to add a new TFM.
Furthermore, other existing TFMs for .NET seems to represent environments, such as windows
, android
, maccatalyst
, and the proposed but dropped, browser
. gtk
doesn't seem to be a legal runtime environment on its own, just an UI framework.
You mean net6.0-gtk right?
yes
Also Linux doesn't guarantee to have GTK installed
the workload is responsible for provide all dependencies to get GtkSharp running. So it has to install all packages (on linux) or provide the installer for Gtk (on windows) or call brew ... (on mac)
TFMs for .NET seems to represent environments ...
so, if we take -linux, we know nothing. also android is a linux, but with a special Ui-Framework (=android)
same with tizen.
so, if we take -linux, we know nothing. also android is a linux, but with a special Ui-Framework (=android)
Ok I get it. Thanks!
Any pointers on where to start for the workload? It seems that the GtkSharp project already has adequate scripts to ensure dependencies are installed on the machine, the workload just need to register it somehow...
the workload just need to register it somehow...
yes, it could be easy (easy ... the shortest joke in it ;-) )
GtkSharp related stuff should happen upstream.
See GtkSharp/GtkSharp#349
started to merge: jsuarezruiz#37
on net 8.0 now