Qt D-Bus on Windows
-
Hi,
I was looking for a Qt IPC mechanism to use in my cross-platform project and I noticed that D-Bus is quite useful and convenient way to do that.
https://doc.qt.io/qt-5/qtdbus-index.html
https://doc.qt.io/qt-5/ipc.html
But I am not sure if it is supported and works flawlessly on Windows systems and I was wondering if someone has used it for a Qt project and let me know.
Based on the following link from freedesktop it seems that a Windows port implementation exists but I couldn't find any reference for using it in Windows programs.
https://www.freedesktop.org/wiki/Software/dbus/
Since it's crucial for my Qt project to be cross-platform, Qt D-Bus is safe to be used in my case or should I consider using QLocalServer/QLocalSocket or SharedMemory ? Any ideas ?
Thanks.
-
D-Bus is definitely not portable.
In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.
The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.
-
@xtofl said in Qt D-Bus on Windows:
D-Bus is definitely not portable
Are you sure? The third link from OP says the opposite. Windows port is already part of official repo. And: "DBus on Windows is used by KDE, Gnome and commercial applications.".
-
@xtofl said in Qt D-Bus on Windows:
D-Bus is definitely not portable.
This is wrong. It worked already ten years ago on windows...
-
@jsulm @Christian-Ehrlicher after I posted this, I tried to run a d-bus example on Windows. It compiles fine but when I am trying to run the example...getting this error below.
Cannot connect to the D-Bus session bus. Please check your system settings and try again. QEventDispatcherWin32::wakeUp: Failed to post a message
I installed D-Bus on Windows through a ready made installer found in Google archives but it seems to be old version and deprecated.
https://code.google.com/archive/p/dbus-windows-installer/downloads
Do you think it's a better idea to build from sources using the official dbus repository ?
https://gitlab.freedesktop.org/dbus/dbus
As @xtofl said about gRPC, any ideas? It could be useful somehow ?
Thanks.
-
@xtofl said in Qt D-Bus on Windows:
D-Bus is definitely not portable.
In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.
The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.
@xtofl you used gRPC for communicating large amount of data or simply exchanging lightweight messages? Any example using Qt and gRPC as a starting point reference ?
Thanks.
-
I did not do anything with DBus since some years so I don't know the current install procedure.
-
@nsourl said in Qt D-Bus on Windows:
Do you think it's a better idea to build from sources using the official dbus repository ?
You can try to build it by yourself
-
May be you can try this(Windows port)
freedesktop.org