From 5284d604ef1c56df6cbc9f70d109a35bb459fae2 Mon Sep 17 00:00:00 2001
From: Lenny McLennington <lennymclennington@protonmail.com>
Date: Wed, 9 Feb 2022 00:02:51 +0000
Subject: translations

---
 buildconfig/BuildConfig.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'buildconfig')

diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index d09d5288..c260b988 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -91,7 +91,7 @@ public:
     QString AUTH_BASE = "https://authserver.mojang.com/";
     QString IMGUR_BASE_URL = "https://api.imgur.com/3/";
     QString FMLLIBS_BASE_URL = "https://files.multimc.org/fmllibs/";
-    QString TRANSLATIONS_BASE_URL = "https://files.multimc.org/translations/";
+    QString TRANSLATIONS_BASE_URL = "https://meta.polymc.org/translations/";
 
     QString MODPACKSCH_API_BASE_URL = "https://api.modpacks.ch/";
 
-- 
cgit 


From d72c511131534552fd4056636166831d08fb3236 Mon Sep 17 00:00:00 2001
From: dada513 <dada513@protonmail.com>
Date: Wed, 9 Feb 2022 10:57:16 +0100
Subject: Revert "Fix freedesktop icons" and fix icon on kwin

---
 buildconfig/BuildConfig.cpp.in            |  1 +
 buildconfig/BuildConfig.h                 |  1 +
 launcher/Application.cpp                  |  4 +++-
 program_info/CMakeLists.txt               |  5 +++--
 program_info/org.polymc.PolyMC.desktop.in | 13 +++++++++++++
 program_info/org.polymc.polymc.desktop.in | 12 ------------
 6 files changed, 21 insertions(+), 15 deletions(-)
 create mode 100644 program_info/org.polymc.PolyMC.desktop.in
 delete mode 100644 program_info/org.polymc.polymc.desktop.in

(limited to 'buildconfig')

diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 2595f78b..e7724c80 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -12,6 +12,7 @@ Config::Config()
     LAUNCHER_DOMAIN = "@Launcher_Domain@";
     LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
     LAUNCHER_GIT = "@Launcher_Git@";
+    LAUNCHER_DESKTOPNAME = "@Launcher_DesktopName@";
 
     USER_AGENT = "@Launcher_UserAgent@";
     USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index d09d5288..e415cabb 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -14,6 +14,7 @@ public:
     QString LAUNCHER_DOMAIN;
     QString LAUNCHER_CONFIGFILE;
     QString LAUNCHER_GIT;
+    QString LAUNCHER_DESKTOPNAME;
 
     /// The major version number.
     int VERSION_MAJOR;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 7050e5dc..81a27495 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -187,7 +187,9 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
     setApplicationName(BuildConfig.LAUNCHER_NAME);
     setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME);
     setApplicationVersion(BuildConfig.printableVersionString());
-
+    #if (QT_VERSION >= QT_VERSION_CHECK(5,7,0))
+        setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPNAME);
+    #endif
     startTime = QDateTime::currentDateTime();
 
 #ifdef Q_OS_LINUX
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 0466b893..1d2d19e9 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -7,13 +7,14 @@ set(Launcher_DisplayName "${Launcher_CommonName}" PARENT_SCOPE)
 set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_RELEASE_VERSION_NAME}" PARENT_SCOPE)
 set(Launcher_ConfigFile "polymc.cfg" PARENT_SCOPE)
 set(Launcher_Git "https://github.com/PolyMC/PolyMC" PARENT_SCOPE)
+set(Launcher_DesktopName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
 
-set(Launcher_Desktop "program_info/org.polymc.polymc.desktop" PARENT_SCOPE)
+set(Launcher_Desktop "program_info/org.polymc.PolyMC.desktop" PARENT_SCOPE)
 set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE)
 set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" PARENT_SCOPE)
 set(Launcher_Branding_ICNS "program_info/polymc.icns" PARENT_SCOPE)
 set(Launcher_Branding_WindowsRC "program_info/polymc.rc" PARENT_SCOPE)
 set(Launcher_Branding_LogoQRC "program_info/polymc.qrc" PARENT_SCOPE)
 
-configure_file(org.polymc.polymc.desktop.in org.polymc.polymc.desktop)
+configure_file(org.polymc.PolyMC.desktop.in org.polymc.PolyMC.desktop)
 configure_file(org.polymc.PolyMC.metainfo.xml.in org.polymc.PolyMC.metainfo.xml)
