Correct handling of application icons.

This commit is contained in:
Ghislain MARY 2018-03-27 11:17:45 +02:00
parent d97e10794a
commit 9b46bc5c20
9 changed files with 20 additions and 3 deletions

View file

@ -429,6 +429,9 @@ install(FILES "${ASSETS_DIR}/images/linphone_logo.svg"
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/"
RENAME "linphone.svg"
)
install(DIRECTORY "${ASSETS_DIR}/icons/hicolor"
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons"
)
# ------------------------------------------------------------------------------
# Install rc files.

8
assets/icons/genicons.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/bash
for i in 16 22 24 32 64 128
do
mkdir -p hicolor/${i}x${i}/apps
inkscape -z -e hicolor/${i}x${i}/apps/linphone.png -w $i -h $i ../images/linphone_logo.svg
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -59,12 +59,18 @@ rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
xdg-icon-resource install --novendor --mode system --theme hicolor --context apps --size scalable %{_datarootdir}/icons/hicolor/scalable/apps/linphone.svg linphone;
for i in 16 22 24 32 64 128
do
xdg-icon-resource install --novendor --mode system --theme hicolor --context apps --size $i %{_datarootdir}/icons/hicolor/${i}x${i}/apps/linphone.png linphone
done
xdg-desktop-menu install --novendor --mode system %{_datarootdir}/applications/linphone.desktop
%postun
xdg-desktop-menu uninstall --mode system --theme hicolor --context apps --size scalable linphone.desktop
xdg-icon-resource uninstall --mode system linphone
xdg-desktop-menu uninstall --mode system linphone.desktop
for i in 16 22 24 32 64 128
do
xdg-icon-resource uninstall --mode system --theme hicolor --context apps --size $i linphone
done
/sbin/ldconfig
%files