Closed zehnm closed 4 years ago
Further analysis:
struct sockaddr_un is a Unix only structure!
For Windows there's another configuration defined in qtzeroconf.pri:
win32 {
DEFINES+= WIN32
DEFINES+= NDEBUG
DEFINES+= _WINDOWS
DEFINES+= _USRDLL
DEFINES+= MDNS_DEBUGMSGS=0
DEFINES+= WIN32_LEAN_AND_MEAN
DEFINES+= USE_TCP_LOOPBACK
DEFINES+= _CRT_SECURE_NO_DEPRECATE
DEFINES+= _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1
DEFINES+= NOT_HAVE_SA_LEN
QMAKE_CFLAGS+= -I$$PWD/bonjour-sdk
QMAKE_CXXFLAGS+= -I$$PWD/bonjour-sdk -I$$PWD
HEADERS+= $$PWD/qzeroconf.h $$PWD/bonjour_p.h
SOURCES+= $$PWD/bonjour.cpp
SOURCES+= $$PWD/bonjour-sdk/dnssd_clientlib.c
SOURCES+= $$PWD/bonjour-sdk/dnssd_clientstub.c
SOURCES+= $$PWD/bonjour-sdk/dnssd_ipc.c
LIBS+= -lws2_32 -lwsock32
}
Important are USE_TCP_LOOPBACK
& NOT_HAVE_SA_LEN
However they are NOT considered during a build!? Manually defining them in dnssd_clientstub.c & .h makes it work. So there's something wrong with the Qt project setup!
Got that little bugger! The problem was in remote.pro overriding all DEFINES:
include(qtzeroconf/qtzeroconf.pri)
DEFINES = QZEROCONF_STATIC
This is wrong and overrides all previous DEFINES in qtzeroconf.pri! Correct:
include(qtzeroconf/qtzeroconf.pri)
DEFINES += QZEROCONF_STATIC
Good catch @zehnm ! :)
Fixed in feature/project-setup branch. This issue will be resolved once #324 is merged to dev
One step closer to a working Windows app! All resources should be copied now at the right place. Unfortunately the plugin loading is still broken.
Plugin loading fixed :-) Test case with only ir plugin inside plugins folder:
LOADING PLUGIN: "D:/projects/yio/binaries/windows/gcc/x86/debug/plugins/appletv.dll"
FAILED TO LOAD PLUGIN: "The shared library was not found."
LOADING PLUGIN: "D:/projects/yio/binaries/windows/gcc/x86/debug/plugins/homeassistant.dll"
FAILED TO LOAD PLUGIN: "The shared library was not found."
LOADING PLUGIN: "D:/projects/yio/binaries/windows/gcc/x86/debug/plugins/ir.dll"
qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
Non available plugins fail, IR plugin succeeds.
Fixed in dev branch
The Windows 10 development environment has been setup according to: https://github.com/YIO-Remote/remote-software/blob/master/DEV%20ENVIRONMENT.md#windows
However there are multiple errors in the qtzeroconf / bonjour-sdk module.
unknown type name int64_t
This could be fixed with
#include <stdint.h>
in CommonServices.h in the#elif ( TARGET_OS_WIN32 )
block starting at line 234:Looks like MinGW behaves differently than other compilers.
_struct sockaddrun not defined and others:
My assumption is that MinGW is not suited for this project on Windows. Has anyone got this running on Windows? E.g. with the Visual Studio compiler?