← Back to team overview

qpdfview team mailing list archive

Re: Single instance on Windows

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Razi,

Am 18.11.2014 um 13:04 schrieb Seyyed Razi Alavizadeh:
> Hello Adam,
> 
> It seems qpdfview uses DBUS for lots of things specially for 
> running as a single instance application, but DBUS is available 
> just in UNIX world. What's your idea about Windows?

D-Bus is available on Windows AFAIK, c.f. [1]. Of course, it isn't
installed (and probably setup?) by default.

> There are some solutions available for single instance Qt 
> applications we can use one of them or maybe as a more general 
> option we can use DDE [1] and re-implement all features available 
> through DBUS by using DDE for Windows, and indeed I also found an 
> interface class for using DDE in Qt applications [2].

The 'Qt single application solution' by Trolltech/Digia is implemented
use file system semaphores and sockets if I remember correctly and it
would probably be quite a pain to reimplement the IPC functionality of
D-Bus using this, so I don't think this is too useful.

Looking at the DDE wrapper, it seems just as low-level as the above
solution, I don't think reimplementing the D-Bus functionality using
this makes too much sense as D-Bus and in extension QtDBus mapping the
Qt type system to the D-Bus one are there to solve exactly these kind
of problems generically instead of each application reinventing the wheel.

So before we jump right into this, I would further pursue using D-Bus
on Windows. Since KDE4 is available on Windows and it uses D-Bus
heavily, it must definitely be functional. The question is more
whether it needs any special setup and looking at [2], it does not
seem so.

The other thing I would check is whether there exists another IPC
mechanism on Windows that is as well-integrated into Qt as D-Bus is.

Since you are probably more or less our only Windows user (We don't
even provide binaries...), we really have to balance effort versus
yield here. (Of course, if you do the work, this goes a long way
towards inclusion, but then I am just not comfortable with carrying
around such an amount of code (as with DDE) for a rarely (from our
perspective) platform.)

Best regards, Adam.

P.S.: What about switching to some nice and cozy Linux distribution
with D-Bus right out of the box? ;-)

[1] http://www.freedesktop.org/wiki/Software/dbus/#index6h1
[2]
http://poquitopicante.blogspot.ca/2012/07/building-dbus-python-on-windows-with.html

> [1] http://en.wikipedia.org/wiki/Dynamic_Data_Exchange [2] 
> https://dl.dropbox.com/u/7323096/DDE/ddecomm.zip
> 
> Best Regards, Razi
> 
> Alavizadeh, Sayed Razi My Blog: http://pozh.org <http://pozh.org/>
>  Saaghar (????????? ???): http://saaghar.pozh.org/ Saaghar Fan
> Page: http://www.facebook.com/saaghar.p Saaghar Mailing List: 
> http://groups.google.com/group/saaghar
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJUa5VaAAoJEPSSjE3STU34K7AH/2RFbKYG6wQEOBZZ6ieRpbQB
m44Gm5n1oQD7IXR2jyshfuOzrkbuA0LtlYfC3x4sTeTJ/nnJ8FchSwpjuU24h3r/
p7na9aSBSid+g16xclFcrwX+aTAI58nmCFUsK3rari6MFxB3dntVipAdtmDSHZmY
0+CVrW6+fqW2UG1wMb/kXWb8KoqWIQm9q9+5es2ctKxHRGdDv9HQbHxROc28GaWu
v+MX8DLF+vO7FYTIh6BDIOEyfzck9BypLVKDUVziXJ+0GOxoAOOUGtCeXokav/Lj
HPOtABTeBEvfa5YnMDFnyNgEndrWRgmK+H6IGeCokf0Eu2yLTVODhOI1u51aWqY=
=sNiA
-----END PGP SIGNATURE-----


References