From 0328a36893dc639f19c006eae0b946a59a22f070 Mon Sep 17 00:00:00 2001 From: Cyano Hao Date: Sun, 10 Mar 2024 08:04:41 +0800 Subject: [PATCH] fix wayland icon by matching desktop file with window class (#257) --- .gitattributes | 2 +- Red_Panda_CPP.pro | 4 ++-- packages/appimage/01-in-docker.sh | 2 +- packages/fedora/redpanda-cpp-git.spec.in | 2 +- packages/opensuse/redpanda-cpp-git.spec.in | 2 +- .../linux/{redpandaide.desktop.in => RedPandaIDE.desktop.in} | 0 platform/linux/install.sh | 2 +- xmake.lua | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) rename platform/linux/{redpandaide.desktop.in => RedPandaIDE.desktop.in} (100%) diff --git a/.gitattributes b/.gitattributes index a44d14b3..0fe1f6f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,7 +21,7 @@ /packages/debian/control eol=lf /packages/debian/copyright eol=lf /platform/linux/install.sh eol=lf -/platform/linux/redpandaide.desktop.in eol=lf +/platform/linux/RedPandaIDE.desktop.in eol=lf /platform/linux/redpandaide.svg eol=lf /platform/linux/templates/*/*.txt eol=lf /platform/linux/templates/*/*.template eol=lf diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 42994c54..96fb0ca0 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -43,7 +43,7 @@ unix:!macos: { LIBEXECDIR = $${PREFIX}/libexec } - QMAKE_SUBSTITUTES += platform/linux/redpandaide.desktop.in + QMAKE_SUBSTITUTES += platform/linux/RedPandaIDE.desktop.in resources.path = $${PREFIX}/share/$${APP_NAME} resources.files += platform/linux/templates @@ -60,7 +60,7 @@ unix:!macos: { INSTALLS += xdgicons desktop.path = $${PREFIX}/share/applications - desktop.files += platform/linux/redpandaide.desktop + desktop.files += platform/linux/RedPandaIDE.desktop INSTALLS += desktop mime.path = $${PREFIX}/share/mime/packages diff --git a/packages/appimage/01-in-docker.sh b/packages/appimage/01-in-docker.sh index 902d97d1..be230e52 100755 --- a/packages/appimage/01-in-docker.sh +++ b/packages/appimage/01-in-docker.sh @@ -29,7 +29,7 @@ rm /RedPandaIDE.AppDir/usr/libexec/RedPandaCPP/redpanda-git-askpass # setup AppImage resource cd /RedPandaIDE.AppDir -ln -s usr/share/applications/redpandaide.desktop redpandaide.desktop +ln -s usr/share/applications/RedPandaIDE.desktop RedPandaIDE.desktop ln -s usr/share/icons/hicolor/scalable/apps/redpandaide.svg redpandaide.svg # following files may come from Windows filesystem, use `install` to preseve file permission install -m755 "$SRC_DIR/packages/appimage/AppRun.sh" AppRun diff --git a/packages/fedora/redpanda-cpp-git.spec.in b/packages/fedora/redpanda-cpp-git.spec.in index c79d2597..b6421fb0 100644 --- a/packages/fedora/redpanda-cpp-git.spec.in +++ b/packages/fedora/redpanda-cpp-git.spec.in @@ -39,7 +39,7 @@ make INSTALL_ROOT="%{buildroot}" install /usr/libexec/RedPandaCPP/* /usr/share/RedPandaCPP/* /usr/share/doc/RedPandaCPP/* -/usr/share/applications/redpandaide.desktop +/usr/share/applications/RedPandaIDE.desktop /usr/share/icons/hicolor/scalable/apps/redpandaide.svg /usr/share/mime/packages/redpandaide.xml diff --git a/packages/opensuse/redpanda-cpp-git.spec.in b/packages/opensuse/redpanda-cpp-git.spec.in index 15d2ebf3..2c7f144f 100644 --- a/packages/opensuse/redpanda-cpp-git.spec.in +++ b/packages/opensuse/redpanda-cpp-git.spec.in @@ -39,7 +39,7 @@ make INSTALL_ROOT="%{buildroot}" install /usr/libexec/RedPandaCPP/* /usr/share/RedPandaCPP/* /usr/share/doc/RedPandaCPP/* -/usr/share/applications/redpandaide.desktop +/usr/share/applications/RedPandaIDE.desktop /usr/share/icons/hicolor/scalable/apps/redpandaide.svg /usr/share/mime/packages/redpandaide.xml diff --git a/platform/linux/redpandaide.desktop.in b/platform/linux/RedPandaIDE.desktop.in similarity index 100% rename from platform/linux/redpandaide.desktop.in rename to platform/linux/RedPandaIDE.desktop.in diff --git a/platform/linux/install.sh b/platform/linux/install.sh index 7324152d..d27ae4ec 100755 --- a/platform/linux/install.sh +++ b/platform/linux/install.sh @@ -1,6 +1,6 @@ #!/bin/sh echo Copying desktop files... -sudo cp -f /opt/RedPandaIDE/redpandaide.desktop /usr/share/applications +sudo cp -f /opt/RedPandaIDE/RedPandaIDE.desktop /usr/share/applications echo Done! diff --git a/xmake.lua b/xmake.lua index 7a7dab48..0192098d 100644 --- a/xmake.lua +++ b/xmake.lua @@ -230,13 +230,13 @@ target("resources") -- desktop entry if is_xdg() then - add_configfiles("platform/linux/redpandaide.desktop.in", { + add_configfiles("platform/linux/RedPandaIDE.desktop.in", { pattern = "$${(.-)}", variables = { PREFIX = get_config("prefix"), }, }) - add_installfiles("$(buildir)/redpandaide.desktop", {prefixdir = "$(prefix)/share/applications"}) + add_installfiles("$(buildir)/RedPandaIDE.desktop", {prefixdir = "$(prefix)/share/applications"}) end -- mime type