diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/desktop/CMakeLists.txt | 25 | ||||
-rw-r--r-- | src/desktop/colobot.desktop.in | 4 | ||||
-rw-r--r-- | src/desktop/colobot.ini | 3 | ||||
-rwxr-xr-x | src/desktop/create_desktop_file.sh | 18 | ||||
-rw-r--r-- | src/desktop/po/colobot-desktop.pot | 32 | ||||
-rw-r--r-- | src/desktop/po/fr.po | 32 | ||||
-rw-r--r-- | src/desktop/po4a.cfg | 3 |
8 files changed, 119 insertions, 0 deletions
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..6deac2f --- /dev/null +++ b/src/desktop/CMakeLists.txt @@ -0,0 +1,25 @@ +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/ + ) + +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..ddb7264 --- /dev/null +++ b/src/desktop/colobot.desktop.in @@ -0,0 +1,4 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Exec=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/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 |