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

René J.V. Bertin rjvbertin at gmail.com
Wed Jun 15 21:34:24 UTC 2016


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

(Updated June 15, 2016, 11:34 p.m.)


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


Changes
-------

new version. This loops over all received .svgz files (if there's more than 1), returning from the loop and procedure after an input file converted successfully.


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 (updated)
-----

  modules/ECMAddAppIcon.cmake ca64314 

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-buildsystem/attachments/20160615/a5735b25/attachment.html>


More information about the Kde-buildsystem mailing list