Make it possible to compile and run on Windows.
This commit is contained in:
parent
58927593ce
commit
0a11b572c0
@ -23,6 +23,8 @@ IF (MINGW)
|
||||
message("OS Platform Microsoft Windows")
|
||||
message("Envrinoment MINGW")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
||||
include_directories(
|
||||
include
|
||||
/mingw64/include
|
||||
|
@ -7,6 +7,13 @@ set(UTILS_DIR ${CMAKE_SOURCE_DIR}/utils)
|
||||
|
||||
set(GPGME_LIB_DIR ${UTILS_DIR}/gpgme/lib)
|
||||
|
||||
IF (MINGW)
|
||||
target_link_libraries(gpg
|
||||
gpgme gpg-error assuan
|
||||
Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core
|
||||
wsock32)
|
||||
else()
|
||||
target_link_libraries(gpg
|
||||
gpgme gpg-error assuan
|
||||
Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core)
|
||||
endif()
|
@ -29,7 +29,9 @@
|
||||
#include <Mime.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace GpgME {
|
||||
@ -69,7 +71,8 @@ namespace GpgME {
|
||||
engineInfo = gpgme_ctx_get_engine_info(mCtx);
|
||||
|
||||
while (engineInfo != nullptr) {
|
||||
qDebug() << gpgme_get_protocol_name(engineInfo->protocol);
|
||||
qDebug() << gpgme_get_protocol_name(engineInfo->protocol) << engineInfo->file_name << engineInfo->protocol
|
||||
<< engineInfo->home_dir << engineInfo->version;
|
||||
engineInfo = engineInfo->next;
|
||||
}
|
||||
|
||||
@ -419,7 +422,8 @@ namespace GpgME {
|
||||
|
||||
Mime *mime = new Mime(message);
|
||||
for (MimePart tmp : mime->parts()) {
|
||||
if (tmp.header.getValue("Content-Type") == "text/plain" && tmp.header.getValue("Content-Transfer-Encoding") != "base64") {
|
||||
if (tmp.header.getValue("Content-Type") == "text/plain" &&
|
||||
tmp.header.getValue("Content-Transfer-Encoding") != "base64") {
|
||||
QByteArray body;
|
||||
if (tmp.header.getValue("Content-Transfer-Encoding") == "quoted-printable") {
|
||||
Mime::quotedPrintableDecode(tmp.body, body);
|
||||
|
Loading…
x
Reference in New Issue
Block a user