From 32f5a7e95fe98e7976c4ac3efac64a86ea965dce Mon Sep 17 00:00:00 2001 From: GITNE Date: Fri, 30 Sep 2022 23:59:59 +0000 Subject: [PATCH] Improve Freedesktop integration * Move scalable icon install from `${prefix}/share/pixmaps` (`pixmaps` has been deprecated long time ago) to `${prefix}/share/icons/hicolor/scalable/apps` * Add `Keywords`, `Categories`, and `MimeType` keys to `.desktop` file * Add shared MIME-info on [`application/x-compressed-iso`](https://en.wikipedia.org/wiki/.CSO "Compressed ISO") MIME type --- CMakeLists.txt | 10 ++++++++-- assets/mime/ppsspp.xml | 14 ++++++++++++++ ppsspp.desktop.in | 4 +++- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 assets/mime/ppsspp.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 52fb7e40c9..6cb38fb017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2513,6 +2513,8 @@ if(UNIX AND NOT ANDROID AND NOT APPLE) DIRECTORY "${CMAKE_BINARY_DIR}/assets" DESTINATION "${CMAKE_INSTALL_DATADIR}/ppsspp" PATTERN ".git*" EXCLUDE + PATTERN "mime" EXCLUDE + PATTERN "lang/README.md" EXCLUDE ) install( FILES "${CMAKE_BINARY_DIR}/ppsspp.desktop" @@ -2525,7 +2527,11 @@ if(UNIX AND NOT ANDROID AND NOT APPLE) ) install( FILES "${CMAKE_SOURCE_DIR}/icons/icon-512.svg" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps" - RENAME ppsspp.svg + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps" + RENAME "ppsspp.svg" + ) + install( + FILES "${CMAKE_SOURCE_DIR}/assets/mime/ppsspp.xml" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages" ) endif() diff --git a/assets/mime/ppsspp.xml b/assets/mime/ppsspp.xml new file mode 100644 index 0000000000..26b62e56e9 --- /dev/null +++ b/assets/mime/ppsspp.xml @@ -0,0 +1,14 @@ + + + + + + + + Compressed ISO Image + Komprimiertes ISO‑Abbild + Skomprymowany obraz ISO + CSO + + + diff --git a/ppsspp.desktop.in b/ppsspp.desktop.in index 05fd1e7348..fd8ffc35b8 100644 --- a/ppsspp.desktop.in +++ b/ppsspp.desktop.in @@ -4,4 +4,6 @@ Exec=@TargetBin@ Icon=ppsspp Type=Application Comment=ppsspp (fast and portable PSP emulator) -Categories=Game;Emulator +Keywords=Sony;PlayStation;Portable;PSP;handheld;console; +Categories=Game;Emulator; +MimeType=application/x-cd-image;application/x-iso9660-image;application/x-compressed-iso;application/zip;