Install KPackages with kpackage_install_package

Summary:
Removes a bunch of boilerplate CMake code and allows kpackage to do
some smart things, e.g. drops our runtime dependency on the
DesktopFileParser and we get to just use json directly.

Test Plan: Ran kwin, now it doesn't use the desktop to json translation path, everything still works.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22474
This commit is contained in:
Aleix Pol 2019-07-15 16:12:38 +02:00
parent 4637ff2ac3
commit 6cd9b2ba25
28 changed files with 19 additions and 159 deletions

View file

@ -131,21 +131,21 @@ kconfig_add_kcfg_files(kwin4_effect_builtins_sources
)
# scripted effects
add_subdirectory( dialogparent )
add_subdirectory( dimscreen )
add_subdirectory( eyeonscreen )
add_subdirectory( fade )
add_subdirectory( fadedesktop )
add_subdirectory( fadingpopups )
add_subdirectory( frozenapp )
add_subdirectory( login )
add_subdirectory( logout )
add_subdirectory( maximize )
add_subdirectory( morphingpopups )
add_subdirectory( scale )
add_subdirectory( squash )
add_subdirectory( translucency )
add_subdirectory( windowaperture )
kpackage_install_package(dialogparent/package kwin4_effect_dialogparent effects kwin)
kpackage_install_package(dimscreen/package kwin4_effect_dimscreen effects kwin)
kpackage_install_package(eyeonscreen/package kwin4_effect_eyeonscreen effects kwin)
kpackage_install_package(fade/package kwin4_effect_fade effects kwin)
kpackage_install_package(fadedesktop/package kwin4_effect_fadedesktop effects kwin)
kpackage_install_package(fadingpopups/package kwin4_effect_fadingpopups effects kwin)
kpackage_install_package(frozenapp/package kwin4_effect_frozenapp effects kwin)
kpackage_install_package(login/package kwin4_effect_login effects kwin)
kpackage_install_package(logout/package kwin4_effect_logout effects kwin)
kpackage_install_package(maximize/package kwin4_effect_maximize effects kwin)
kpackage_install_package(morphingpopups/package kwin4_effect_morphingpopups effects kwin)
kpackage_install_package(scale/package kwin4_effect_scale effects kwin)
kpackage_install_package(squash/package kwin4_effect_squash effects kwin)
kpackage_install_package(translucency/package kwin4_effect_translucency effects kwin)
kpackage_install_package(windowaperture/package kwin4_effect_windowaperture effects kwin)
###############################################################################
# Built-in effects go here

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_dialogparent)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_dialogparent)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_dialogparent.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_dialogparent)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,12 +0,0 @@
install(DIRECTORY contents
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_dimscreen)
install(FILES metadata.desktop
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_dimscreen)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_dimscreen.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_dimscreen)

View file

@ -1 +0,0 @@
add_subdirectory( package )

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_eyeonscreen)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_eyeonscreen)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_eyeonscreen.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_eyeonscreen)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,12 +0,0 @@
install(DIRECTORY contents
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_fadingpopups)
install(FILES metadata.desktop
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_fadingpopups)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_fadingpopups.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_fadingpopups)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_frozenapp)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_frozenapp)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_frozenapp.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_frozenapp)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_login)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_login)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_login.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_login)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_logout)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_logout)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_logout.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_logout)

View file

@ -1 +0,0 @@
add_subdirectory( package )

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_maximize)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_maximize)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_maximize.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_maximize)

View file

@ -1 +0,0 @@
add_subdirectory( package )

View file

@ -1,9 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_morphingpopups)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_morphingpopups)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_morphingpopups.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_morphingpopups)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,11 +0,0 @@
install(DIRECTORY contents
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_scale)
install(FILES metadata.desktop
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_scale)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_scale.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_scale)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,11 +0,0 @@
install(DIRECTORY contents
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_squash)
install(FILES metadata.desktop
DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_squash)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_squash.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_squash)

View file

@ -1 +0,0 @@
add_subdirectory(package)

View file

@ -1,8 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_translucency)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_translucency)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_translucency.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_translucency)

View file

@ -1 +0,0 @@
add_subdirectory( package )

View file

@ -1,9 +0,0 @@
install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_windowaperture)
install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_windowaperture)
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_windowaperture.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_windowaperture)

View file

@ -1,11 +1,4 @@
# packages
install( DIRECTORY videowall DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts )
install( DIRECTORY synchronizeskipswitcher DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts )
install( DIRECTORY desktopchangeosd DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts )
install( DIRECTORY minimizeall DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts )
# service files
install( FILES videowall/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-videowall.desktop )
install( FILES synchronizeskipswitcher/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-synchronizeskipswitcher.desktop )
install( FILES desktopchangeosd/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-desktopchangeosd.desktop )
install( FILES minimizeall/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-minimizeall.desktop )
kpackage_install_package(videowall videowall scripts kwin)
kpackage_install_package(synchronizeskipswitcher synchronizeskipswitcher scripts kwin)
kpackage_install_package(desktopchangeosd desktopchangeosd scripts kwin)
kpackage_install_package(minimizeall minimizeall scripts kwin)