refactor: install icons using CMake

This commit is contained in:
Mikhail Zolotukhin 2021-11-01 20:06:34 +03:00
parent 1c410cf1c7
commit 7e4cd1bbf5
5 changed files with 16 additions and 29 deletions

View File

@ -16,3 +16,7 @@ echo "📦 Installing the KCM..."
KCM_BUILDDIR="build/kcm"
sudo cmake --install "$KCM_BUILDDIR"
echo "🎉 Installation finished."
echo "💡 You can configure Bismuth in the System Settings > Window Management > Window Tiling."
echo "🦾 Enjoy your tiling!"

View File

@ -15,6 +15,8 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
find_package(
Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Quick
@ -56,3 +58,5 @@ install(TARGETS kcm_bismuth DESTINATION ${KDE_INSTALL_PLUGINDIR}/kcms)
install(FILES package/metadata.desktop RENAME kcm_bismuth.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
kpackage_install_package(package kcm_bismuth kcms)
add_subdirectory(icons)

View File

@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2021 Mikhail Zolotukhin <mail@genda.life>
# SPDX-License-Identifier: MIT
ecm_install_icons(
ICONS
sc-apps-bismuth.svg
DESTINATION ${KDE_INSTALL_ICONDIR}
)

View File

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 754 B

View File

@ -1,29 +0,0 @@
#!/usr/bin/env sh
# SPDX-FileCopyrightText: 2021 Mikhail Zolotukhin <mail@genda.life>
#
# SPDX-License-Identifier: MIT
# Installation script, that comes inside of the tar.gz package
set -e
# Install icons
echo "🖼️ Installing icons..."
APP_ICONS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor/scalable/apps"
mkdir -p "$APP_ICONS_DIR"
cp icons/bismuth.svg "$APP_ICONS_DIR/bismuth.svg"
# Upgrade/install script
echo "📦 Installing the script..."
KWINPKG_FILE="bismuth.kwinscript"
plasmapkg2 -u "$KWINPKG_FILE" > /dev/null || plasmapkg2 -i "$KWINPKG_FILE" > /dev/null
# Enable user configuration dialog
echo "🔧 Enabling user configuration..."
mkdir -p ~/.local/share/kservices5/
ln -sf ~/.local/share/kwin/scripts/bismuth/metadata.desktop ~/.local/share/kservices5/bismuth.desktop
echo "🎉 Installation finished."
echo "💡 You can enable and configure Bismuth in the System Settings > Window Management > KWin Scripts."
echo "🦾 Enjoy your tiling!"