OEM configurability creates binaries with OEM names which the .desktop
file doesn't take into account and thus dolphin integration does not
work if OEM changes the binary's name(s).
These changes are now integrated into the .desktop file at compile time.
set(OWNCLOUDDOLPHINACTIONPLUGIN ${APPLICATION_EXECUTABLE}dolphinactionplugin)
add_library(${OWNCLOUDDOLPHINACTIONPLUGIN} MODULE ownclouddolphinactionplugin.cpp)
target_link_libraries(${OWNCLOUDDOLPHINACTIONPLUGIN} KF5::CoreAddons KF5::KIOCore KF5::KIOWidgets ${OWNCLOUDDOLPHINHELPER})
+configure_file(ownclouddolphinactionplugin.desktop.in ownclouddolphinactionplugin.desktop ESCAPE_QUOTES @ONLY)
install(FILES ownclouddolphinactionplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME ${OWNCLOUDDOLPHINACTIONPLUGIN}.desktop)
install(TARGETS ${OWNCLOUDDOLPHINACTIONPLUGIN} DESTINATION ${KDE_INSTALL_PLUGINDIR})
+++ /dev/null
-[Desktop Entry]
-Type=Service
-Name=OwncloudAction
-ServiceTypes=KFileItemAction/Plugin
-MimeType=application/octet-stream;inode/directory;
-X-KDE-Library=ownclouddolphinactionplugin
--- /dev/null
+[Desktop Entry]
+Type=Service
+Name=@APPLICATION_NAME@Action
+ServiceTypes=KFileItemAction/Plugin
+MimeType=application/octet-stream;inode/directory;
+X-KDE-Library=@APPLICATION_EXECUTABLE@dolphinactionplugin