Commit Graph

6 Commits

Author SHA1 Message Date
Robert
56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
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.
2021-04-09 15:41:49 +02:00
Robert Adam
dda161138b REFAC: Make sure all macros are #undef'd again
If they are not there is the potential of name clashes when performing a
unity build.

See: https://stackoverflow.com/questions/847974/the-benefits-disadvantages-of-unity-builds
2021-03-06 18:57:22 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Davide Beatrici
5e088269ae FIX(client, server): Load native mDNS/DNS-SD symbols at runtime
This change:
- Fixes binaries failing to start on versions of Windows where dnsapi.dll doesn't export the symbols we need.
- Allows us to use the native API in x86 builds.
See https://developercommunity.visualstudio.com/content/problem/1191345/some-dns-api-functions-cause-lnk2019-errors-in-32.html for more info.
2020-12-23 05:13:20 +01:00
Davide Beatrici
ee731f8405 FEAT(client, server): use native mDNS/DNS-SD API on Windows, if available
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).
2020-09-22 07:36:43 +02:00
Davide Beatrici
6a59ae2443 REFAC(client, server): replace "Bonjour" with "Zeroconf", except for 3rdparty
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.
2020-09-22 07:35:52 +02:00