Don't install kdeconnectd in libexec

Few programs use libexec so it's not well known and there's no real
reason to "hide" our daemon binary in case somebody wants to run it
manually.
This commit is contained in:
Albert Vaca Cintora 2024-03-06 22:45:13 +01:00
parent 1785160049
commit e04c43882c
4 changed files with 3 additions and 11 deletions

View file

@ -19,16 +19,10 @@ ecm_mark_nongui_executable(kdeconnectd)
configure_file(org.kde.kdeconnect.daemon.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop) configure_file(org.kde.kdeconnect.daemon.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop)
# Conditionally configure the daemon service according to the target OS
if(WIN32)
set(SERV_EXEC kdeconnectd)
else()
set(SERV_EXEC ${KDE_INSTALL_FULL_LIBEXECDIR}/kdeconnectd)
endif()
configure_file(org.kde.kdeconnect.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service) configure_file(org.kde.kdeconnect.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
install(TARGETS kdeconnectd DESTINATION ${KDE_INSTALL_LIBEXECDIR}) install(TARGETS kdeconnectd DESTINATION)

View file

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kdeconnectd Exec=kdeconnectd
StartupNotify=false StartupNotify=false
X-KDE-autostart-phase=1 X-KDE-autostart-phase=1
X-GNOME-Autostart-enabled=true X-GNOME-Autostart-enabled=true

View file

@ -1,3 +1,3 @@
[D-BUS Service] [D-BUS Service]
Name=org.kde.kdeconnect Name=org.kde.kdeconnect
Exec=@SERV_EXEC@ Exec=kdeconnectd

View file

@ -138,8 +138,6 @@ int IndicatorHelper::daemonHook(QProcess &kdeconnectd)
// Start kdeconnectd, the daemon will not duplicate when there is already one // Start kdeconnectd, the daemon will not duplicate when there is already one
if (QString daemon = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); QFile::exists(daemon)) { if (QString daemon = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); QFile::exists(daemon)) {
kdeconnectd.setProgram(daemon); kdeconnectd.setProgram(daemon);
} else if (QString daemon = QLatin1String(qgetenv("craftRoot")) + QLatin1String("/../lib/libexec/kdeconnectd"); QFile::exists(daemon)) {
kdeconnectd.setProgram(daemon);
} else { } else {
QMessageBox::critical(nullptr, i18n("KDE Connect"), i18n("Cannot find kdeconnectd"), QMessageBox::Abort, QMessageBox::Abort); QMessageBox::critical(nullptr, i18n("KDE Connect"), i18n("Cannot find kdeconnectd"), QMessageBox::Abort, QMessageBox::Abort);
return -1; return -1;