diff --git a/program_info/org.polymc.PolyMC.desktop.in b/program_info/org.polymc.PolyMC.desktop.in
new file mode 100644
index 00000000..5d982b38
--- /dev/null
+++ b/program_info/org.polymc.PolyMC.desktop.in
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Name=PolyMC
+Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
+Type=Application
+Terminal=false
+Exec=@Launcher_APP_BINARY_NAME@
+StartupNotify=true
+Icon=org.polymc.PolyMC
+PrefersNonDefaultGPU=true
+Categories=Game;
+Keywords=game;minecraft;launcher;
+StartupWMClass=PolyMC
diff --git a/program_info/org.polymc.polymc.desktop.in b/program_info/org.polymc.polymc.desktop.in
deleted file mode 100644
index 8bbdc505..00000000
--- a/program_info/org.polymc.polymc.desktop.in
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=PolyMC
-Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
-Type=Application
-Terminal=false
-Exec=@Launcher_APP_BINARY_NAME@
-StartupNotify=true
-Icon=org.polymc.PolyMC
-PrefersNonDefaultGPU=true
-Categories=Game;
-Keywords=game;minecraft;launcher;
-- 
cgit 


From 619fcbfabf79fd63f410e53f1945590f8dc0fadf Mon Sep 17 00:00:00 2001
From: dada513 <dada513@protonmail.com>
Date: Thu, 10 Feb 2022 08:56:34 +0100
Subject: rename LAUNCHER_DESKTOPNAME to LAUNCHER_DESKTOPFILENAME

---
 buildconfig/BuildConfig.cpp.in | 2 +-
 buildconfig/BuildConfig.h      | 2 +-
 launcher/Application.cpp       | 2 +-
 program_info/CMakeLists.txt    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'buildconfig')

diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index e7724c80..9faa40f3 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -12,7 +12,7 @@ Config::Config()
     LAUNCHER_DOMAIN = "@Launcher_Domain@";
     LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
     LAUNCHER_GIT = "@Launcher_Git@";
-    LAUNCHER_DESKTOPNAME = "@Launcher_DesktopName@";
+    LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@";
 
     USER_AGENT = "@Launcher_UserAgent@";
     USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index c00d4df7..6bb533ed 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -14,7 +14,7 @@ public:
     QString LAUNCHER_DOMAIN;
     QString LAUNCHER_CONFIGFILE;
     QString LAUNCHER_GIT;
-    QString LAUNCHER_DESKTOPNAME;
+    QString LAUNCHER_DESKTOPFILENAME;
 
     /// The major version number.
     int VERSION_MAJOR;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 81a27495..3a888739 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -188,7 +188,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
     setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME);
     setApplicationVersion(BuildConfig.printableVersionString());
     #if (QT_VERSION >= QT_VERSION_CHECK(5,7,0))
-        setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPNAME);
+        setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
     #endif
     startTime = QDateTime::currentDateTime();
 
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 1d2d19e9..f9d7621d 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -7,7 +7,7 @@ set(Launcher_DisplayName "${Launcher_CommonName}" PARENT_SCOPE)
 set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_RELEASE_VERSION_NAME}" PARENT_SCOPE)
 set(Launcher_ConfigFile "polymc.cfg" PARENT_SCOPE)
 set(Launcher_Git "https://github.com/PolyMC/PolyMC" PARENT_SCOPE)
-set(Launcher_DesktopName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
+set(Launcher_DesktopFileName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
 
 set(Launcher_Desktop "program_info/org.polymc.PolyMC.desktop" PARENT_SCOPE)
 set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE)
-- 
cgit 


From 70f8cb81b8bbdf8bc2f4931981002ab56125361d Mon Sep 17 00:00:00 2001
From: dada513 <dada513@protonmail.com>
Date: Thu, 10 Feb 2022 13:14:25 +0100
Subject: Initial RSS re-add and removed hardcoded strings

---
 CMakeLists.txt                 | 5 +++--
 buildconfig/BuildConfig.cpp.in | 1 +
 buildconfig/BuildConfig.h      | 5 +++++
 launcher/ui/MainWindow.cpp     | 4 ++--
 4 files changed, 11 insertions(+), 4 deletions(-)

(limited to 'buildconfig')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 593d608e..aca8b898 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,12 +46,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
 ##################################### Set Application options #####################################
 
 ######## Set URLs ########
-set(Launcher_NEWS_RSS_URL "https://multimc.org/rss.xml" CACHE STRING "URL to fetch Launcher's news RSS feed from.")
+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 version numbers ########
 set(Launcher_VERSION_MAJOR    1)
 set(Launcher_VERSION_MINOR    0)
-set(Launcher_VERSION_HOTFIX   5)
+set(Launcher_VERSION_HOTFIX   6)
 
 # Build number
 set(Launcher_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.")
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 2595f78b..655d3bfb 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -42,6 +42,7 @@ Config::Config()
 
     VERSION_STR = "@Launcher_VERSION_STRING@";
     NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
+    NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_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 d09d5288..6e524736 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -67,6 +67,11 @@ public:
      */
     QString NEWS_RSS_URL;
 
+    /**
+     * URL that gets opened when the user clicks "More News"
+     */
+    QString NEWS_OPEN_URL;
+
     /**
      * Client ID you can get from Imgur when you register an application
      */
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 3dcc8ee9..32b27afb 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -1687,7 +1687,7 @@ void MainWindow::on_actionReportBug_triggered()
 
 void MainWindow::on_actionMoreNews_triggered()
 {
-    DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
+    DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL));
 }
 
 void MainWindow::newsButtonClicked()
