From 95be205e781e15b8ec8a410ffbd31731e89f0f71 Mon Sep 17 00:00:00 2001 From: stefonarch Date: Sat, 15 Jul 2023 17:50:50 +0200 Subject: [PATCH] Follow freedesktop spec for .desktop file --- CMakeLists.txt | 8 ++++++-- ...tainfo.xml => org.lxqt_project.ScreenGrab.metainfo.xml | 0 2 files changed, 6 insertions(+), 2 deletions(-) rename screengrab.metainfo.xml => org.lxqt_project.ScreenGrab.metainfo.xml (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aae1bb..409bc4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,10 @@ qt5_translation_loader(SCREENGRAB_QM_LOADER ${PROJECT_NAME} ) +# Follow freedesktop specifications +set(ORIGINAL_FILENAME "${SCREENGRAB_DESKTOP_FILES}") +set(NEW_FILENAME "org.lxqt_project.ScreenGrab.desktop") + # generating executable add_executable(screengrab ${SCREENGRAB_SRC} @@ -216,9 +220,9 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/html" DESTINATION "${CMAKE_I # install config files install(FILES ${SCREENGRAB_CONFIG_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) # install desktop files -install(FILES ${SCREENGRAB_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) +install(FILES ${SCREENGRAB_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications RENAME ${NEW_FILENAME}) # install pixmap install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/img/screengrab.svg" DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps") -install(FILES screengrab.metainfo.xml +install(FILES org.lxqt_project.ScreenGrab.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo ) diff --git a/screengrab.metainfo.xml b/org.lxqt_project.ScreenGrab.metainfo.xml similarity index 100% rename from screengrab.metainfo.xml rename to org.lxqt_project.ScreenGrab.metainfo.xml