diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2014-11-09 17:43:54 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-01-03 21:44:02 +0300 |
commit | 93ad74b467980a45537141e14d385cd8a75956b3 (patch) | |
tree | 2bfc08a31765777ca295b201fdc2619d2231f2dd /src | |
parent | a090c86ee0ce91d76d8f7a18d64df70552e0c743 (diff) |
Add MinHook-based overlay for Windows x64.
This commit adds MinHook as a 3rd party
dependency and adds an alternative HardHook
implementation that makes use of MinHook.
This new MinHook-based HardHook implementation
allows us to provide an overlay for Mumble on
Windows x64.
The x64 overlay hasn't seen much testing in
real-world x64 games, except some minor testing
for World of Warcraft running in x64 mode, where
it works just fine.
There seems to be a compatibility with the Uplay
overlay, which causes Far Cry 4 to crash at the
"Press any key to continue" screen that is shown
just after launching the game. However,
Assassin's Creed: Unity works fine, so it might
just be a Far Cry 4 issue.
The x64 overlay also seems to interoperate with
the Steam overlay just fine.
I think this is a good starting point for the
feature. Let us get it into snapshots and let
us try to squash any addition bugs we find.
Diffstat (limited to 'src')
-rw-r--r-- | src/mumble/OverlayConfig.cpp | 2 | ||||
-rw-r--r-- | src/mumble/Overlay_win.cpp | 5 | ||||
-rw-r--r-- | src/mumble/licenses.h | 89 | ||||
-rw-r--r-- | src/mumble/mumble.pro | 6 |
4 files changed, 96 insertions, 6 deletions
diff --git a/src/mumble/OverlayConfig.cpp b/src/mumble/OverlayConfig.cpp index ce72fb20f..ca8fd96da 100644 --- a/src/mumble/OverlayConfig.cpp +++ b/src/mumble/OverlayConfig.cpp @@ -52,7 +52,7 @@ static ConfigWidget *OverlayConfigDialogNew(Settings &st) { } // Hide overlay config for Mac OS X universal builds -#if !defined(USE_MAC_UNIVERSAL) && !defined(Q_OS_WIN64) +#if !defined(USE_MAC_UNIVERSAL) static ConfigRegistrar registrar(6000, OverlayConfigDialogNew); #endif diff --git a/src/mumble/Overlay_win.cpp b/src/mumble/Overlay_win.cpp index 44ca4a34e..ef47db0fc 100644 --- a/src/mumble/Overlay_win.cpp +++ b/src/mumble/Overlay_win.cpp @@ -53,11 +53,6 @@ OverlayPrivateWin::OverlayPrivateWin(QObject *p) : OverlayPrivate(p) { hpRemove = NULL; qlOverlay = new QLibrary(this); -#ifdef Q_OS_WIN64 - qWarning("Overlay: suppressing OverlayPrivateWin initialization on x64"); - return; -#endif - QString path = QString::fromLatin1("%1/mumble_ol.dll").arg(qApp->applicationDirPath()); qlOverlay->setFileName(path); if (! qlOverlay->load()) { diff --git a/src/mumble/licenses.h b/src/mumble/licenses.h index 218f39ee4..14766c23b 100644 --- a/src/mumble/licenses.h +++ b/src/mumble/licenses.h @@ -361,6 +361,92 @@ static const char *licenseMachOverride = #endif +#ifdef Q_OS_WIN64 +static const char *licenseMinHook = + "MinHook - The Minimalistic API Hooking Library for x64/x86\n" + "Copyright (C) 2009-2014 Tsuda Kageyu.\n" + "All rights reserved.\n" + "\n" + "Redistribution and use in source and binary forms, with or without\n" + "modification, are permitted provided that the following conditions\n" + "are met:\n" + "\n" + " 1. Redistributions of source code must retain the above copyright\n" + " notice, this list of conditions and the following disclaimer.\n" + " 2. Redistributions in binary form must reproduce the above copyright\n" + " notice, this list of conditions and the following disclaimer in the\n" + " documentation and/or other materials provided with the distribution.\n" + "\n" + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n" + "\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n" + "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n" + "PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER\n" + "OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n" + "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n" + "PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n" + "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n" + "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n" + "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n" + "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + "\n" + "================================================================================\n" + "Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov.\n" + "================================================================================\n" + "Hacker Disassembler Engine 32 C\n" + "Copyright (c) 2008-2009, Vyacheslav Patkov.\n" + "All rights reserved.\n" + "\n" + "Redistribution and use in source and binary forms, with or without\n" + "modification, are permitted provided that the following conditions\n" + "are met:\n" + "\n" + " 1. Redistributions of source code must retain the above copyright\n" + " notice, this list of conditions and the following disclaimer.\n" + " 2. Redistributions in binary form must reproduce the above copyright\n" + " notice, this list of conditions and the following disclaimer in the\n" + " documentation and/or other materials provided with the distribution.\n" + "\n" + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n" + "\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n" + "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n" + "PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR\n" + "CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n" + "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n" + "PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n" + "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n" + "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n" + "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n" + "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + "\n" + "-------------------------------------------------------------------------------\n" + "Hacker Disassembler Engine 64 C\n" + "Copyright (c) 2008-2009, Vyacheslav Patkov.\n" + "All rights reserved.\n" + "\n" + "Redistribution and use in source and binary forms, with or without\n" + "modification, are permitted provided that the following conditions\n" + "are met:\n" + "\n" + " 1. Redistributions of source code must retain the above copyright\n" + " notice, this list of conditions and the following disclaimer.\n" + " 2. Redistributions in binary form must reproduce the above copyright\n" + " notice, this list of conditions and the following disclaimer in the\n" + " documentation and/or other materials provided with the distribution.\n" + "\n" + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n" + "\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n" + "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n" + "PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR\n" + "CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n" + "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n" + "PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n" + "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n" + "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n" + "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n" + "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; +#endif + + #ifdef USING_BUNDLED_QT_TRANSLATIONS static const char *licenseQtTranslations = "Mumble uses Qt translations created by the VirtualBox community\n" @@ -430,6 +516,9 @@ static const ThirdPartyLicense licenses3rdParties[] = { #ifdef Q_OS_MAC ThirdPartyLicense("mach_override", "https://github.com/rentzsch/mach_star", licenseMachOverride), #endif +#ifdef Q_OS_WIN64 + ThirdPartyLicense("MinHook", "https://github.com/TsudaKageyu/minhook", licenseMinHook), +#endif #ifdef USING_BUNDLED_QT_TRANSLATIONS ThirdPartyLicense("Additional Qt translations", "https://www.virtualbox.org/ticket/2018", licenseQtTranslations), #endif diff --git a/src/mumble/mumble.pro b/src/mumble/mumble.pro index 24060aac8..df8b00389 100644 --- a/src/mumble/mumble.pro +++ b/src/mumble/mumble.pro @@ -333,6 +333,12 @@ win32 { LIBS *= -ldxguid -ldinput8 -lsapi -lole32 -lws2_32 -ladvapi32 -lwintrust -ldbghelp -llibsndfile-1 -lshell32 -lshlwapi -luser32 -lgdi32 -lpsapi LIBS *= -ldelayimp -delayload:speex.dll -delayload:shell32.dll + equals(QMAKE_TARGET.arch, x86_64) { + DEFINES += USE_MINHOOK + INCLUDEPATH *= ../../3rdparty/minhook-src/include + LIBS *= -lminhook + } + DEFINES *= WIN32 !CONFIG(no-asio) { CONFIG *= asio |