Enhance: add support for Windows 64 Bit Discord RPC Library#3200
Conversation
This entails changing the name of the existing 32 Bits one so that another one for 64 Bits can be placed alongside it in the same directory. The Discord release zip file puts them (and the Linux and MacOs 64 bit ones) in separate directories - which is a little inconvenient for us... I have also put in some qDebug() messages - because I am having difficulty getting the Discord RPC to respond to local builds - though it works fine for Linux AppImages - which use the very same copy of the library for THAT OS. They are enabled with a DEBUG_DISCORD #define visible to the discord.cpp compilation unit... Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
This is small part of the work that will be needed to get a 64 Bit Windows build working - but I am having some fun debugging Discord because it isn't working for me on Linux on local builds and until I can get it working on that OS locally it makes me hesitant to work on getting it going on (my MSYS2) Windows 64 bits... |
|
Also the prototype for the |
| for (auto& libraryPath : qApp->libraryPaths()) { | ||
| qDebug() << " " << libraryPath; | ||
| } | ||
| if (auto msg = mpLibrary->errorString(); !msg.isEmpty()) { |
There was a problem hiding this comment.
Wondered if you were gonna spot that C++17-ism...! 😝
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
I need this now for PR #3208 - or rather the squashed down one (to eliminate all the commit noise in the git history) that I will produce once I have gotten it to the stage that it produces runnable |
|
It looks good, but I can't test to verify that it works, I'm on mobile. Can you get someone to test it? |
Turns out the ones I had put in were both 32-bit ones - the ones inserted
here are described differently by the MSYS2 `file` command as:
* discord-rpc32.dll: "PE32 executable (DLL) (console) Intel 80386, for MS
Windows"
* discord-rpc64.dll: "PE32+ executable (DLL) (console) x86-64, for MS
Windows"
Further more they were certified and signed on "27 November 2018 17:20" so
that is consistent with them being the (current) version 3.4.0 release
files from that same date.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
It has been pulled in to #3208 and that showed I had not provided the correct library for the 64Bit case hence the need for that last commit. Feedback from the Discord #Testing channel might be soon forthcoming... |
vadi2
left a comment
There was a problem hiding this comment.
I apologise for the delay in reviewing :( it works well!
| // Defined on both 32 and 64 bit Windows | ||
| mpLibrary.reset(new QLibrary(QStringLiteral("discord-rpc32"))); | ||
| #else | ||
| // All other OSes |
There was a problem hiding this comment.
Well Linux and macOs - and they are both 64-Bit only as it happens.
These are not wanted in the default case for production code.
It should do as it only renames an existing file for Win32 (our current production builds) usage... |
) This entails changing the name of the existing 32 Bits one so that another one for 64 Bits can be placed alongside it in the same directory. The Discord release zip file puts them (and the Linux and MacOs 64 bit ones) in separate directories - which is a little inconvenient for us... I have also put in some qDebug() messages - because I am having difficulty getting the Discord RPC to respond to local builds - though it works fine for Linux AppImages - which use the very same copy of the library for THAT OS. They are enabled with a DEBUG_DISCORD #define visible to the discord.cpp compilation unit... Turns out the origin Windows libraries I had put in were both 32-bit ones - the ones inserted now are described differently by the MSYS2 `file` command as: * discord-rpc32.dll: "PE32 executable (DLL) (console) Intel 80386, for MS Windows" * discord-rpc64.dll: "PE32+ executable (DLL) (console) x86-64, for MS Windows" Further more they were certified and signed on "27 November 2018 17:20" so that is consistent with them being the (current) version 3.4.0 release files from that same date. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This entails changing the name of the existing 32 Bits one so that another one for 64 Bits can be placed alongside it in the same directory. The Discord release zip file puts them (and the Linux and MacOs 64 bit ones) in separate directories - which is a little inconvenient for us...
I have also put in some
qDebug()messages - because I am having difficulty getting the Discord RPC to respond to local builds - though it works fine for Linux AppImages - which use the very same copy of the library for THAT OS. They are enabled with aDEBUG_DISCORD#definevisible to the discord.cpp compilation unit...Signed-off-by: Stephen Lyons slysven@virginmedia.com