[xdg] rp-config.desktop.in: Added an XDG desktop file for rp-config.

This will add a "ROM Properties configurator" entry to the applications
menu on most Linux desktop environments.

TODO:
- Custom rom-properties icon instead of "media-flash".
- GTK+ rp-config implementation.

Fixes #295: [Feature Request] rp-config launcher
Reported by @Amnesia1000.
This commit is contained in:
David Korth 2022-05-21 13:42:41 -04:00
parent 4c2d8876be
commit b67b89607e
4 changed files with 33 additions and 1 deletions

View File

@ -14,7 +14,8 @@ PROJECT(rom-properties VERSION ${RP_VERSION})
IF(PROJECT_VERSION_TWEAK)
SET(PROJECT_VERSION_DEVEL_PLUS "+")
ENDIF(PROJECT_VERSION_TWEAK)
MESSAGE(STATUS "ROM Properties Page Shell Extension v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_DEVEL_PLUS}")
SET(RP_DISPLAY_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_DEVEL_PLUS}")
MESSAGE(STATUS "ROM Properties Page Shell Extension v${RP_DISPLAY_VERSION}")
# CMAKE_PROJECT_VERSION was introduced in 3.12.
IF(NOT CMAKE_PROJECT_VERSION OR NOT CMAKE_PROJECT_VERSION_MAJOR)

View File

@ -46,6 +46,7 @@ IF(UNIX AND NOT APPLE)
SET(DIR_INSTALL_DOC_ROOT "${DIR_INSTALL_DOC}")
SET(DIR_INSTALL_SHARE "share/rom-properties")
SET(DIR_INSTALL_CACHE "share/rom-properties/cache")
SET(DIR_INSTALL_XDG_DESKTOP "share/applications")
SET(DIR_INSTALL_EXE_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_EXE}")
SET(DIR_INSTALL_DLL_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_DLL}")
SET(DIR_INSTALL_LIB_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIB}")
@ -67,6 +68,7 @@ ELSEIF(APPLE)
SET(DIR_INSTALL_DOC_ROOT "${DIR_INSTALL_DOC}")
SET(DIR_INSTALL_SHARE "share/rom-properties")
SET(DIR_INSTALL_CACHE "share/rom-properties/cache")
UNSET(DIR_INSTALL_XDG_DESKTOP)
SET(DIR_INSTALL_EXE_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_EXE}")
SET(DIR_INSTALL_DLL_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_DLL}")
SET(DIR_INSTALL_LIB_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIB}")
@ -85,6 +87,7 @@ ELSEIF(WIN32)
SET(DIR_INSTALL_DOC_ROOT ".")
SET(DIR_INSTALL_SHARE ".") # NOTE: Not used on Windows.
SET(DIR_INSTALL_CACHE "cache") # NOTE: Not used on Windows.
UNSET(DIR_INSTALL_XDG_DESKTOP)
SET(DIR_INSTALL_EXE_DEBUG "debug")
# Installing debug symbols for DLLs in the
# same directory as the DLL.

View File

@ -8,6 +8,14 @@ INCLUDE(DirInstallPaths)
# XDG files are only installed on Linux systems.
IF(UNIX AND NOT APPLE)
# Desktop file
CONFIGURE_FILE(rp-config.desktop.in rp-config.desktop)
INSTALL(FILES rp-config.desktop
DESTINATION "${DIR_INSTALL_XDG_DESKTOP}"
COMPONENT "xdg"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
# Install the XDG MIME type package.
INSTALL(FILES rom-properties.xml
DESTINATION "${DIR_INSTALL_MIME}/packages"

20
xdg/rp-config.desktop.in Normal file
View File

@ -0,0 +1,20 @@
[Desktop Entry]
Version=@RP_DISPLAY_VERSION@
Icon=media-flash
Exec=rp-config
Terminal=false
Type=Application
Categories=System;Settings;QT;
Name=ROM Properties configurator
Name[de]=ROM Properties konfigurator
Name[en_GB]=ROM Properties configurator
Name[en_US]=ROM Properties configurator
Name[es]=Configurador de ROM Properties
Name[fr]=Configurateur de ROM Properties
Name[it]=Configuratore di ROM Properties
Name[ja]=ROM Properties
Name[pt]=Configurador de ROM Properties
Name[pt_BR]=Configurador de ROM Properties
Name[ru]=конфигуратор романтических свойств
GenericName=rp-config
Comment=ROM Properties configuration program