jbagg / QtZeroConf

Qt wrapper class for ZeroConf libraries across various platforms.
Other
69 stars 51 forks source link

Add support for compiling for Ubuntu Touch aka UBPorts #48

Closed mzanetti closed 2 years ago

mzanetti commented 3 years ago

This is piggy packing on the Android implementation using avahicore as there is no avahi-daemon installed on Ubuntu Phone devices.

I'm using this for years but never upstreamed it given the little popularity of the platform. Still, the Ubuntu Touch community is growing so IMO it could make a valid platform to be supported.

Admittedly, the main reason why I'm submitting this now, is that the upcoming branch to move the Android implementation away from avahicore would make the entire avahicore implementation obsolete. So in the hope that it could still be kept in the long run, I'm trying to give it an actual purpose with this.

mzanetti commented 3 years ago

Oh, I just saw I opened this already 2 years ago and it's still pending... I'll close the other one as this one is a tad cleaner. For reference, the old pull request: https://github.com/jbagg/QtZeroConf/pull/26

jbagg commented 3 years ago

I asked Ubuntu Phone if they will add avahi-daemon.

https://forums.ubports.com/topic/6696/add-avahi-daemon

While doing so, I started wondering if your application can add avahi-daemon as a dependency. I don't know anything about Ubutnu Phone, but if it uses .debs you should be able to add avahi-daemon as a dependency.

mzanetti commented 3 years ago

Having a dependency is not possible. Ubuntu Phone does not use regular apt-get to isntall apps but instead uses the click packaging format which is a all-in-one bundle without the concept of dependencies except a so called "framework version" similar to apples app bundles or android apks. At this point, there is no framework version that ships avahi preinstalled and I don't think it would happen anytime soon. In any case, if that happens, I'll be one of the first to know as I am in frequent contact with the devs of the platform and I would of course update the implementation to favor that instead.

Ubuntu desktop builds (dpkg) of the app do already use the avahiclient implementation and pull avahi-daemon as a dependency.

jbagg commented 3 years ago

click packaging format which is a all-in-one bundle without the concept of dependencies

I would say that is a fatal design flaw with Ubuntu Phone.

jbagg commented 3 years ago

PureOS on the Librem5 uses apt-get

mzanetti commented 3 years ago

I would say that is a fatal design flaw with Ubuntu Phone.

Well, depends on the point of view I suppose... Google and Apple didn't think it's that bad, as it's the same on those platform. Now the lack of a system wide mdns service (in that case avahi-daemon) is less of a design decision, but rather the lack of man power.

mzanetti commented 3 years ago

PureOS on the Librem5 uses apt-get

Apps would use the avahi-client variant on that platform then. But this Pull request is meant for platforms that do not.

Thinking more about it, the config option ubports actually isn't great. Sailfish OS doesn't ship avahi preinstalled either. If they'll ever manage to upgrade their Qt installation to something greater than 5.6, I'll be trying to support that too. Perhaps the config option should be more explicit and be named avhicore instead? So if someone wants to use QtZeroConf on a platform that does not have a system wide mdns service, this flip could be enabled, regardless if it's Ubuntu Phone, Sailfish OS, or something else.

jbagg commented 2 years ago

pulled in with git am --signoff