Apparently the first commit (59ae429972)
did not include all files.
Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
This allows:
- The client to find servers advertized via zeroconf without the need for Bonjour to be installed.
- The server to advertize itself via zeroconf without the need for Bonjour to be installed.
The Win32 API was introduced in the version 10.0.18362.0 (1903/19H1) of Windows SDK. Before that, only the UWP interface was available (introduced in Windows 10 1507).
This commit was successfully tested on Windows 10 1809, which probably means that the API can be used on previous versions as well.
Even if that isn't the case, it's not a problem: if the code fails to load the required symbols, it falls back to Bonjour.
"Q_OS_WIN64" is used instead of "Q_OS_WIN" because of an issue that appears when certain DNS functions are used in an x86 (32 bit) build: https://developercommunity.visualstudio.com/content/problem/1191345/some-dns-api-functions-cause-lnk2019-errors-in-32.html
This means that until the issue is fixed we can safely use the native mDNS-DNS-SD API only on x86_64 (64 bit).
This should make it more clear that we don't include Bonjour-related stuff in our project. We use external libraries depending on the OS.
For compatibility, the server option is still called "bonjour". We should probably add a new option called "zeroconf" and then handle the old one if present in the configuration file.