-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I put our icon PNGs into the repository alongside the windows ICO file.

https://git.openclonk.org/openclonk.git/commit/a51d429611dccca0284f5cb9154830905e0c23e2

Attached is a patch to CMakeLists.txt that should install the icons on
linux. Unfortunately I have no way to test this since I am running
Windows. Perhaps you could confirm that this patch works? Then I would
push it before the release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS4jdnAAoJEEVHDSZD+2JyUoIH/2ndOJAe8jp59Z1+51EXoSyZ
kq6Snqw+cDYdp0xV4Nm65HThdvJugRdxXcKy4OElziL2WeeT7IyOyQhXYkynliYA
TP6QEGTU3x4vEdQ0uKwZX3gnPQY/UOGScc0gGlKsGXqFizqan38XNt7tHNyzs0P8
eDH4unxwpv7cttroMNVwVCQ0/NxE59D/Iv6n7dFgo75Cd9Ox+URzBUCuhbPunFrx
SV4leqtkegdV3m2s/TtWnGqOuU1zkacW02DH0EM2AVKSz3du7ryBYGdZUKwogjgH
nA3oTMv3iUbt1r6WP2QmcrsSaK8sWfNMjj6CGzDUJsUZyClDBqA5HqqXq04GQjs=
=eVfJ
-----END PGP SIGNATURE-----
 CMakeLists.txt | 50 +++++++++++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 19 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a32ff93..53d4b6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1418,10 +1418,6 @@ endif()
 ############################################################################
 # installation
 ############################################################################
-# Install the icon into share/icons/hicolor/48x48/apps/openclonk.png. Do this 
by
-# extracting the correct size from oc.ico. Currently this is layer 2 - let's
-# hope that it stays this way.
-
 # Don't allow installation for WITH_AUTOMATIC_UPDATE because otherwise
 # the installed binary wouldn't find its game data in the system data path.
 IF(WITH_AUTOMATIC_UPDATE)
@@ -1438,21 +1434,37 @@ install(
        )"
 )
 
-FIND_PACKAGE(ImageMagick COMPONENTS convert)
-if(ImageMagick_convert_FOUND)
-       add_custom_command(
-               OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/openclonk.png
-               COMMAND "${ImageMagick_convert_EXECUTABLE}" 
"${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc.ico[2]" 
"${CMAKE_CURRENT_BINARY_DIR}/openclonk.png"
-               MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc.ico
-               VERBATIM
-       )
-       add_custom_target(icon DEPENDS 
${CMAKE_CURRENT_BINARY_DIR}/openclonk.png)
-       add_dependencies(data icon)
-       install(
-               FILES ${CMAKE_CURRENT_BINARY_DIR}/openclonk.png
-               DESTINATION share/icons/hicolor/48x48/apps
-       )
-endif()
+add_custom_target(icon32 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png)
+add_custom_target(icon64 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png)
+add_custom_target(icon128 DEPENDS 
${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png)
+add_custom_target(icon256 DEPENDS 
${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png)
+add_custom_target(icon512 DEPENDS 
${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png)
+add_dependencies(data icon32 icon64 icon128 icon256 icon512)
+install(
+       FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png
+       DESTINATION share/icons/hicolor/32x32/apps
+       RENAME openclonk.png
+)
+install(
+       FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png
+       DESTINATION share/icons/hicolor/64x64/apps
+       RENAME openclonk.png
+)
+install(
+       FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png
+       DESTINATION share/icons/hicolor/128x128/apps
+       RENAME openclonk.png
+)
+install(
+       FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png
+       DESTINATION share/icons/hicolor/256x256/apps
+       RENAME openclonk.png
+)
+install(
+       FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png
+       DESTINATION share/icons/hicolor/512x512/apps
+       RENAME openclonk.png
+)
 
 set(OC_C4GROUPS
        Graphics.ocg

Reply via email to