Add support for Microsoft Visual Studio buildchain

* Use C++17 when using MSVC compiler
* Remove unneeded header files and macros
* Removed unnecessary Yubikey cmake file
* Enhance release tool
* Updated INSTALL.md
This commit is contained in:
smlu 2021-09-06 22:26:00 -04:00 committed by Jonathan White
parent 24a23ce66e
commit 0c6587b5b7
19 changed files with 174 additions and 145 deletions

View file

@ -39,7 +39,7 @@ if(WITH_XC_BROWSER)
COMMENT "Deploying keepassxc-proxy")
endif()
if(MINGW)
if(WIN32)
target_link_libraries(keepassxc-proxy Wtsapi32.lib Ws2_32.lib)
endif()
endif()

View file

@ -26,9 +26,8 @@
#ifdef Q_OS_WIN
#include <fcntl.h>
#include <io.h>
#include <winsock2.h>
#include <windows.h>
#else
#include <sys/socket.h>
#endif
@ -49,8 +48,13 @@ NativeMessagingProxy::NativeMessagingProxy()
void NativeMessagingProxy::setupStandardInput()
{
#ifdef Q_OS_WIN
#ifdef Q_CC_MSVC
_setmode(_fileno(stdin), _O_BINARY);
_setmode(_fileno(stdout), _O_BINARY);
#else
setmode(fileno(stdin), _O_BINARY);
setmode(fileno(stdout), _O_BINARY);
#endif
#endif
QtConcurrent::run([this] {