From e04c43882c4f502bf6ca778a7e3e78b5ac8891ee Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Wed, 6 Mar 2024 22:45:13 +0100 Subject: [PATCH] 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. --- daemon/CMakeLists.txt | 8 +------- daemon/org.kde.kdeconnect.daemon.desktop.cmake | 2 +- daemon/org.kde.kdeconnect.service.in | 2 +- indicator/indicatorhelper_mac.cpp | 2 -- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 1cc74d163..172ef7eab 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -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) -# 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) 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.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) -install(TARGETS kdeconnectd DESTINATION ${KDE_INSTALL_LIBEXECDIR}) +install(TARGETS kdeconnectd DESTINATION) diff --git a/daemon/org.kde.kdeconnect.daemon.desktop.cmake b/daemon/org.kde.kdeconnect.daemon.desktop.cmake index ab2e03496..5b7123f54 100644 --- a/daemon/org.kde.kdeconnect.daemon.desktop.cmake +++ b/daemon/org.kde.kdeconnect.daemon.desktop.cmake @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kdeconnectd +Exec=kdeconnectd StartupNotify=false X-KDE-autostart-phase=1 X-GNOME-Autostart-enabled=true diff --git a/daemon/org.kde.kdeconnect.service.in b/daemon/org.kde.kdeconnect.service.in index 1008191d3..95d9a1594 100644 --- a/daemon/org.kde.kdeconnect.service.in +++ b/daemon/org.kde.kdeconnect.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.kde.kdeconnect -Exec=@SERV_EXEC@ +Exec=kdeconnectd diff --git a/indicator/indicatorhelper_mac.cpp b/indicator/indicatorhelper_mac.cpp index 61963110f..df817aa5a 100644 --- a/indicator/indicatorhelper_mac.cpp +++ b/indicator/indicatorhelper_mac.cpp @@ -138,8 +138,6 @@ int IndicatorHelper::daemonHook(QProcess &kdeconnectd) // Start kdeconnectd, the daemon will not duplicate when there is already one if (QString daemon = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); QFile::exists(daemon)) { kdeconnectd.setProgram(daemon); - } else if (QString daemon = QLatin1String(qgetenv("craftRoot")) + QLatin1String("/../lib/libexec/kdeconnectd"); QFile::exists(daemon)) { - kdeconnectd.setProgram(daemon); } else { QMessageBox::critical(nullptr, i18n("KDE Connect"), i18n("Cannot find kdeconnectd"), QMessageBox::Abort, QMessageBox::Abort); return -1;