From e2db64157ec2ae4d830f2e12e19aa979249bbefc Mon Sep 17 00:00:00 2001 From: blue Date: Tue, 8 Oct 2019 12:01:14 +0300 Subject: [PATCH] packaged icons, .desktop --- CMakeLists.txt | 14 ++++++++++++++ core/CMakeLists.txt | 1 - packaging/Archlinux/PKGBUILD | 4 ++-- packaging/squawk.desktop | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 packaging/squawk.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index 12d8fd8..ab73444 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,14 @@ set(squawk_SRC signalcatcher.cpp ) +configure_file(resources/images/logo.svg squawk.svg COPYONLY) +execute_process(COMMAND convert -background none -size 48x48 squawk.svg squawk48.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +execute_process(COMMAND convert -background none -size 64x64 squawk.svg squawk64.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +execute_process(COMMAND convert -background none -size 128x128 squawk.svg squawk128.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +execute_process(COMMAND convert -background none -size 256x256 squawk.svg squawk256.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + +configure_file(packaging/squawk.desktop squawk.desktop COPYONLY) + set(TS_FILES translations/squawk.ru.ts ) @@ -49,3 +57,9 @@ add_dependencies(${CMAKE_PROJECT_NAME} translations) # Install the executable install(TARGETS squawk DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/Macaw/Squawk/l10n) +install(FILES squawk.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) +install(FILES squawk48.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps RENAME squawk.png) +install(FILES squawk64.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps RENAME squawk.png) +install(FILES squawk128.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps RENAME squawk.png) +install(FILES squawk256.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps RENAME squawk.png) +install(FILES squawk.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index efb966d..46bf97a 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.0) project(squawkCORE) -# Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets CONFIG REQUIRED) diff --git a/packaging/Archlinux/PKGBUILD b/packaging/Archlinux/PKGBUILD index 90e0a0c..316b8e9 100644 --- a/packaging/Archlinux/PKGBUILD +++ b/packaging/Archlinux/PKGBUILD @@ -1,5 +1,5 @@ # Maintainer: Yury Gubich -pkgname=squawk-git +pkgname=squawk pkgver=0.0.5 pkgrel=1 pkgdesc="An XMPP desktop messenger, written on qt" @@ -7,7 +7,7 @@ arch=('i686' 'x86_64') url="https://git.macaw.me/blue/squawk" license=('GPLv3') depends=('qt5-base' 'qt5-svg' 'lmdb' 'qxmpp>=1.0.0' 'libutil-linux') -makedepends=('cmake') +makedepends=('cmake>=3.3' 'imagemagick') source=("https://git.macaw.me/blue/squawk/archive/master.tar.gz") md5sums=('SKIP') build() { diff --git a/packaging/squawk.desktop b/packaging/squawk.desktop new file mode 100644 index 0000000..0395af1 --- /dev/null +++ b/packaging/squawk.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] + +Type=Application +Version=1.0 +Name=Squawk +GenericName=Instant Messenger +GenericName[ru]=Мгновенные сообщения +Comment=XMPP (Jabber) instant messenger client +Comment[ru]=XMPP (Jabber) клиент обмена мгновенными сообщениями +Exec=squawk %u +Icon=squawk +StartupNotify=true +StartupWMClass=Squawk +Terminal=false +Categories=Network;InstantMessaging;Qt; +MimeType=x-scheme-handler/xmpp;