answered
2016-06-09 10:38:21 +0300
The icons can be added to RPM as follows (I hope I got it right:)
Get informedabout design guidelines for app launcher icons for SalifishOS: https://sailfishos.org/wp-content/uploads/bsk-pdf-manager/48_SAILFISH-APPS-ICON-STORY.PDF
Get templatesfrom
https://sailfishos.org/wp-content/uploads/2015/01/Sailfish-Apps-icon-template.zip
Create your app launcher icon in a SVG drawing progam such as Inkscape. The icon must be square (i.e. equal height and width).
Export your icons in PNG format in pixel sizes 86x86, 108x108, 128x128 and 256x256. Name them as {myapp}.png (e.g. harbour-myapp.png) and put them to in your development host to the folders by sizes. Remove execute permission of the image file (chmod -x *.png) to save you from a validation round. For an imaginary harbour-myapp the icons folder structure would look be then:
harbour-myapp/icons/86x86/harbour-myapp.png
harbour-myapp/icons/108x108/harbour-myapp.png
harbour-myapp/icons/128x128/harbour-myapp.png
harbour-myapp/icons/256x256/harbour-myapp.png
Add the following lines the end of harbour-myapp/harbour-myapp.pro:
SAILFISHAPP_ICONS += 86x86 108x108 128x128 256x256
DISTFILES += icons/86x86/harbour-myapp.png \
icons/108x108/harbour-myapp.png \
icons/128x128/harbour-myapp.png \
icons/256x256/harbour-myapp.png
Add different sizes to the harbour-myapp.yaml file, in the end of All installed files section, so that it looks like
# All installed files
Files:
- '%{_bindir}'
- '%{_datadir}/%{name}'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
- '%{_datadir}/icons/hicolor/108x108/apps/%{name}.png'
- '%{_datadir}/icons/hicolor/128x128/apps/%{name}.png'
- '%{_datadir}/icons/hicolor/256x256/apps/%{name}.png'
Update harbour-myapp.spec file so that in files section:
%files
%defattr(-,root,root,-)
%{_bindir}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/86x86/apps/%{name}.png
%{_datadir}/icons/hicolor/108x108/apps/%{name}.png
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
References:
Someone Knowledgeable, please comment, if this makes sense. It's just my reverse engineering...
I would like more culture of "grandma guides" - which enable the "Grandma living in a cottage to do the job"?
(A.k.a. "Mummo-ohjeet, joiden avulla mökin mummokin osaa") ;-D https://www.urbaanisanakirja.com/word/mummo-ohje/