diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-04 23:49:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 23:49:54 +0100 |
commit | 5e9b26dbef1c7cf917af17585c4282f58fc5eaef (patch) | |
tree | 4e0369c91ad7ae025df1024f56ba4df17d42cfe0 /launcher | |
parent | 8f045af8679e9ae1da120eb56e4cec452284ac56 (diff) | |
parent | 396a7994f9f485192b13f21a3dcf6710b50356ed (diff) | |
download | PrismLauncher-5e9b26dbef1c7cf917af17585c4282f58fc5eaef.tar.gz PrismLauncher-5e9b26dbef1c7cf917af17585c4282f58fc5eaef.tar.bz2 PrismLauncher-5e9b26dbef1c7cf917af17585c4282f58fc5eaef.zip |
Merge pull request #366 from TheLastRar/MSVC-Build
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/CMakeLists.txt | 140 | ||||
-rw-r--r-- | launcher/modplatform/ModAPI.h | 2 | ||||
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthPackManifest.cpp | 2 | ||||
-rw-r--r-- | launcher/net/HttpMetaCache.cpp | 2 |
4 files changed, 71 insertions, 75 deletions
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 0dae47df..fd1dd03b 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -539,9 +539,6 @@ set(ATLAUNCHER_SOURCES ################################ COMPILE ################################ -# we need zlib -find_package(ZLIB REQUIRED) - set(LOGIC_SOURCES ${CORE_SOURCES} ${PATHMATCHER_SOURCES} @@ -1062,96 +1059,95 @@ if(INSTALL_BUNDLE STREQUAL "full") COMPONENT Runtime ) # Bundle plugins - if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - # Image formats - install( - DIRECTORY "${QT_PLUGINS_DIR}/imageformats" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - REGEX "tga|tiff|mng" EXCLUDE - ) - # Icon engines - install( - DIRECTORY "${QT_PLUGINS_DIR}/iconengines" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - REGEX "fontawesome" EXCLUDE - ) - # Platform plugins + # Image formats + install( + DIRECTORY "${QT_PLUGINS_DIR}/imageformats" + CONFIGURATIONS Debug RelWithDebInfo + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "tga|tiff|mng" EXCLUDE + ) + install( + DIRECTORY "${QT_PLUGINS_DIR}/imageformats" + CONFIGURATIONS Release MinSizeRel + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "tga|tiff|mng" EXCLUDE + REGEX "d\\." EXCLUDE + REGEX "_debug\\." EXCLUDE + REGEX "\\.dSYM" EXCLUDE + ) + # Icon engines + install( + DIRECTORY "${QT_PLUGINS_DIR}/iconengines" + CONFIGURATIONS Debug RelWithDebInfo + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "fontawesome" EXCLUDE + ) + install( + DIRECTORY "${QT_PLUGINS_DIR}/iconengines" + CONFIGURATIONS Release MinSizeRel + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "fontawesome" EXCLUDE + REGEX "d\\." EXCLUDE + REGEX "_debug\\." EXCLUDE + REGEX "\\.dSYM" EXCLUDE + ) + # Platform plugins + install( + DIRECTORY "${QT_PLUGINS_DIR}/platforms" + CONFIGURATIONS Debug RelWithDebInfo + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "minimal|linuxfb|offscreen" EXCLUDE + ) + install( + DIRECTORY "${QT_PLUGINS_DIR}/platforms" + CONFIGURATIONS Release MinSizeRel + DESTINATION ${PLUGIN_DEST_DIR} + COMPONENT Runtime + REGEX "minimal|linuxfb|offscreen" EXCLUDE + REGEX "[^2]d\\." EXCLUDE + REGEX "_debug\\." EXCLUDE + REGEX "\\.dSYM" EXCLUDE + ) + # Style plugins + if(EXISTS "${QT_PLUGINS_DIR}/styles") install( - DIRECTORY "${QT_PLUGINS_DIR}/platforms" + DIRECTORY "${QT_PLUGINS_DIR}/styles" + CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime - REGEX "minimal|linuxfb|offscreen" EXCLUDE ) - # Style plugins - if(EXISTS "${QT_PLUGINS_DIR}/styles") - install( - DIRECTORY "${QT_PLUGINS_DIR}/styles" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - ) - endif() - # TLS plugins (Qt 6 only) - if(EXISTS "${QT_PLUGINS_DIR}/tls") - install( - DIRECTORY "${QT_PLUGINS_DIR}/tls" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - ) - endif() - else() - # Image formats install( - DIRECTORY "${QT_PLUGINS_DIR}/imageformats" + DIRECTORY "${QT_PLUGINS_DIR}/styles" + CONFIGURATIONS Release MinSizeRel DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime - REGEX "tga|tiff|mng" EXCLUDE REGEX "d\\." EXCLUDE REGEX "_debug\\." EXCLUDE REGEX "\\.dSYM" EXCLUDE ) - # Icon engines + endif() + # TLS plugins (Qt 6 only) + if(EXISTS "${QT_PLUGINS_DIR}/tls") install( - DIRECTORY "${QT_PLUGINS_DIR}/iconengines" + DIRECTORY "${QT_PLUGINS_DIR}/tls" + CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime - REGEX "fontawesome" EXCLUDE - REGEX "d\\." EXCLUDE - REGEX "_debug\\." EXCLUDE - REGEX "\\.dSYM" EXCLUDE ) - # Platform plugins install( - DIRECTORY "${QT_PLUGINS_DIR}/platforms" + DIRECTORY "${QT_PLUGINS_DIR}/tls" + CONFIGURATIONS Release MinSizeRel DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime - REGEX "minimal|linuxfb|offscreen" EXCLUDE - REGEX "d\\." EXCLUDE + REGEX "dd\\." EXCLUDE REGEX "_debug\\." EXCLUDE REGEX "\\.dSYM" EXCLUDE ) - # Style plugins - if(EXISTS "${QT_PLUGINS_DIR}/styles") - install( - DIRECTORY "${QT_PLUGINS_DIR}/styles" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - REGEX "d\\." EXCLUDE - REGEX "_debug\\." EXCLUDE - REGEX "\\.dSYM" EXCLUDE - ) - endif() - # TLS plugins (Qt 6 only) - if(EXISTS "${QT_PLUGINS_DIR}/tls") - install( - DIRECTORY "${QT_PLUGINS_DIR}/tls" - DESTINATION ${PLUGIN_DEST_DIR} - COMPONENT Runtime - REGEX "_debug\\." EXCLUDE - REGEX "\\.dSYM" EXCLUDE - ) - endif() endif() configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/install_prereqs.cmake.in" diff --git a/launcher/modplatform/ModAPI.h b/launcher/modplatform/ModAPI.h index c7408835..703de143 100644 --- a/launcher/modplatform/ModAPI.h +++ b/launcher/modplatform/ModAPI.h @@ -39,7 +39,7 @@ #include <QList> #include <list> -#include "Version.h" +#include "../Version.h" #include "net/NetJob.h" namespace ModPlatform { diff --git a/launcher/modplatform/modrinth/ModrinthPackManifest.cpp b/launcher/modplatform/modrinth/ModrinthPackManifest.cpp index a4620df9..96f54067 100644 --- a/launcher/modplatform/modrinth/ModrinthPackManifest.cpp +++ b/launcher/modplatform/modrinth/ModrinthPackManifest.cpp @@ -140,7 +140,7 @@ auto loadIndexedVersion(QJsonObject &obj) -> ModpackVersion for (auto file_iter : files) { File indexed_file; auto parent = Json::requireObject(file_iter); - auto is_primary = Json::ensureBoolean(parent, "primary", false); + auto is_primary = Json::ensureBoolean(parent, (const QString)QStringLiteral("primary"), false); if (!is_primary) { auto filename = Json::ensureString(parent, "filename"); // Checking suffix here is fine because it's the response from Modrinth, diff --git a/launcher/net/HttpMetaCache.cpp b/launcher/net/HttpMetaCache.cpp index 42198b71..e242dcf4 100644 --- a/launcher/net/HttpMetaCache.cpp +++ b/launcher/net/HttpMetaCache.cpp @@ -242,7 +242,7 @@ void HttpMetaCache::Load() foo->local_changed_timestamp = Json::ensureDouble(element_obj, "last_changed_timestamp"); foo->remote_changed_timestamp = Json::ensureString(element_obj, "remote_changed_timestamp"); - foo->makeEternal(Json::ensureBoolean(element_obj, "eternal", false)); + foo->makeEternal(Json::ensureBoolean(element_obj, (const QString)QStringLiteral("eternal"), false)); if (!foo->isEternal()) { foo->current_age = Json::ensureDouble(element_obj, "current_age"); foo->max_age = Json::ensureDouble(element_obj, "max_age"); |