Review Request 128162: ecm_add_app_icon : accept SVG icons on OS X when KIconThemes is installed

René J.V. Bertin rjvbertin at gmail.com
Mon Jan 9 17:07:46 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128162/
-----------------------------------------------------------

(Updated Jan. 9, 2017, 5:07 p.m.)


Status
------

This change has been marked as submitted.


Review request for Extra Cmake Modules and KDE Software on Mac OS X.


Changes
-------

Submitted with commit f63f400787ac42f64fafe006ef19579238067f40 by R.J.V. Bertin to branch master.


Repository: extra-cmake-modules


Description
-------

KIconThemes installs a nice little utility on OS X which generates a very complete `.icns` icon file from SVG and compressed SVG.
I've made a quick modification to `ecm_add_app_icon` so that it will use that utility on OS X, when `ksvg2icns` is found in the path and when the icon extension is `.svg` or `.svgz` (or else it will go about its business as usual). 
If `ksvg2icns` fails an `AUTHOR_WARNING` is posted, otherwise the icon is registered and the function returns to its caller.

I haven't taken any steps to ensure that only a single SVG image is passed in; I presume that the current implementation will lead to ksvg2icns failure when multiple files are specified.

The advantage of using SVG images is that any image will do. This is particularly useful for projects that do not provide their own icon files. In most cases that means that one has to work with icons that are not named appropriately, and that require creating temporary copies or symlinks in the build directory with names that are acceptable to `ecm_add_app_icon`.


Diffs
-----

  modules/ECMAddAppIcon.cmake 0692680 

Diff: https://git.reviewboard.kde.org/r/128162/diff/


Testing
-------

On OS X 10.9 with my MacPorts install (KF5 5.22.0 and Qt 5.6.0 in /opt/local), using kdesvn as a test-app.


File Attachments
----------------

screenshot of the Finder's Get Info window for kdesvn5; icon created from `sc-apps-kdesvn.svgz`
  https://git.reviewboard.kde.org/media/uploaded/files/2016/06/12/40eeb46f-814e-463f-ab9b-28fe938a6261__Screen_Shot_2016-06-12_at_20.07.51.png


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20170109/634ff4cb/attachment.html>


More information about the kde-mac mailing list