Review Request 122135: Add ecm_add_app_icon function.

Alex Merry alex.merry at kde.org
Tue Jan 20 22:57:34 UTC 2015



> On Jan. 20, 2015, 8:13 p.m., Jeremy Whiting wrote:
> > Works on osx, very nice, thanks. Unfortunately I can't test it on windows currently, but I will try it there soon also, for some definition of soon.
> > 
> > Ralf can you test this on windows? Feel free to try kanagram's appicon branch if you want.
> 
> Ralf Habacker wrote:
>     Thanks for this offer, I will come back to this later. 
>     I already have a ready to go cross compile environment for umbrello (based on https://build.opensuse.org/package/show/home:rhabacker:branches:windows:mingw:win32:KF5/mingw32-umbrello5), with which I checked this :-)
>     
>     I used the linux variant of png2ico from S Benkmann on opensuse and got on configure time: 
>     
>     --- Found Png2Ico: /usr/bin/png2ico  
>     png2ico 2002-12-08  (c) Matthias S. Benkmann
>     USAGE: png2ico icofile [--colors <num>] pngfile1 [pngfile2 ...]
>     
>     
>     One issue I found is that the scripts does not work with relativ pathes: 
>     
>     I'm in <umbrello-source-root-dir>/umbrello/umbrello and have pics/global/hi*-apps-umbrello.png below that
>     
>     so I added 
>     
>     ecm_add_app_icon(umbrello_SRCS
>         ICONS
>         pics/global/hi16-apps-umbrello.png
>         pics/global/hi22-apps-umbrello.png
>         pics/global/hi32-apps-umbrello.png
>         pics/global/hi48-apps-umbrello.png
>         pics/global/hi64-apps-umbrello.png
>         pics/global/hi128-apps-umbrello.png
>     )
>     
>     and got 
>     
>     cd /home/ralf/src/kf5/umbrello-cross-build/umbrello && /usr/bin/png2ico /home/ralf/src/kf5/umbrello-cross-build/umbrello/umbrello_SRCS.ico pics/global/hi16-apps-umbrello.png     pics/global/hi32-apps-umbrello.png pics/global/hi48-apps-umbrello.png pics/global/hi64-apps-umbrello.png pics/global/hi128-apps-umbrello.png
>     
>     pics/global/hi16-apps-umbrello.png: No such file or directory
>     
>     Only absolute pathes works
>     
>     ecm_add_app_icon(umbrello_SRCS
>         ICONS
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi16-apps-umbrello.png
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi22-apps-umbrello.png
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi32-apps-umbrello.png
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi48-apps-umbrello.png
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi64-apps-umbrello.png
>         ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi128-apps-umbrello.png
>     )
>     
>     Otherwise cross compile umbrello running with wine shows application icon in the top left corner :-)

Awesome, thanks for checking this. I'll look at making it work with relative paths as well.


- Alex


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


On Jan. 20, 2015, 8:07 p.m., Alex Merry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122135/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2015, 8:07 p.m.)
> 
> 
> Review request for Extra Cmake Modules, Ralf Habacker and Jeremy Whiting.
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> This adds an application icon to an executable from PNG files for
> Windows and Mac OS X. Unlike the similar kde4_add_app_icon macro from
> kdelibs, this requires icons to be explicitly listed as arguments
> (meaning CMake can tell when ones are added or deleted and reconfigure
> as appropriate), and it works with Matthias Benkmann's png2ico tool, as
> well as the KDE-Win tool of the same name.
> 
> Currently missing unit tests. Also completely untested (except that
> `make test` runs on Linux, so there are no obvious syntax errors).
> 
> With thanks to Ralf Habacker for the initial work on porting
> kde4_add_app_icon.
> 
> CHANGELOG: Add ECMAddAppIcon module to add icons to executable targets
> on Windows and Mac OS X.
> 
> 
> Diffs
> -----
> 
>   docs/find-module/FindPng2Ico.rst PRE-CREATION 
>   docs/module/ECMAddAppIcon.rst PRE-CREATION 
>   find-modules/FindPng2Ico.cmake PRE-CREATION 
>   modules/ECMAddAppIcon.cmake PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/122135/diff/
> 
> 
> Testing
> -------
> 
> `make test` passes, which just provides a very basic check for syntax errors.
> 
> 
> Thanks,
> 
> Alex Merry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20150120/58f8bed8/attachment.html>


More information about the Kde-buildsystem mailing list