@@ -1699,7 +1699,7 @@ void MainWindow::newsButtonClicked()
     }
     else
     {
-        DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
+        DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL));
     }
 }
 
-- 
cgit 


From 8d2e7db178b764838014a457bec81e946e0f937d Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Thu, 10 Feb 2022 14:55:52 +0100
Subject: fix: update link to translations platform

---
 CMakeLists.txt                                  | 3 +++
 buildconfig/BuildConfig.cpp.in                  | 1 +
 buildconfig/BuildConfig.h                       | 1 +
 launcher/ui/widgets/LanguageSelectionWidget.cpp | 3 ++-
 4 files changed, 7 insertions(+), 1 deletion(-)

(limited to 'buildconfig')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 738a1a5a..c372660d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,9 @@ set(Launcher_MSA_CLIENT_ID "17b47edd-c884-4997-926d-9e7f9a6b4647" CACHE STRING "
 # Bug tracker URL
 set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STRING "URL for the bug tracker.")
 
+# Translations Platform URL
+set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.")
+
 # Discord URL
 set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.")
 
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 2595f78b..c71a4c7b 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -47,6 +47,7 @@ Config::Config()
     META_URL = "@Launcher_META_URL@";
 
     BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
+    TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@";
     DISCORD_URL = "@Launcher_DISCORD_URL@";
     SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
 }
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index c260b988..a85da74e 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -83,6 +83,7 @@ public:
     QString META_URL;
 
     QString BUG_TRACKER_URL;
+    QString TRANSLATIONS_URL;
     QString DISCORD_URL;
     QString SUBREDDIT_URL;
 
diff --git a/launcher/ui/widgets/LanguageSelectionWidget.cpp b/launcher/ui/widgets/LanguageSelectionWidget.cpp
index 964d2b7c..256b09da 100644
--- a/launcher/ui/widgets/LanguageSelectionWidget.cpp
+++ b/launcher/ui/widgets/LanguageSelectionWidget.cpp
@@ -5,6 +5,7 @@
 #include <QHeaderView>
 #include <QLabel>
 #include "Application.h"
+#include "BuildConfig.h"
 #include "translations/TranslationsModel.h"
 #include "settings/Setting.h"
 
@@ -52,7 +53,7 @@ QString LanguageSelectionWidget::getSelectedLanguageKey() const
 void LanguageSelectionWidget::retranslate()
 {
     QString text = tr("Don't see your language or the quality is poor?<br/><a href=\"%1\">Help us with translations!</a>")
-        .arg("https://github.com/MultiMC/Launcher/wiki/Translating-MultiMC");
+        .arg(BuildConfig.TRANSLATIONS_URL);
     helpUsLabel->setText(text);
 
 }
-- 
cgit 


From 3b7cc4391a8788f5b940a66a92e1ab2b7ae80d6d Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Sat, 12 Feb 2022 18:17:56 +0100
Subject: fix: don't use custom for version channel

Closes #159
---
 buildconfig/BuildConfig.cpp.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'buildconfig')

diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 5d5167ec..074ce8de 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -30,15 +30,17 @@ Config::Config()
 
     GIT_COMMIT = "@Launcher_GIT_COMMIT@";
     GIT_REFSPEC = "@Launcher_GIT_REFSPEC@";
-    if(GIT_REFSPEC.startsWith("refs/heads/") && !UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty() && VERSION_BUILD >= 0)
+    if(GIT_REFSPEC.startsWith("refs/heads/"))
     {
         VERSION_CHANNEL = GIT_REFSPEC;
         VERSION_CHANNEL.remove("refs/heads/");
-        UPDATER_ENABLED = true;
+        if(!UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty() && VERSION_BUILD >= 0) {
+            UPDATER_ENABLED = true;
+        }
     }
     else
     {
-        VERSION_CHANNEL = QObject::tr("custom");
+        VERSION_CHANNEL = QObject::tr("unknown");
     }
 
     VERSION_STR = "@Launcher_VERSION_STRING@";
-- 
cgit 


From 9ddbaaf7e8b844200b5d33c7b4702beaf201c55f Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Sat, 12 Feb 2022 19:04:22 +0100
Subject: feat: use commit hash for channel if ref not available

---
 buildconfig/BuildConfig.cpp.in | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'buildconfig')

diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 074ce8de..0ffc9326 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -38,6 +38,10 @@ Config::Config()
             UPDATER_ENABLED = true;
         }
     }
+    else if (!GIT_COMMIT.isEmpty())
+    {
+        VERSION_CHANNEL = GIT_COMMIT.mid(0, 8);
+    }
     else
     {
         VERSION_CHANNEL = QObject::tr("unknown");
-- 
cgit