From d72c511131534552fd4056636166831d08fb3236 Mon Sep 17 00:00:00 2001 From: dada513 Date: Wed, 9 Feb 2022 10:57:16 +0100 Subject: [PATCH 1/3] 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 +++-- ...polymc.polymc.desktop.in => org.polymc.PolyMC.desktop.in} | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) rename program_info/{org.polymc.polymc.desktop.in => org.polymc.PolyMC.desktop.in} (93%) 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 similarity index 93% rename from program_info/org.polymc.polymc.desktop.in rename to program_info/org.polymc.PolyMC.desktop.in index 8bbdc505..5d982b38 100644 --- a/program_info/org.polymc.polymc.desktop.in +++ b/program_info/org.polymc.PolyMC.desktop.in @@ -10,3 +10,4 @@ Icon=org.polymc.PolyMC PrefersNonDefaultGPU=true Categories=Game; Keywords=game;minecraft;launcher; +StartupWMClass=PolyMC From 619fcbfabf79fd63f410e53f1945590f8dc0fadf Mon Sep 17 00:00:00 2001 From: dada513 Date: Thu, 10 Feb 2022 08:56:34 +0100 Subject: [PATCH 2/3] 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(-) 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) From 22ca572ae0d292299a68030c671d919d52267d39 Mon Sep 17 00:00:00 2001 From: dada513 Date: Thu, 10 Feb 2022 09:32:12 +0100 Subject: [PATCH 3/3] ci: rebuild