mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
Merge pull request #9144 from highfidelity/revert-9129-audio-dll
Revert "Select Audio DLL at runtime"
This commit is contained in:
commit
10c054165f
3 changed files with 30 additions and 29 deletions
|
@ -43,24 +43,26 @@ macro(PACKAGE_LIBRARIES_FOR_DEPLOYMENT)
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QTAUDIO_PATH $<TARGET_FILE_DIR:${TARGET_NAME}>/audio)
|
set(QTAUDIO_PATH $<TARGET_FILE_DIR:${TARGET_NAME}>/audio)
|
||||||
set(QTAUDIO_WIN7_PATH $<TARGET_FILE_DIR:${TARGET_NAME}>/audioWin7/audio)
|
|
||||||
set(QTAUDIO_WIN8_PATH $<TARGET_FILE_DIR:${TARGET_NAME}>/audioWin8/audio)
|
|
||||||
|
|
||||||
# copy qtaudio_wasapi.dll and qtaudio_windows.dll in the correct directories for runtime selection
|
if (DEPLOY_PACKAGE)
|
||||||
add_custom_command(
|
# copy qtaudio_wasapi.dll alongside qtaudio_windows.dll, and let the installer resolve
|
||||||
TARGET ${TARGET_NAME}
|
add_custom_command(
|
||||||
POST_BUILD
|
TARGET ${TARGET_NAME}
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${QTAUDIO_WIN7_PATH}
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${QTAUDIO_WIN8_PATH}
|
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windows.dll ( ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapi.dll ${QTAUDIO_PATH} && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapi.pdb ${QTAUDIO_PATH} )
|
||||||
# copy release DLLs
|
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windowsd.dll ( ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapid.dll ${QTAUDIO_PATH} && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapid.pdb ${QTAUDIO_PATH} )
|
||||||
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windows.dll ( ${CMAKE_COMMAND} -E copy ${QTAUDIO_PATH}/qtaudio_windows.dll ${QTAUDIO_WIN7_PATH} )
|
)
|
||||||
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windows.dll ( ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapi.dll ${QTAUDIO_WIN8_PATH} )
|
elseif (${CMAKE_SYSTEM_VERSION} VERSION_LESS 6.2)
|
||||||
# copy debug DLLs
|
# continue using qtaudio_windows.dll on Windows 7
|
||||||
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windowsd.dll ( ${CMAKE_COMMAND} -E copy ${QTAUDIO_PATH}/qtaudio_windowsd.dll ${QTAUDIO_WIN7_PATH} )
|
else ()
|
||||||
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windowsd.dll ( ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapid.dll ${QTAUDIO_WIN8_PATH} )
|
# replace qtaudio_windows.dll with qtaudio_wasapi.dll on Windows 8/8.1/10
|
||||||
# remove directory
|
add_custom_command(
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${QTAUDIO_PATH}
|
TARGET ${TARGET_NAME}
|
||||||
)
|
POST_BUILD
|
||||||
|
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windows.dll ( ${CMAKE_COMMAND} -E remove ${QTAUDIO_PATH}/qtaudio_windows.dll && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapi.dll ${QTAUDIO_PATH} && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapi.pdb ${QTAUDIO_PATH} )
|
||||||
|
COMMAND if exist ${QTAUDIO_PATH}/qtaudio_windowsd.dll ( ${CMAKE_COMMAND} -E remove ${QTAUDIO_PATH}/qtaudio_windowsd.dll && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapid.dll ${QTAUDIO_PATH} && ${CMAKE_COMMAND} -E copy ${WASAPI_DLL_PATH}/qtaudio_wasapid.pdb ${QTAUDIO_PATH} )
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -630,6 +630,17 @@ Section "-Core installation"
|
||||||
Delete "$INSTDIR\version"
|
Delete "$INSTDIR\version"
|
||||||
Delete "$INSTDIR\xinput1_3.dll"
|
Delete "$INSTDIR\xinput1_3.dll"
|
||||||
|
|
||||||
|
; The installer includes two different Qt audio plugins.
|
||||||
|
; On Windows 8 and above, only qtaudio_wasapi.dll should be installed.
|
||||||
|
; On Windows 7 and below, only qtaudio_windows.dll should be installed.
|
||||||
|
${If} ${AtLeastWin8}
|
||||||
|
Delete "$INSTDIR\audio\qtaudio_windows.dll"
|
||||||
|
Delete "$INSTDIR\audio\qtaudio_windows.pdb"
|
||||||
|
${Else}
|
||||||
|
Delete "$INSTDIR\audio\qtaudio_wasapi.dll"
|
||||||
|
Delete "$INSTDIR\audio\qtaudio_wasapi.pdb"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; Delete old desktop shortcuts before they were renamed during Sandbox rename
|
; Delete old desktop shortcuts before they were renamed during Sandbox rename
|
||||||
Delete "$DESKTOP\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk"
|
Delete "$DESKTOP\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk"
|
||||||
Delete "$DESKTOP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
|
Delete "$DESKTOP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
|
||||||
|
|
|
@ -167,8 +167,6 @@
|
||||||
// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
||||||
// FIXME seems to be broken.
|
// FIXME seems to be broken.
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <VersionHelpers.h>
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||||
}
|
}
|
||||||
|
@ -419,16 +417,6 @@ bool setupEssentials(int& argc, char** argv) {
|
||||||
|
|
||||||
Setting::preInit();
|
Setting::preInit();
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
// Select appropriate audio DLL
|
|
||||||
QString audioDLLPath = QCoreApplication::applicationDirPath();
|
|
||||||
if (IsWindows8OrGreater()) {
|
|
||||||
audioDLLPath += "/audioWin8";
|
|
||||||
} else {
|
|
||||||
audioDLLPath += "/audioWin7";
|
|
||||||
}
|
|
||||||
QCoreApplication::addLibraryPath(audioDLLPath);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";
|
static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";
|
||||||
bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET);
|
bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET);
|
||||||
|
|
Loading…
Reference in a new issue