mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-02 10:27:15 +01:00
Add MinGW support (#1540)
* rssguard.rc: avoid redefinition warnings * use fully qualified name for std::move * mingw use fhs structure * adjust default setting * cmake: initial support for mingw
This commit is contained in:
parent
4cf3bc8cca
commit
ce69e784c1
@ -1,9 +1,11 @@
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define VS_FF_DEBUG 0x00000001L
|
||||
#define VOS__WINDOWS32 0x00000004L
|
||||
#define VFT_UNKNOWN 0x00000000L
|
||||
#define VFT2_UNKNOWN 0x00000000L
|
||||
#endif
|
||||
|
||||
IDI_ICON1 ICON "@CMAKE_PROJECT_NAME@.ico"
|
||||
|
||||
|
@ -28,8 +28,12 @@ function(prepare_rssguard_plugin plugin_target_name)
|
||||
${LIBRSSGUARD_SOURCE_PATH}
|
||||
)
|
||||
|
||||
if(WIN32 OR OS2)
|
||||
if(MSVC OR OS2)
|
||||
install(TARGETS ${plugin_target_name} DESTINATION plugins)
|
||||
elseif(MINGW)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS ${plugin_target_name}
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/rssguard/plugins)
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS ${plugin_target_name}
|
||||
|
@ -865,16 +865,16 @@ namespace Mimesis {
|
||||
|
||||
Part part;
|
||||
|
||||
part.preamble = move(preamble);
|
||||
part.epilogue = move(epilogue);
|
||||
part.parts = move(parts);
|
||||
part.boundary = move(boundary);
|
||||
part.preamble = std::move(preamble);
|
||||
part.epilogue = std::move(epilogue);
|
||||
part.parts = std::move(parts);
|
||||
part.boundary = std::move(boundary);
|
||||
part.multipart = true;
|
||||
part.set_header("Content-Type", get_header("Content-Type"));
|
||||
part.set_header("Content-Disposition", get_header("Content-Disposition"));
|
||||
erase_header("Content-Disposition");
|
||||
part.crlf = crlf;
|
||||
parts.emplace_back(move(part));
|
||||
parts.emplace_back(std::move(part));
|
||||
}
|
||||
else {
|
||||
multipart = true;
|
||||
@ -888,7 +888,7 @@ namespace Mimesis {
|
||||
part.set_header("Content-Type", get_header("Content-Type"));
|
||||
part.set_header("Content-Disposition", get_header("Content-Disposition"));
|
||||
erase_header("Content-Disposition");
|
||||
part.body = move(body);
|
||||
part.body = std::move(body);
|
||||
}
|
||||
}
|
||||
|
||||
@ -919,7 +919,7 @@ namespace Mimesis {
|
||||
set_header("Content-Disposition", part.get_header("Content-Disposition"));
|
||||
|
||||
if (part.multipart) {
|
||||
parts = move(part.parts);
|
||||
parts = std::move(part.parts);
|
||||
}
|
||||
else {
|
||||
multipart = false;
|
||||
|
@ -865,16 +865,16 @@ namespace Mimesis {
|
||||
|
||||
Part part;
|
||||
|
||||
part.preamble = move(preamble);
|
||||
part.epilogue = move(epilogue);
|
||||
part.parts = move(parts);
|
||||
part.boundary = move(boundary);
|
||||
part.preamble = std::move(preamble);
|
||||
part.epilogue = std::move(epilogue);
|
||||
part.parts = std::move(parts);
|
||||
part.boundary = std::move(boundary);
|
||||
part.multipart = true;
|
||||
part.set_header("Content-Type", get_header("Content-Type"));
|
||||
part.set_header("Content-Disposition", get_header("Content-Disposition"));
|
||||
erase_header("Content-Disposition");
|
||||
part.crlf = crlf;
|
||||
parts.emplace_back(move(part));
|
||||
parts.emplace_back(std::move(part));
|
||||
}
|
||||
else {
|
||||
multipart = true;
|
||||
@ -888,7 +888,7 @@ namespace Mimesis {
|
||||
part.set_header("Content-Type", get_header("Content-Type"));
|
||||
part.set_header("Content-Disposition", get_header("Content-Disposition"));
|
||||
erase_header("Content-Disposition");
|
||||
part.body = move(body);
|
||||
part.body = std::move(body);
|
||||
}
|
||||
}
|
||||
|
||||
@ -919,7 +919,7 @@ namespace Mimesis {
|
||||
set_header("Content-Disposition", part.get_header("Content-Disposition"));
|
||||
|
||||
if (part.multipart) {
|
||||
parts = move(part.parts);
|
||||
parts = std::move(part.parts);
|
||||
}
|
||||
else {
|
||||
multipart = false;
|
||||
|
@ -623,14 +623,20 @@ if(APPLE)
|
||||
)
|
||||
elseif(WIN32)
|
||||
target_link_libraries(rssguard PUBLIC
|
||||
Shell32.lib
|
||||
shell32
|
||||
odbc32
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR OS2)
|
||||
if(MSVC OR OS2)
|
||||
install(TARGETS rssguard DESTINATION .)
|
||||
set(HEADERS_FOLDER "include/librssguard")
|
||||
elseif(MINGW)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS rssguard
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
set(HEADERS_FOLDER "${CMAKE_INSTALL_INCLUDEDIR}/librssguard")
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS rssguard DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
@ -579,7 +579,12 @@ QString Application::userDataAppFolder() const {
|
||||
|
||||
// In "app" folder, we would like to separate all user data into own subfolder,
|
||||
// therefore stick to "data" folder in this mode.
|
||||
#ifdef _MSC_VER
|
||||
return QDir::toNativeSeparators(applicationDirPath() + QDir::separator() + QSL("data%1").arg(major_version));
|
||||
#else
|
||||
return QDir::toNativeSeparators(applicationDirPath() + QDir::separator() + QSL("..") + QDir::separator() +
|
||||
QSL("share") + QDir::separator() + QSL(APP_LOW_NAME) + QDir::separator() + QSL("data%1").arg(major_version));
|
||||
#endif
|
||||
}
|
||||
|
||||
QString Application::userDataFolder() {
|
||||
|
@ -77,7 +77,12 @@ QStringList PluginFactory::pluginPaths() const {
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator() +
|
||||
QL1S(RSSGUARD_LIBDIR) + QDir::separator() + QL1S(APP_LOW_NAME);
|
||||
#elif defined(Q_OS_WIN)
|
||||
#ifdef _MSC_VER
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("plugins");
|
||||
#else
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator() +
|
||||
QL1S("share") + QDir::separator() + QL1S(APP_LOW_NAME) + QDir::separator() + QL1S("plugins");
|
||||
#endif
|
||||
#else
|
||||
paths << QCoreApplication::applicationDirPath();
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@ DKEY Node::ID = "nodejs";
|
||||
|
||||
DKEY Node::NodeJsExecutable = QSL("nodejs_executable_") + OS_ID;
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
||||
#if (defined(Q_OS_WIN) && defined(_MSC_VER)) || defined(Q_OS_OS2)
|
||||
DVALUE(QString) Node::NodeJsExecutableDef = "node.exe";
|
||||
#else
|
||||
DVALUE(QString) Node::NodeJsExecutableDef = "node";
|
||||
@ -39,7 +39,7 @@ DVALUE(QString) Node::NodeJsExecutableDef = "node";
|
||||
|
||||
DKEY Node::NpmExecutable = QSL("npm_executable_") + OS_ID;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WIN) && defined(_MSC_VER)
|
||||
DVALUE(QString) Node::NpmExecutableDef = "npm.cmd";
|
||||
#elif defined(Q_OS_OS2)
|
||||
DVALUE(QString) Node::NpmExecutableDef = "npm.exe";
|
||||
|
@ -36,12 +36,12 @@ if(APPLE)
|
||||
)
|
||||
elseif(WIN32)
|
||||
target_link_libraries(app PUBLIC
|
||||
Shell32.lib
|
||||
odbc32.lib
|
||||
shell32
|
||||
odbc32
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
install(TARGETS app DESTINATION .)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/resources/graphics/${CMAKE_PROJECT_NAME}.ico
|
||||
DESTINATION .
|
||||
@ -55,6 +55,8 @@ if(WIN32)
|
||||
)
|
||||
elseif(OS2)
|
||||
install(TARGETS app DESTINATION .)
|
||||
elseif(MINGW)
|
||||
install(TARGETS app DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS app
|
||||
|
Loading…
x
Reference in New Issue
Block a user