From da70122d9c46c6281c06fe1dedc558c13077f64f Mon Sep 17 00:00:00 2001 From: swirl Date: Sun, 20 Feb 2022 19:23:08 -0500 Subject: remove notifications --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d4a27260..6365f4c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,14 +58,11 @@ set(Launcher_VERSION_HOTFIX 6) set(Launcher_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.") # Build platform. -set(Launcher_BUILD_PLATFORM "" CACHE STRING "A short string identifying the platform that this build was built for. Only used by the notification system and to display in the about dialog.") +set(Launcher_BUILD_PLATFORM "" CACHE STRING "A short string identifying the platform that this build was built for. Only used to display in the about dialog.") # Channel list URL set(Launcher_UPDATER_BASE "" CACHE STRING "Base URL for the updater.") -# Notification URL -set(Launcher_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications.") - # The metadata server set(Launcher_META_URL "https://meta.polymc.org/v1/" CACHE STRING "URL to fetch Launcher's meta files from.") -- cgit From 6545d250e8f3e10385cbf86f0d7f46feb7b2456c Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 6 Mar 2022 11:31:50 +0100 Subject: refactor: move help URL into buildconfig --- CMakeLists.txt | 1 + buildconfig/BuildConfig.cpp.in | 1 + buildconfig/BuildConfig.h | 5 +++++ launcher/ui/widgets/PageContainer.cpp | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c370b6ea..bf1b222b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y") ######## Set URLs ######## set(Launcher_NEWS_RSS_URL "https://polymc.github.io/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.") set(Launcher_NEWS_OPEN_URL "https://polymc.github.io/news/" CACHE STRING "URL that gets opened when the user clicks 'More News'") +set(Launcher_HELP_URL "https://polymc.org/wiki/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help") ######## Set version numbers ######## set(Launcher_VERSION_MAJOR 1) diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 0ffc9326..80c67037 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -50,6 +50,7 @@ Config::Config() VERSION_STR = "@Launcher_VERSION_STRING@"; NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@"; NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@"; + HELP_URL = "@Launcher_HELP_URL@"; IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@"; MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@"; META_URL = "@Launcher_META_URL@"; diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index 863f88df..95619587 100644 --- a/buildconfig/BuildConfig.h +++ b/buildconfig/BuildConfig.h @@ -73,6 +73,11 @@ public: */ QString NEWS_OPEN_URL; + /** + * URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help + */ + QString HELP_URL; + /** * Client ID you can get from Imgur when you register an application */ diff --git a/launcher/ui/widgets/PageContainer.cpp b/launcher/ui/widgets/PageContainer.cpp index 368bfe40..558a98fb 100644 --- a/launcher/ui/widgets/PageContainer.cpp +++ b/launcher/ui/widgets/PageContainer.cpp @@ -14,6 +14,7 @@ */ #include "PageContainer.h" +#include "BuildConfig.h" #include "PageContainer_p.h" #include @@ -207,7 +208,7 @@ void PageContainer::help() QString pageId = m_currentPage->helpPage(); if (pageId.isEmpty()) return; - DesktopServices::openUrl(QUrl("https://polymc.org/wiki/" + pageId)); + DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg(pageId))); } } -- cgit From b93daf1fb743f09d48595f554d93a49fe448d6b7 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 6 Mar 2022 11:32:06 +0100 Subject: fix: update news links to point to polymc.org --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bf1b222b..e2545ba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y") ##################################### Set Application options ##################################### ######## Set URLs ######## -set(Launcher_NEWS_RSS_URL "https://polymc.github.io/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.") -set(Launcher_NEWS_OPEN_URL "https://polymc.github.io/news/" CACHE STRING "URL that gets opened when the user clicks 'More News'") +set(Launcher_NEWS_RSS_URL "https://polymc.org/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.") +set(Launcher_NEWS_OPEN_URL "https://polymc.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'") set(Launcher_HELP_URL "https://polymc.org/wiki/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help") ######## Set version numbers ######## -- cgit From ae39d16c11d5c4bc5d10e3cc87d5e55367ef2f9b Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 6 Mar 2022 11:40:11 +0100 Subject: chore: bump to 1.1.0 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c370b6ea..d567af80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,8 @@ set(Launcher_NEWS_OPEN_URL "https://polymc.github.io/news/" CACHE STRING "URL th ######## Set version numbers ######## set(Launcher_VERSION_MAJOR 1) -set(Launcher_VERSION_MINOR 0) -set(Launcher_VERSION_HOTFIX 6) +set(Launcher_VERSION_MINOR 1) +set(Launcher_VERSION_HOTFIX 0) # Build number set(Launcher_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.") -- cgit From d814e21f0d68b560d94cd69edb0b673a1507aa63 Mon Sep 17 00:00:00 2001 From: dada513 Date: Tue, 8 Mar 2022 18:41:23 +0100 Subject: add matrix button --- CMakeLists.txt | 5 +++++ buildconfig/BuildConfig.cpp.in | 1 + buildconfig/BuildConfig.h | 1 + launcher/resources/multimc/multimc.qrc | 4 ++++ launcher/resources/multimc/scalable/matrix.svg | 7 +++++++ launcher/ui/MainWindow.cpp | 18 +++++++++++++++++- launcher/ui/MainWindow.h | 2 ++ 7 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 launcher/resources/multimc/scalable/matrix.svg (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e2545ba5..e633eb55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,9 +82,14 @@ set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STR # Translations Platform URL set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.") +# Matrix Space +set(Launcher_MATRIX_URL "https://matrix.to/#/#polymc:polymc.org" CACHE STRING "URL to the Matrix Space") + # Discord URL set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.") + + # Subreddit URL set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.") diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 80c67037..d1bd4d05 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -57,6 +57,7 @@ Config::Config() BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@"; TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@"; + MATRIX_URL = "@Launcher_MATRIX_URL@"; DISCORD_URL = "@Launcher_DISCORD_URL@"; SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@"; } diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index 95619587..cf74b39e 100644 --- a/buildconfig/BuildConfig.h +++ b/buildconfig/BuildConfig.h @@ -95,6 +95,7 @@ public: QString BUG_TRACKER_URL; QString TRANSLATIONS_URL; + QString MATRIX_URL; QString DISCORD_URL; QString SUBREDDIT_URL; diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc index ef29cf9b..d31885b9 100644 --- a/launcher/resources/multimc/multimc.qrc +++ b/launcher/resources/multimc/multimc.qrc @@ -246,9 +246,13 @@ scalable/screenshot-placeholder.svg + + scalable/matrix.svg + scalable/discord.svg + 32x32/instances/chicken.png 128x128/instances/chicken.png diff --git a/launcher/resources/multimc/scalable/matrix.svg b/launcher/resources/multimc/scalable/matrix.svg new file mode 100644 index 00000000..237c55a2 --- /dev/null +++ b/launcher/resources/multimc/scalable/matrix.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index ad7227cc..2cb3c7fd 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -235,6 +235,7 @@ public: TranslatedToolButton helpMenuButton; TranslatedAction actionReportBug; TranslatedAction actionDISCORD; + TranslatedAction actionMATRIX; TranslatedAction actionREDDIT; TranslatedAction actionAbout; @@ -343,13 +344,23 @@ public: all_actions.append(&actionReportBug); helpMenu->addAction(actionReportBug); } + + if(!BuildConfig.MATRIX_URL.isEmpty()) { + actionMATRIX = TranslatedAction(MainWindow); + actionMATRIX->setObjectName(QStringLiteral("actionMATRIX")); + actionMATRIX->setIcon(APPLICATION->getThemedIcon("matrix")); + actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix")); + actionMATRIX.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Matrix space")); + all_actions.append(&actionMATRIX); + helpMenu->addAction(actionMATRIX); + } if (!BuildConfig.DISCORD_URL.isEmpty()) { actionDISCORD = TranslatedAction(MainWindow); actionDISCORD->setObjectName(QStringLiteral("actionDISCORD")); actionDISCORD->setIcon(APPLICATION->getThemedIcon("discord")); actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord")); - actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 discord voice chat.")); + actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Discord guild.")); all_actions.append(&actionDISCORD); helpMenu->addAction(actionDISCORD); } @@ -1500,6 +1511,11 @@ void MainWindow::on_actionDISCORD_triggered() DesktopServices::openUrl(QUrl(BuildConfig.DISCORD_URL)); } +void MainWindow::on_actionMATRIX_triggered() +{ + DesktopServices::openUrl(QUrl(BuildConfig.MATRIX_URL)); +} + void MainWindow::on_actionChangeInstIcon_triggered() { if (!m_selectedInstance) diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index f6940ab0..bdbe81aa 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -73,6 +73,8 @@ private slots: void on_actionREDDIT_triggered(); + void on_actionMATRIX_triggered(); + void on_actionDISCORD_triggered(); void on_actionCopyInstance_triggered(); -- cgit From bb2b344d3300cfc2f13211cd12956e23c98459de Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 13 Mar 2022 11:44:30 +0100 Subject: fix: define jars path relative to application root Fixes #117 --- CMakeLists.txt | 3 ++- launcher/Application.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5250d0ff..6cabab7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,8 @@ elseif(UNIX) set(LAUNCHER_METAINFO_DEST_DIR "share/metainfo" CACHE STRING "Path to the metainfo directory") set(LAUNCHER_ICON_DEST_DIR "share/icons/hicolor/scalable/apps" CACHE STRING "Path to the scalable icon directory") - set(Launcher_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}") + # jars path is determined on runtime, relative to "Application root path", generally /usr for Launcher_PORTABLE=0 + set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_JARS_LOCATION=${JARS_DEST_DIR}") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_Desktop} DESTINATION ${LAUNCHER_DESKTOP_DEST_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_MetaInfo} DESTINATION ${LAUNCHER_METAINFO_DEST_DIR}) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 0ce80d4b..c699d840 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -515,8 +515,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) FS::updateTimestamp(m_rootPath); #endif -#ifdef MULTIMC_JARS_LOCATION - m_jarsPath = TOSTRING(MULTIMC_JARS_LOCATION); +#ifdef LAUNCHER_JARS_LOCATION + m_jarsPath = TOSTRING(LAUNCHER_JARS_LOCATION); #endif qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT; @@ -1494,7 +1494,7 @@ QString Application::getJarsPath() { return FS::PathCombine(QCoreApplication::applicationDirPath(), "jars"); } - return m_jarsPath; + return FS::PathCombine(m_rootPath, m_jarsPath); } QString Application::getMSAClientID() -- cgit From ec9d0e70fbd8bf6ecd72a8cf756e46706725320f Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Sun, 13 Mar 2022 17:57:25 +0100 Subject: [macos] update copyright and info string --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5250d0ff..5b1b97d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,13 +170,13 @@ if(UNIX AND APPLE) # Mac bundle settings set(MACOSX_BUNDLE_BUNDLE_NAME "${Launcher_Name}") - set(MACOSX_BUNDLE_INFO_STRING "${Launcher_Name}: Minecraft launcher and management utility.") + set(MACOSX_BUNDLE_INFO_STRING "${Launcher_Name}: A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.") set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.polymc.${Launcher_Name}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.${Launcher_VERSION_HOTFIX}.${Launcher_VERSION_BUILD}") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.${Launcher_VERSION_HOTFIX}.${Launcher_VERSION_BUILD}") set(MACOSX_BUNDLE_LONG_VERSION_STRING "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.${Launcher_VERSION_HOTFIX}.${Launcher_VERSION_BUILD}") set(MACOSX_BUNDLE_ICON_FILE ${Launcher_Name}.icns) - set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2015-2021 ${Launcher_Copyright}") + set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2021-2022 ${Launcher_Copyright}") # directories to look for dependencies set(DIRS ${QT_LIBS_DIR} ${QT_LIBEXECS_DIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -- cgit