dbus service install on windows

Alexander Neundorf neundorf at kde.org
Tue Oct 25 18:18:10 UTC 2011


On Tuesday 25 October 2011, Ralf Habacker wrote:
> Am 24.10.2011 21:33, schrieb Alexander Neundorf:
> > On Tuesday 18 October 2011, Ralf Habacker wrote:
> >> Hi all,
> >> 
> >> with the recent kde-runtime (and other) buildsystems there are problems
> >> installing dbus service files, which need to be fixed.
> >> 
> >> In
> >> https://projects.kde.org/projects/kde/kde-runtime/repository/revisions/m
> >> ast er/entry/knotify/org.kde.knotify.service.cmake there is
> >> CMAKE_INSTALL_PREFIX/bin prefix used, which do not work in windows
> >> enviroment, where the build install root is not equal to the client
> >> install root.
> > 
> > So the problem is that CMAKE_INSTALL_PREFIX is not necessarily used at
> > install time ?
> 
> yes
> 
> >> On recent windows builds dbus services executables are installed in the
> >> same location as dbus-daemon and other executables, so a './' prefix
> >> should work.
> >> 
> >> Are there any objections to add an additional KDE_... DIR variable in
> >> KDE4Internal.cmake for this, something like
> >> 
> >> KDE4_DBUS_SERVICE_BIN_DIR         - the directory where dbus services
> >> are installed which could be used in the service files.
> >> 
> >> which has to be set to
> >> 
> >>       if (WIN32)
> >>       
> >>           set (KDE_DBUS_SERVICE_BIN_DIR .)
> >>       
> >>       else(WIN32)
> >>       
> >>           set (KDE_DBUS_SERVICE_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
> >>       
> >>       endif(WIN32)
> >> 
> >> and to use in service files like shown below:
> >> 
> >> *[D-BUS Service]
> >> Name=org.kde.knotify
> >> Exec=@*KDE4_DBUS_SERVICE_BIN_DIR@/*knotify4
> > 
> > Don't know.
> > So the problem is that under UNIX we need the full path there, while
> > under Windows we would need the full path at install time there, which
> > is unknown at package-generation time.
> 
> the best solution would be to use a relative path to avoid path
> relocations on install time.
> Install location for windows are currently all relative to install root.

Yes, I know, and I think we should try to do the same under Linux/UNIX with 
the KDE frameworks stuff.

> from kde4internal.cmake
> ...
> if (WIN32)
> # use relative install prefix to avoid hardcoded install paths in
> cmake_install.cmake files
> 
> > And under Windows org.kde.knotify.service.cmake is installed into the
> > bin/ directory ?
> 
> no, the executable referenced by this service is installed in the bin dir

So, the ./ is because the bin-dir is in the PATH ?
Or, in other words, if it's not an absolute path, then to which dir is it 
relative ?

Alex


More information about the Kde-buildsystem mailing list