diff options
-rw-r--r-- | compiler.pri | 41 | ||||
-rw-r--r-- | overlay/lib.cpp | 7 | ||||
-rw-r--r-- | overlay/overlay.pro | 5 | ||||
-rw-r--r-- | src/mumble/GlobalShortcut_win.cpp | 6 | ||||
-rw-r--r-- | src/mumble/Overlay_win.cpp | 4 | ||||
-rw-r--r-- | src/mumble/mumble.pro | 2 | ||||
-rw-r--r-- | src/murmur/murmur.pro | 8 |
7 files changed, 67 insertions, 6 deletions
diff --git a/compiler.pri b/compiler.pri index c3c7bb73e..eff150345 100644 --- a/compiler.pri +++ b/compiler.pri @@ -9,6 +9,42 @@ win32 { INCLUDEPATH *= "$$BOOST_PATH/include" "$$BOOST_PATH/include/boost-1_49/" QMAKE_LIBDIR *= "$$OPENSSL_PATH/lib" "$$LIBSNDFILE_PATH/lib" "$$BOOST_PATH/lib" INCLUDEPATH *= "$$OPENSSL_PATH/include" "$$LIBSNDFILE_PATH/include" + + # Sanity check that DXSDK_DIR, LIB and INCLUDE are properly set up. + # + # On Windows/x86, we build using the VS2013 v120_xp toolchain, which targets + # a slightly modified Win7 SDK that still allows building for Windows XP. In that + # environment, we must use the "external" DirectX SDK (June 2010). This SDK is + # specified via the SXSDK_DIR. + # + # On Windows/amd64, we build using the VS2013 v120 platform, and we target the + # Windows 8.1 SDK. In this setup, we use the DirectX SDK included with the Windows + # 8.1 SDK, but only to a point. The bundled SDK does not include all things that + # we depend on for the overlay, such as d3dx{9,10,11}. To overcome this, we use + # both SDKs: the one bundled with the Windows 8.1 SDK for most libraries, and the + # external June 2010 variant for the things that are not in the Windows 8.1 SDK + # variant of the DirectX SDK. This is the approach recommended by Microsoft: + # http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx + # (see step 5). + # + # Because of these things, the Windows build currently expects the build environment + # to properly set up the LIB and INCLUDE environment variables, with correct ordering + # of the Windows SDK and DirectX depending on the platform we're targetting. + # It's tough to check these things with qmake, we'll have to do with a simple sanity + # check for the presence of the variables. + DXSDK_DIR_VAR=$$(DXSDK_DIR) + INCLUDE_VAR=$$(INCLUDE) + LIB_VAR=$$(LIB) + isEmpty(DXSDK_DIR_VAR) { + error("Missing DXSDK_DIR environment variable. Are you missing the DirectX SDK (June 2010)?") + } + isEmpty(LIB_VAR) { + error("The LIB environment variable is not set. Are you not in a build environment?") + } + isEmpty(INCLUDE_VAR) { + error("The INCLUDE environment variable is not set. Are you not in a build environment?") + } + CONFIG(intelcpp) { DEFINES *= USE_INTEL_IPP DEFINES *= RESTRICT=restrict @@ -47,7 +83,10 @@ win32 { } else { QMAKE_CFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2 QMAKE_CXXFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2 - QMAKE_LFLAGS_RELEASE *= /SafeSEH /NXCOMPAT /DYNAMICBASE + QMAKE_LFLAGS_RELEASE *= /NXCOMPAT /DYNAMICBASE + equals(QMAKE_TARGET.arch, x86) { + QMAKE_LFLAGS_RELEASE -= /SafeSEH + } # MSVS 2012 and 2013's cl.exe will generate SSE2 code by default, # unless an explict arch is set. diff --git a/overlay/lib.cpp b/overlay/lib.cpp index 6895288ef..d93508cab 100644 --- a/overlay/lib.cpp +++ b/overlay/lib.cpp @@ -107,10 +107,17 @@ FakeInterface::~FakeInterface() { void FakeInterface::replace(LONG offset, voidMemberFunc replacement) { void *p = NULL; +#if defined(_M_X86) _asm { mov eax, replacement mov p, eax } +#elif defined(_M_X64) + // Crash. + ods("Lib: unimplemented FakeInterface::replace on x64. crashing..."); + char *c = NULL; + *c = 0; +#endif ods("Lib: FakeInterface: replace: That gave %p", p); vtbl[offset] = p; } diff --git a/overlay/overlay.pro b/overlay/overlay.pro index 1e01bf4e2..a89aceae9 100644 --- a/overlay/overlay.pro +++ b/overlay/overlay.pro @@ -22,11 +22,10 @@ QMAKE_CXXFLAGS_DEBUG -= -MDd QMAKE_CXXFLAGS_RELEASE *= -MT QMAKE_CXXFLAGS_DEBUG *= -MTd -INCLUDEPATH *= "$(DXSDK_DIR)Include" INCLUDEPATH *= "$$FX11DIR/inc" -LIBS *= -l"$$(DXSDK_DIR)Lib/x86/dxguid" -luuid -lole32 -luser32 -ladvapi32 -LIBS *= "$$(DXSDK_DIR)Lib/x86/*" +LIBS *= -ldxguid -luuid -lole32 -luser32 -ladvapi32 +LIBS *= -ld3d9 -ld3d10 -ld3d11 -ld3dcompiler -ld3dx9 -ld3dx10 -ld3dx11 -ldxgi CONFIG(release, debug|release) { DESTDIR = ../release diff --git a/src/mumble/GlobalShortcut_win.cpp b/src/mumble/GlobalShortcut_win.cpp index 054b20b3d..d08b722ed 100644 --- a/src/mumble/GlobalShortcut_win.cpp +++ b/src/mumble/GlobalShortcut_win.cpp @@ -52,6 +52,7 @@ static uint qHash(const GUID &a) { return val; } +#ifndef Q_OS_WIN64 static HWND WINAPI HookWindowFromPoint(POINT p); static BOOL WINAPI HookSetForegroundWindow(HWND hwnd); @@ -83,6 +84,7 @@ static BOOL WINAPI HookSetForegroundWindow(HWND hwnd) { return ret; } +#endif /** * Returns a platform specific GlobalShortcutEngine object. @@ -102,6 +104,10 @@ GlobalShortcutWin::GlobalShortcutWin() { // Hidden setting to disable hooking bHook = g.qs->value(QLatin1String("winhooks"), true).toBool(); +#ifdef Q_OS_WIN64 + qWarning("GlobalShortcutWin: force-disabling 'winhooks' on x64"); + bHook = false; +#endif GetKeyboardState(ucKeyState); diff --git a/src/mumble/Overlay_win.cpp b/src/mumble/Overlay_win.cpp index 939a92316..7abbbdd5c 100644 --- a/src/mumble/Overlay_win.cpp +++ b/src/mumble/Overlay_win.cpp @@ -49,6 +49,10 @@ typedef void (__cdecl *PrepProc)(); extern "C" __declspec(dllexport) void mumbleSelfDetection() {}; OverlayPrivateWin::OverlayPrivateWin(QObject *p) : OverlayPrivate(p) { +#ifdef Q_OS_WIN64 + qWarning("Overlay: suppressing OverlayPrivateWin initialization on x64"); + return; +#endif hpInstall = NULL; hpRemove = NULL; diff --git a/src/mumble/mumble.pro b/src/mumble/mumble.pro index 87e4274ba..0bc15552a 100644 --- a/src/mumble/mumble.pro +++ b/src/mumble/mumble.pro @@ -185,7 +185,7 @@ win32 { } HEADERS *= GlobalShortcut_win.h TaskList.h SOURCES *= GlobalShortcut_win.cpp TextToSpeech_win.cpp Overlay_win.cpp SharedMemory_win.cpp Log_win.cpp os_win.cpp TaskList.cpp ../../overlay/HardHook.cpp ../../overlay/ods.cpp - LIBS *= -l"$$(DXSDK_DIR)Lib/x86/dxguid" -l"$$(DXSDK_DIR)Lib/x86/dinput8" -lsapi -lole32 -lws2_32 -ladvapi32 -lwintrust -ldbghelp -llibsndfile-1 -lshell32 -lshlwapi -luser32 -lgdi32 + LIBS *= -ldxguid -ldinput8 -lsapi -lole32 -lws2_32 -ladvapi32 -lwintrust -ldbghelp -llibsndfile-1 -lshell32 -lshlwapi -luser32 -lgdi32 LIBS *= -ldelayimp -delayload:speex.dll -delayload:shell32.dll DEFINES *= WIN32 diff --git a/src/murmur/murmur.pro b/src/murmur/murmur.pro index 762169971..20202fe21 100644 --- a/src/murmur/murmur.pro +++ b/src/murmur/murmur.pro @@ -106,7 +106,13 @@ ice { QMAKE_LIBDIR *= "$$ICE_PATH/lib/vc100" } else { DEFINES *= ICE_STATIC_LIBS - QMAKE_LIBDIR *= $$ICE_PATH/lib $$BZIP2_PATH/lib + QMAKE_LIBDIR *= $$BZIP2_PATH/lib + equals(QMAKE_TARGET.arch, x86) { + QMAKE_LIBDIR *= $$ICE_PATH/lib + } + equals(QMAKE_TARGET.arch, x86_64) { + QMAKE_LIBDIR *= $$ICE_PATH/lib/x64 + } LIBS *= -llibbz2 -ldbghelp -liphlpapi -lrpcrt4 } } |