[kdeconnect-kde/frameworks] kded: Fix dbus activation by using configure_file + install

Albert Vaca albertvaka at gmail.com
Tue Dec 9 22:16:54 UTC 2014


Let me ask two things regarding dbus activation:

- Why do we need dbus activation if we now have autostart?
- Why do we need dbus activation if it does not work[1] from
QDBusAbstactInterface, which we use everywhere?

[1] https://bugreports.qt-project.org/browse/QTBUG-42891

Albert

On Tue, Dec 9, 2014 at 1:35 PM, Àlex Fiestas <afiestas at kde.org> wrote:

> Git commit 408533f25ccaa1c55e1bbfdbc15abe3120736bd5 by Àlex Fiestas.
> Committed on 09/12/2014 at 21:27.
> Pushed by afiestas into branch 'frameworks'.
>
> Fix dbus activation by using configure_file + install
>
> Instead of using CMake build in macros, install and configure the
> service file the same way we do in many others KDE projects such ktp or
> bluedevil.
>
> This fixes the dbus activation in different ways:
> -Makes it possible to install in different prefixes (not only /usr/lib)
> -Replaces the binary with the correct path (taking into account prefix)
>
> M  +5    -2    kded/CMakeLists.txt
> M  +1    -1    kded/org.kde.kdeconnect.service.in
>
>
> http://commits.kde.org/kdeconnect-kde/408533f25ccaa1c55e1bbfdbc15abe3120736bd5
>
> diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt
> index 98304e4..46d25a9 100644
> --- a/kded/CMakeLists.txt
> +++ b/kded/CMakeLists.txt
> @@ -23,5 +23,8 @@ endif()
>
>  install(TARGETS kdeconnectd DESTINATION ${LIBEXEC_INSTALL_DIR})
>
> -include(DbusActivationMacros)
> -dbus_add_activation_service(org.kde.kdeconnect.service.in)
> \ No newline at end of file
> +configure_file(org.kde.kdeconnect.service.in
> +               ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service)
> +
> +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service
> +    DESTINATION ${DBUS_SERVICES_INSTALL_DIR})
> diff --git a/kded/org.kde.kdeconnect.service.in b/kded/
> org.kde.kdeconnect.service.in
> index 847bd1a..e5f5dfd 100644
> --- a/kded/org.kde.kdeconnect.service.in
> +++ b/kded/org.kde.kdeconnect.service.in
> @@ -1,3 +1,3 @@
>  [D-BUS Service]
>  Name=org.kde.kdeconnect
> -Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/kdeconnectd
> +Exec=${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kdeconnectd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20141209/b3dcf67a/attachment.html>


More information about the KDEConnect mailing list