summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Zieliński <michal@zielinscy.org.pl>2012-12-27 03:25:39 -0800
committerMichał Zieliński <michal@zielinscy.org.pl>2012-12-27 03:25:39 -0800
commita30b35b8fe9a9565faf7c0fef5a3911511fb4952 (patch)
treec3f9c867393982c4400f1378801c5184b2a363b2
parentc793d2d4c67a5556e39300988f42a630fc51e68d (diff)
parentc2ebd5551ff2569f56e3321efd2d9bedaf079955 (diff)
downloadcolobot-a30b35b8fe9a9565faf7c0fef5a3911511fb4952.tar.gz
colobot-a30b35b8fe9a9565faf7c0fef5a3911511fb4952.tar.bz2
colobot-a30b35b8fe9a9565faf7c0fef5a3911511fb4952.zip
Merge pull request #103 from OdyX/dev-desktop-file
Add desktop and icon files
-rw-r--r--.travis.yml2
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/desktop/CMakeLists.txt49
-rw-r--r--src/desktop/colobot.desktop.in5
-rw-r--r--src/desktop/colobot.ini3
-rw-r--r--src/desktop/colobot.svg238
-rwxr-xr-xsrc/desktop/create_desktop_file.sh18
-rw-r--r--src/desktop/po/colobot-desktop.pot32
-rw-r--r--src/desktop/po/fr.po32
-rw-r--r--src/desktop/po4a.cfg3
10 files changed, 383 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 04e7b8e..660a2f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,4 +5,4 @@ script: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON && make all doc test
before_install:
- git submodule update --init --recursive
- sudo apt-get update -qq
- - sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz
+ - sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz po4a librsvg2-bin
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3339b1a..74de412 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,6 +6,8 @@ add_subdirectory(tools)
add_subdirectory(po)
+add_subdirectory(desktop)
+
# Tests
if(${TESTS})
add_subdirectory(common/test)
diff --git a/src/desktop/CMakeLists.txt b/src/desktop/CMakeLists.txt
new file mode 100644
index 0000000..cc159a9
--- /dev/null
+++ b/src/desktop/CMakeLists.txt
@@ -0,0 +1,49 @@
+cmake_minimum_required(VERSION 2.8)
+
+# Install Desktop Entry file
+set(COLOBOT_DESKTOP_FILE colobot.desktop)
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
+ COMMAND ./create_desktop_file.sh > ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMENT "Build ${COLOBOT_DESKTOP_FILE}"
+ )
+add_custom_target(desktopfile ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE})
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/
+ )
+
+# Install Icon
+set(COLOBOT_ICON_FILE colobot.svg)
+install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COLOBOT_ICON_FILE}
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/
+ )
+
+# Render SVG icon in various sizes
+find_program(RSVG_CONVERT rsvg-convert)
+if(RSVG_CONVERT)
+ foreach(PNGSIZE "48" "32" "16")
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PNGSIZE})
+ add_custom_target(resize_icon_${PNGSIZE} ALL
+ COMMAND ${RSVG_CONVERT} -w ${PNGSIZE} -h ${PNGSIZE} ${CMAKE_CURRENT_SOURCE_DIR}/${COLOBOT_ICON_FILE}
+ > ${CMAKE_CURRENT_BINARY_DIR}/${PNGSIZE}/colobot.png
+ )
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGSIZE}/colobot.png
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${PNGSIZE}x${PNGSIZE}/apps/
+ )
+ endforeach()
+endif()
+
+# Translate translatable material
+find_program(PO4A po4a)
+
+if(PO4A)
+ add_custom_target(desktop_po4a
+ COMMAND ${PO4A} po4a.cfg
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+ add_dependencies(desktopfile desktop_po4a)
+endif()
diff --git a/src/desktop/colobot.desktop.in b/src/desktop/colobot.desktop.in
new file mode 100644
index 0000000..74378fd
--- /dev/null
+++ b/src/desktop/colobot.desktop.in
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Exec=colobot
+Icon=colobot
diff --git a/src/desktop/colobot.ini b/src/desktop/colobot.ini
new file mode 100644
index 0000000..136e008
--- /dev/null
+++ b/src/desktop/colobot.ini
@@ -0,0 +1,3 @@
+Name="Colobot"
+GenericName="Game to learn programming"
+Comment="Colonize with bots"
diff --git a/src/desktop/colobot.svg b/src/desktop/colobot.svg
new file mode 100644
index 0000000..85a0545
--- /dev/null
+++ b/src/desktop/colobot.svg
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="48"
+ height="48"
+ id="colobot-logo"
+ style="enable-background:new">
+ <title
+ id="title3020">Colobot icon</title>
+ <metadata
+ id="metadata3061">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Colobot icon</dc:title>
+ <dc:date>2012-12-27</dc:date>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title></dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Polish Portal of Colobot</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license
+ rdf:resource="http://www.gnu.org/licenses/gpl-3.0-standalone.html" />
+ <dc:description>Three spheres symbolizing planets.</dc:description>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Didier Raboud &lt;odyx@debian.org&gt;</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3059">
+ <linearGradient
+ id="linearGradient4108">
+ <stop
+ id="stop4110"
+ style="stop-color:#008000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4112"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4096">
+ <stop
+ id="stop4098"
+ style="stop-color:#00ff00;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4100"
+ style="stop-color:#00ff00;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4108-5">
+ <stop
+ id="stop4110-2"
+ style="stop-color:#000080;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4112-8"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4096-0">
+ <stop
+ id="stop4098-3"
+ style="stop-color:#0000ff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4100-0"
+ style="stop-color:#0000ff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4108-5-2">
+ <stop
+ id="stop4110-2-3"
+ style="stop-color:#500000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4112-8-6"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4096-0-3">
+ <stop
+ id="stop4098-3-7"
+ style="stop-color:#ff0000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4100-0-3"
+ style="stop-color:#ff0000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="54.8265"
+ cy="57.607162"
+ r="56.05489"
+ fx="54.8265"
+ fy="57.607162"
+ id="radialGradient4416"
+ xlink:href="#linearGradient4108-5-2"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.02726606,1.3911392,-1.8797791,0.03684323,176.62558,-41.562143)" />
+ <radialGradient
+ cx="63.5"
+ cy="37.5"
+ r="32"
+ fx="63.5"
+ fy="37.5"
+ id="radialGradient4418"
+ xlink:href="#linearGradient4096-0-3"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.796875,6.7936132,3.6927801)" />
+ <radialGradient
+ cx="54.8265"
+ cy="57.607162"
+ r="56.05489"
+ fx="54.8265"
+ fy="57.607162"
+ id="radialGradient4420"
+ xlink:href="#linearGradient4108"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.02726606,1.3911392,-1.8797791,0.03684323,176.62558,-41.562143)" />
+ <radialGradient
+ cx="63.5"
+ cy="37.5"
+ r="32"
+ fx="63.5"
+ fy="37.5"
+ id="radialGradient4422"
+ xlink:href="#linearGradient4096"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.796875,6.7936132,3.6927801)" />
+ <radialGradient
+ cx="54.8265"
+ cy="57.607162"
+ r="56.05489"
+ fx="54.8265"
+ fy="57.607162"
+ id="radialGradient4424"
+ xlink:href="#linearGradient4108-5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.02726606,1.3911392,-1.8797791,0.03684323,176.62558,-41.562143)" />
+ <radialGradient
+ cx="63.5"
+ cy="37.5"
+ r="32"
+ fx="63.5"
+ fy="37.5"
+ id="radialGradient4426"
+ xlink:href="#linearGradient4096-0"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.796875,6.7936132,3.6927801)" />
+ </defs>
+ <path
+ d="m 35.001373,17.978157 a 17.137194,11.839104 0 1 1 -34.27438587,0 17.137194,11.839104 0 1 1 34.27438587,0 z"
+ id="path3068"
+ style="opacity:0;color:#000000;fill:#800000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:1.45397186;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:11.63177575, 11.63177575;stroke-dashoffset:11.63177575;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <g
+ transform="matrix(1.4527314,0,0,1.4552231,61.790796,7.2674667)"
+ id="layer1"
+ style="display:inline">
+ <g
+ transform="translate(-64.376292,0)"
+ id="g4403">
+ <g
+ transform="matrix(0.1151419,-0.11259991,0.11259991,0.1151419,78.136911,8.9624182)"
+ id="g4122-3-7"
+ style="stroke-width:6.52155399;stroke-miterlimit:4;stroke-dasharray:none;display:inline">
+ <g
+ transform="translate(-232.5787,-246.03551)"
+ id="g4259-8">
+ <path
+ d="m 128.20539,62.567638 c 0,29.922729 -24.25716,54.179892 -54.179886,54.179892 -29.922729,0 -54.179893,-24.257163 -54.179893,-54.179892 0,-29.922729 24.257164,-54.1798929 54.179893,-54.1798929 29.922726,0 54.179886,24.2571639 54.179886,54.1798929 z"
+ id="path1873-0-2"
+ style="fill:url(#radialGradient4416);fill-opacity:1;fill-rule:nonzero;stroke:#808000;stroke-width:4.65700197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <path
+ d="m 102.29361,33.575593 c 0,14.083261 -14.326885,25.5 -31.999997,25.5 -17.673112,0 -32,-11.416739 -32,-25.5 0,-14.083261 14.326888,-25.4999999 32,-25.4999999 17.673112,0 31.999997,11.4167389 31.999997,25.4999999 z"
+ id="path2814-0-8"
+ style="fill:url(#radialGradient4418);fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ </g>
+ <g
+ transform="matrix(0.1151419,-0.11259991,0.11259991,0.1151419,15.374404,17.677401)"
+ id="g4122"
+ style="stroke-width:6.52155399;stroke-miterlimit:4;stroke-dasharray:none">
+ <path
+ d="m 128.20539,62.567638 c 0,29.922729 -24.25716,54.179892 -54.179886,54.179892 -29.922729,0 -54.179893,-24.257163 -54.179893,-54.179892 0,-29.922729 24.257164,-54.1798929 54.179893,-54.1798929 29.922726,0 54.179886,24.2571639 54.179886,54.1798929 z"
+ id="path1873"
+ style="fill:url(#radialGradient4420);fill-opacity:1;fill-rule:nonzero;stroke:#808000;stroke-width:4.65700197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <path
+ d="m 102.29361,33.575593 c 0,14.083261 -14.326885,25.5 -31.999997,25.5 -17.673112,0 -32,-11.416739 -32,-25.5 0,-14.083261 14.326888,-25.4999999 32,-25.4999999 17.673112,0 31.999997,11.4167389 31.999997,25.4999999 z"
+ id="path2814"
+ style="fill:url(#radialGradient4422);fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="matrix(0.1151419,-0.11259991,0.11259991,0.1151419,57.006572,14.417637)"
+ id="g4122-3"
+ style="stroke-width:6.52155399;stroke-miterlimit:4;stroke-dasharray:none;display:inline">
+ <g
+ transform="translate(-136.63091,-98.230764)"
+ id="g4259">
+ <path
+ d="m 128.20539,62.567638 c 0,29.922729 -24.25716,54.179892 -54.179886,54.179892 -29.922729,0 -54.179893,-24.257163 -54.179893,-54.179892 0,-29.922729 24.257164,-54.1798929 54.179893,-54.1798929 29.922726,0 54.179886,24.2571639 54.179886,54.1798929 z"
+ id="path1873-0"
+ style="fill:url(#radialGradient4424);fill-opacity:1;fill-rule:nonzero;stroke:#808000;stroke-width:4.65700197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <path
+ d="m 102.29361,33.575593 c 0,14.083261 -14.326885,25.5 -31.999997,25.5 -17.673112,0 -32,-11.416739 -32,-25.5 0,-14.083261 14.326888,-25.4999999 32,-25.4999999 17.673112,0 31.999997,11.4167389 31.999997,25.4999999 z"
+ id="path2814-0"
+ style="fill:url(#radialGradient4426);fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/src/desktop/create_desktop_file.sh b/src/desktop/create_desktop_file.sh
new file mode 100755
index 0000000..e0f120b
--- /dev/null
+++ b/src/desktop/create_desktop_file.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+# Create colobot.desktop from various colobot.ini's
+
+fname=colobot.ini
+
+cat colobot.desktop.in
+
+linguas=$([ ! -d lang ] || ( cd lang ; ls));
+
+for type in Name GenericName Comment; do
+ egrep "^$type=" $fname | sed -e "s/^$type=\"\(.*\)\"$/$type=\1/g"
+ for l in $linguas; do
+ egrep "^$type=" lang/$l/$fname | sed -e "s/^$type=\"\(.*\)\"$/$type[$l]=\1/g"
+ done
+done
diff --git a/src/desktop/po/colobot-desktop.pot b/src/desktop/po/colobot-desktop.pot
new file mode 100644
index 0000000..e74136a
--- /dev/null
+++ b/src/desktop/po/colobot-desktop.pot
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-12-26 15:05+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: colobot.ini:1
+#, no-wrap
+msgid "Colobot"
+msgstr ""
+
+#: colobot.ini:2
+#, no-wrap
+msgid "Game to learn programming"
+msgstr ""
+
+#: colobot.ini:3
+#, no-wrap
+msgid "Colonize with bots"
+msgstr ""
diff --git a/src/desktop/po/fr.po b/src/desktop/po/fr.po
new file mode 100644
index 0000000..63dbb23
--- /dev/null
+++ b/src/desktop/po/fr.po
@@ -0,0 +1,32 @@
+# French translations for PACKAGE package
+# Copyright (C) 2012 Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# Automatically generated, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-12-26 15:05+0100\n"
+"PO-Revision-Date: 2012-12-26 15:05+0100\n"
+"Last-Translator: Didier Raboud <odyx@debian.org>\n"
+"Language-Team: none\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: colobot.ini:1
+#, no-wrap
+msgid "Colobot"
+msgstr "Colobot"
+
+#: colobot.ini:2
+#, no-wrap
+msgid "Game to learn programming"
+msgstr "Apprentissage de la programmation par le jeu"
+
+#: colobot.ini:3
+#, no-wrap
+msgid "Colonize with bots"
+msgstr "Colonise avec des roBots"
diff --git a/src/desktop/po4a.cfg b/src/desktop/po4a.cfg
new file mode 100644
index 0000000..eda2985
--- /dev/null
+++ b/src/desktop/po4a.cfg
@@ -0,0 +1,3 @@
+[po_directory] po/
+
+[type:ini] colobot.ini $lang:lang/$lang/colobot.ini