File desktop-icons.patch of Package solarus-quest-editor

From d2f96aaa71957c5f3c7414f34c1842c958c673c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
 <Mailaender@users.noreply.github.com>
Date: Thu, 26 Jan 2017 20:08:47 +0100
Subject: [PATCH 1/4] Adhere to the FreeDesktop specifications.

---
 resources/solarus-quest-editor.desktop | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/resources/solarus-quest-editor.desktop b/resources/solarus-quest-editor.desktop
index d8254ec..346ea21 100644
--- a/resources/solarus-quest-editor.desktop
+++ b/resources/solarus-quest-editor.desktop
@@ -1,7 +1,9 @@
 [Desktop Entry]
-Type=Application
 Name=Solarus Quest Editor
+GenericName=Integrated development environment for Solarus
 Comment=A graphical user interface to create and modify quests for the Solarus engine.
-Exec=/usr/bin/solarus-quest-editor
-Icon=/usr/share/pixmaps/sqe-logo.png
-Categories=Development;
+Exec=solarus-quest-editor
+Terminal=false
+Type=Application
+Icon=solarus-quest-editor
+Categories=Development;IDE;

From f101a19f5a514eaa063c5c394b050d4f26a361c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
 <Mailaender@users.noreply.github.com>
Date: Thu, 26 Jan 2017 20:27:08 +0100
Subject: [PATCH 2/4] Install icons on Linux.

---
 CMakeLists.txt | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7739e18..26e1b3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -417,3 +417,27 @@ endif()
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   include(cmake/apple/OSXBuild.cmake)
 endif()
+
+# FreeDesktop compatible icons
+if(UNIX AND NOT APPLE)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-16px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-32px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-48px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-64px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-96px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/96x96/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-128px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-256px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-512px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-768px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/768x768/apps RENAME solarus-quest-editor.png)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-1024px.png
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/1024x1024/apps RENAME solarus-quest-editor.png)
+endif(UNIX AND NOT APPLE)

From d675b3ccc69dad9ecbed70191b8976a784bd1857 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
 <Mailaender@users.noreply.github.com>
Date: Thu, 26 Jan 2017 20:27:54 +0100
Subject: [PATCH 3/4] Install Linux .desktop files.

---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26e1b3a..000de91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -441,3 +441,9 @@ if(UNIX AND NOT APPLE)
   install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icon/sqe-icon-png-1024px.png
     DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/1024x1024/apps RENAME solarus-quest-editor.png)
 endif(UNIX AND NOT APPLE)
+
+# FreeDesktop compatible start menu launcher
+if(UNIX AND NOT APPLE)
+  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/solarus-quest-editor.desktop
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+endif(UNIX AND NOT APPLE)
openSUSE Build Service is sponsored by