Commit 16574577 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Find qdbus command correctly

Summary:
The wallpaper knsrc file file assumes that `qdbus` is in $PATH. However this is not
guaranteed; the command lives in the Qt binaries dir which is not typically in $PATH,
and distros typically create symlinks with different names in `/usr/bin`, but not all
create a second compatibility symlink at `/usr/bin/qdbus` that points to the version
for the current Qt version.

Therefore, we should find the command in the Qt binaries dir itself rather than relying
on these compatibility symlinks.

Test Plan: See that the knsrc file now has the absolute path to `qdbus` in it

Reviewers: davidedmundson, fvogt, #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25884
parent 34ca4921
......@@ -21,6 +21,7 @@ include(CheckIncludeFiles)
include(FeatureSummary)
include(ECMOptionalAddSubdirectory)
include(ECMQtDeclareLoggingCategory)
include(ECMQueryQmake)
include(KDEPackageAppTemplates)
include(KDEClangFormat)
......@@ -139,6 +140,9 @@ endif()
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
# locate qdbus in the Qt path because not every distro makes a symlink at /usr/bin/qdbus
query_qmake(QtBinariesDir QT_INSTALL_BINS)
add_subdirectory(doc)
add_subdirectory(libkworkspace)
add_subdirectory(libdbusmenuqt)
......
......@@ -36,7 +36,8 @@ install(TARGETS plasma_wallpaper_imageplugin DESTINATION ${KDE_INSTALL_QMLDIR}/o
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/wallpapers/image)
install(FILES wallpaper.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
configure_file(wallpaper.knsrc.cmake ${CMAKE_CURRENT_BINARY_DIR}/wallpaper.knsrc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wallpaper.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
plasma_install_package(imagepackage org.kde.image wallpapers wallpaper)
plasma_install_package(slideshowpackage org.kde.slideshow wallpapers wallpaper)
......
......@@ -46,4 +46,4 @@ Categories=KDE Wallpaper 800x600,KDE Wallpaper 1024x768,KDE Wallpaper 1280x1024,
StandardResource=wallpaper
Uncompress=archive
AdoptionCommand=qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'for (var i in desktops()) { d = desktops()[i]; d.wallpaperPlugin = "org.kde.image"; d.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]; d.writeConfig("Image", "%f") }'
AdoptionCommand=@QtBinariesDir@/qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'for (var i in desktops()) { d = desktops()[i]; d.wallpaperPlugin = "org.kde.image"; d.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]; d.writeConfig("Image", "%f") }'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment