diff --git a/data/data.pro b/data/data.pro new file mode 100644 index 0000000..8f537a9 --- /dev/null +++ b/data/data.pro @@ -0,0 +1,30 @@ +TEMPLATE = aux +TARGET = harbour-communi + +SIZES = 86 108 128 172 + +for(size, SIZES) { + icon_src$${size}x$${size}.depends = $$PWD/artwork/$${TARGET}.svg + icon_src$${size}x$${size}.target = \ + $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png + icon_src$${size}x$${size}.commands = mkdir -p \ + $$top_builddir/data/icons/$${size}x$${size};cairosvg -f png \ + --output-height $$size \ + --output-width $$size \ + --output $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png \ + $$PWD/$${TARGET}.svg + icon_src$${size}x$${size}.files = \ + $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png + QMAKE_EXTRA_TARGETS += icon_src$${size}x$${size} + PRE_TARGETDEPS += \ + $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png +} + +for(size, SIZES) { + icon$${size}x$${size}.depends = \ + $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png + icon$${size}x$${size}.files = \ + $$top_builddir/data/icons/$${size}x$${size}/$${TARGET}.png + icon$${size}x$${size}.path = /usr/share/icons/hicolor/$${size}x$${size}/apps + INSTALLS += icon$${size}x$${size} +} diff --git a/harbour-communi.pro b/harbour-communi.pro index 7ba13a2..8670899 100644 --- a/harbour-communi.pro +++ b/harbour-communi.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -SUBDIRS += src +SUBDIRS += src data !no_submodules { !exists(src/shared/shared.pri)|!exists(src/backend/src/src.pro)): \ diff --git a/rpm/harbour-communi.spec b/rpm/harbour-communi.spec index b43206e..a7ce72d 100644 --- a/rpm/harbour-communi.spec +++ b/rpm/harbour-communi.spec @@ -22,6 +22,7 @@ BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(sailfishapp) >= 0.0.10 BuildRequires: qt5-qttools-linguist +BuildRequires: python3-cairosvg %description A simple and elegant IRC client for Sailfish OS, based on Qt and the Communi IRC framework. @@ -41,4 +42,4 @@ make INSTALL_ROOT=$RPM_BUILD_ROOT install %{_bindir}/%{name} %{_datadir}/%{name}/* %attr(644,root,root) %{_datadir}/applications/%{name}.desktop -%attr(644,root,root) %{_datadir}/icons/hicolor/86x86/apps/%{name}.png +%attr(644,root,root) %{_datadir}/icons/hicolor/*/apps/%{name}.png diff --git a/src/app/app.pro b/src/app/app.pro index b3cd9fb..9bc1df8 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = harbour-communi -CONFIG += c++11 sailfishapp +CONFIG += c++11 sailfishapp_nodata DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000 QT += dbus VERSION = 1.0-alpha diff --git a/src/app/harbour-communi.png b/src/app/harbour-communi.png deleted file mode 100644 index e8d3a5f..0000000 Binary files a/src/app/harbour-communi.png and /dev/null differ