UI: Force plugins to use our Qt5Network, not their own

The Elgato Streamdeck plugin ships their own Qt5Network.dll on Windows,
which may be ABI incompatible with newer Qt DLLs if we decide to update
our Qt version. So to prevent that plugins (and other plugins) from
using their Qt5Network.dll, we need to explicitly load our
Qt5Network.dll first so that we can prevent it from trying to load
theirs beforehand.

For context on this, previously, we didn't ship Qt5Network on Windows
because we would have to ship OpenSSL with it, but we didn't want to
ship it without SSL support. Because of that, Elgato's Streamdeck plugin
would ship their own Qt5Network.dll library (that didn't have SSL
support anyway). However, Qt recently added support for windows
schannel, which allows SSL support via the Windows API, making it so we
don't have to ship extra libraries to get SSL. So now we can start
shipping Qt5Network without worry.
This commit is contained in:
jp9000 2020-11-22 14:32:55 -08:00
parent 9f6e49d12c
commit 9048d8095d

View file

@ -1697,6 +1697,12 @@ void OBSBasic::OBSInit()
InitOBSCallbacks();
InitHotkeys();
/* hack to prevent elgato from loading its own Qt5Network that it tries
* to ship with */
#if defined(_WIN32) && !defined(_DEBUG)
LoadLibraryW(L"Qt5Network");
#endif
AddExtraModulePaths();
blog(LOG_INFO, "---------------------------------");
obs_load_all_modules();