From bfcce26f8949f4ba42cc1bd8203dff51884aa0da Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 22 Jun 2013 01:11:37 +0200 Subject: Changes in build organization * targets are now created in top-level build directory * more things are now configured through CMake options * changed debug build detection from NDEBUG to DEV_BUILD * moved po and desktop directories * moved last unit test out of src directory --- src/desktop/.gitignore | 2 - src/desktop/CMakeLists.txt | 98 --------------- src/desktop/colobot.desktop.in | 7 -- src/desktop/colobot.ini | 4 - src/desktop/colobot.pod | 48 -------- src/desktop/colobot.svg | 239 ------------------------------------- src/desktop/create_desktop_file.sh | 18 --- src/desktop/po/colobot-desktop.pot | 135 --------------------- src/desktop/po/fr.po | 153 ------------------------ src/desktop/po4a.cfg | 5 - 10 files changed, 709 deletions(-) delete mode 100644 src/desktop/.gitignore delete mode 100644 src/desktop/CMakeLists.txt delete mode 100644 src/desktop/colobot.desktop.in delete mode 100644 src/desktop/colobot.ini delete mode 100644 src/desktop/colobot.pod delete mode 100644 src/desktop/colobot.svg delete mode 100755 src/desktop/create_desktop_file.sh delete mode 100644 src/desktop/po/colobot-desktop.pot delete mode 100644 src/desktop/po/fr.po delete mode 100644 src/desktop/po4a.cfg (limited to 'src/desktop') diff --git a/src/desktop/.gitignore b/src/desktop/.gitignore deleted file mode 100644 index 0e770f7..0000000 --- a/src/desktop/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -lang/ - diff --git a/src/desktop/CMakeLists.txt b/src/desktop/CMakeLists.txt deleted file mode 100644 index 23f2280..0000000 --- a/src/desktop/CMakeLists.txt +++ /dev/null @@ -1,98 +0,0 @@ -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() - -# Create manpage from pod-formatted file -find_program(POD2MAN pod2man) -if(POD2MAN AND (NOT MSYS)) - set(COLOBOT_MANPAGE_SECTION 6) - - macro(podman) - cmake_parse_arguments(PM "" "PODFILE;LOCALE;" "" ${ARGN}) - if(PM_LOCALE) - # This copes with the fact that english has no "/LANG" in the paths and filenames. - set(SLASHLOCALE /${PM_LOCALE}) - endif() - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${SLASHLOCALE}) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}${SLASHLOCALE}/colobot.${COLOBOT_MANPAGE_SECTION} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PM_PODFILE} - COMMAND ${POD2MAN} ARGS --section=${COLOBOT_MANPAGE_SECTION} - --center="Colobot" --stderr --utf8 - --release="${COLOBOT_VERSION_FULL}" - ${CMAKE_CURRENT_SOURCE_DIR}/${PM_PODFILE} - ${CMAKE_CURRENT_BINARY_DIR}${SLASHLOCALE}/colobot.${COLOBOT_MANPAGE_SECTION} - COMMENT "Create ${SLASHLOCALE}/colobot.${COLOBOT_MANPAGE_SECTION} manpage" - ) - add_custom_target(man${PM_LOCALE} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}${SLASHLOCALE}/colobot.${COLOBOT_MANPAGE_SECTION}) - - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}${SLASHLOCALE}/colobot.${COLOBOT_MANPAGE_SECTION} - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man${SLASHLOCALE}/man${COLOBOT_MANPAGE_SECTION}/ ) - - add_dependencies(man man${PM_LOCALE}) - endmacro() - - # Create the english manpage - podman(PODFILE colobot.pod) - -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) - - if(POD2MAN) - add_custom_target(man_po4a - COMMAND ${PO4A} po4a.cfg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - add_dependencies(man man_po4a) - file(GLOB LINGUAS_PO RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po/ ${CMAKE_CURRENT_SOURCE_DIR}/po/*.po) - string(REGEX REPLACE ".po$" "" LINGUAS ${LINGUAS_PO}) - foreach(LOCALE ${LINGUAS}) - podman(PODFILE lang/${LOCALE}/colobot.pod LOCALE ${LOCALE}) - endforeach() - endif() -endif() - diff --git a/src/desktop/colobot.desktop.in b/src/desktop/colobot.desktop.in deleted file mode 100644 index 9b48d87..0000000 --- a/src/desktop/colobot.desktop.in +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=colobot -Icon=colobot -Categories=Education;Robotics;Game;AdventureGame;StrategyGame; - diff --git a/src/desktop/colobot.ini b/src/desktop/colobot.ini deleted file mode 100644 index 27193df..0000000 --- a/src/desktop/colobot.ini +++ /dev/null @@ -1,4 +0,0 @@ -Name="Colobot" -GenericName="Game to learn programming" -Comment="Colonize with bots" - diff --git a/src/desktop/colobot.pod b/src/desktop/colobot.pod deleted file mode 100644 index 6a25f70..0000000 --- a/src/desktop/colobot.pod +++ /dev/null @@ -1,48 +0,0 @@ -=encoding utf8 - -=head1 NAME - -colobot - educational programming strategy game - -=head1 SYNOPSIS - -B [B<-datadir> I] [B<-debug>] [B<-loglevel> I] [B<-language> I] - -=head1 DESCRIPTION - -Colobot (Colonize with Bots) is an educational game aiming to teach -programming through entertainment. You are playing as an astronaut on a -journey with robot helpers to find a planet for colonization. It features 3D -real-time graphics and a C++ and Java-like, object-oriented language, CBOT, -which can be used to program the robots available in the game. - -=head1 OPTIONS - -=over 8 - -=item B<-help> - -Display a short help text - -=item B<-datadir> F - -Set custom data directory path - -=item B<-debug> - -Enable debug mode (more info printed in logs) - -=item B<-loglevel> I - -Set log level. Possible choices are: trace, debug, info, warn, error, none. - -=item B<-language> I - -Set language. Note that you can also fill the B environment variable. - -=back - -=head1 AUTHOR - -This manpage was written by Didier Raboud >. - diff --git a/src/desktop/colobot.svg b/src/desktop/colobot.svg deleted file mode 100644 index ef5949f..0000000 --- a/src/desktop/colobot.svg +++ /dev/null @@ -1,239 +0,0 @@ - - - - - diff --git a/src/desktop/create_desktop_file.sh b/src/desktop/create_desktop_file.sh deleted file mode 100755 index 8f3d15b..0000000 --- a/src/desktop/create_desktop_file.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 deleted file mode 100644 index ac6bbd2..0000000 --- a/src/desktop/po/colobot-desktop.pot +++ /dev/null @@ -1,135 +0,0 @@ -# SOME DESCRIPTIVE TITLE -# Copyright (C) YEAR Free Software Foundation, Inc. -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-01-20 14:26+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\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 "" - -#. type: =head1 -#: colobot.pod:3 -msgid "NAME" -msgstr "" - -#. type: textblock -#: colobot.pod:5 -msgid "colobot - educational programming strategy game" -msgstr "" - -#. type: =head1 -#: colobot.pod:7 -msgid "SYNOPSIS" -msgstr "" - -#. type: textblock -#: colobot.pod:9 -msgid "" -"B [B<-datadir> I] [B<-debug>] [B<-loglevel> I] " -"[B<-language> I]" -msgstr "" - -#. type: =head1 -#: colobot.pod:11 -msgid "DESCRIPTION" -msgstr "" - -#. type: textblock -#: colobot.pod:13 -msgid "" -"Colobot (Colonize with Bots) is an educational game aiming to teach " -"programming through entertainment. You are playing as an astronaut on a " -"journey with robot helpers to find a planet for colonization. It features 3D " -"real-time graphics and a C++ and Java-like, object-oriented language, CBOT, " -"which can be used to program the robots available in the game." -msgstr "" - -#. type: =head1 -#: colobot.pod:19 -msgid "OPTIONS" -msgstr "" - -#. type: =item -#: colobot.pod:23 -msgid "B<-help>" -msgstr "" - -#. type: textblock -#: colobot.pod:25 -msgid "Display a short help text" -msgstr "" - -#. type: =item -#: colobot.pod:27 -msgid "B<-datadir> F" -msgstr "" - -#. type: textblock -#: colobot.pod:29 -msgid "Set custom data directory path" -msgstr "" - -#. type: =item -#: colobot.pod:31 -msgid "B<-debug>" -msgstr "" - -#. type: textblock -#: colobot.pod:33 -msgid "Enable debug mode (more info printed in logs)" -msgstr "" - -#. type: =item -#: colobot.pod:35 -msgid "B<-loglevel> I" -msgstr "" - -#. type: textblock -#: colobot.pod:37 -msgid "Set log level. Possible choices are: trace, debug, info, warn, error, none." -msgstr "" - -#. type: =item -#: colobot.pod:39 -msgid "B<-language> I" -msgstr "" - -#. type: textblock -#: colobot.pod:41 -msgid "Set language. Note that you can also fill the B environment variable." -msgstr "" - -#. type: =head1 -#: colobot.pod:45 -msgid "AUTHOR" -msgstr "" - -#. type: textblock -#: colobot.pod:47 -msgid "This manpage was written by Didier Raboud >." -msgstr "" - diff --git a/src/desktop/po/fr.po b/src/desktop/po/fr.po deleted file mode 100644 index 40fa9e1..0000000 --- a/src/desktop/po/fr.po +++ /dev/null @@ -1,153 +0,0 @@ -# French translations for PACKAGE package -# Copyright (C) 2012 Free Software Foundation, Inc. -# This file is distributed under the same license as the PACKAGE package. -# -# Didier Raboud , 2012. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-01-20 14:26+0100\n" -"PO-Revision-Date: 2012-12-27 11:00+0100\n" -"Last-Translator: Didier Raboud \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" - -#. type: =head1 -#: colobot.pod:3 -msgid "NAME" -msgstr "NOM" - -#. type: textblock -#: colobot.pod:5 -msgid "colobot - educational programming strategy game" -msgstr "colobot - Jeu éducatif de stratégie et de programmation" - -#. type: =head1 -#: colobot.pod:7 -msgid "SYNOPSIS" -msgstr "RÉSUMÉ" - -#. type: textblock -#: colobot.pod:9 -msgid "" -"B [B<-datadir> I] [B<-debug>] [B<-loglevel> I] [B<-" -"language> I]" -msgstr "" -"B [B<-datadir> I] [B<-debug>] [B<-loglevel> I] [B<-" -"language> I]" - -#. type: =head1 -#: colobot.pod:11 -msgid "DESCRIPTION" -msgstr "DESCRIPTION" - -#. type: textblock -#: colobot.pod:13 -msgid "" -"Colobot (Colonize with Bots) is an educational game aiming to teach " -"programming through entertainment. You are playing as an astronaut on a " -"journey with robot helpers to find a planet for colonization. It features 3D " -"real-time graphics and a C++ and Java-like, object-oriented language, CBOT, " -"which can be used to program the robots available in the game." -msgstr "" -"Colobot (Colonise avec des roBots) est un jeu éducatif visant à " -"l'enseignement de la programmation par le jeu. Vous jouez un astronaute en " -"voyage avec des robots à la recherche d'une planète à coloniser. Son " -"interface est en trois-dimensions et en temps réel; le language utilisé " -"(CBOT) ressemble au C++ et à Java et peut être utilisé pour programmer les " -"robots disponibles dans le jeu." - -#. type: =head1 -#: colobot.pod:19 -msgid "OPTIONS" -msgstr "OPTIONS" - -#. type: =item -#: colobot.pod:23 -msgid "B<-help>" -msgstr "B<-help>" - -#. type: textblock -#: colobot.pod:25 -msgid "Display a short help text" -msgstr "Affiche un court texte d'aide" - -#. type: =item -#: colobot.pod:27 -msgid "B<-datadir> F" -msgstr "B<-datadir> F" - -#. type: textblock -#: colobot.pod:29 -msgid "Set custom data directory path" -msgstr "Définit le chemin vers un répertoire de données spécifique" - -#. type: =item -#: colobot.pod:31 -msgid "B<-debug>" -msgstr "B<-debug>" - -#. type: textblock -#: colobot.pod:33 -msgid "Enable debug mode (more info printed in logs)" -msgstr "" -"Active le mode de déboguage (plus d'informations sont affichées dans le " -"journal)" - -#. type: =item -#: colobot.pod:35 -msgid "B<-loglevel> I" -msgstr "B<-loglevel> I" - -#. type: textblock -#: colobot.pod:37 -msgid "" -"Set log level. Possible choices are: trace, debug, info, warn, error, none." -msgstr "" -"Définit le niveau de journalisation parmi: trace, debug, info, warn, error, " -"none." - -#. type: =item -#: colobot.pod:39 -msgid "B<-language> I" -msgstr "B<-language> I" - -#. type: textblock -#: colobot.pod:41 -msgid "" -"Set language. Note that you can also fill the B environment variable." -msgstr "" -"Définit la langue. Il est aussi possible d'utiliser la variable " -"d'environnement B." - -#. type: =head1 -#: colobot.pod:45 -msgid "AUTHOR" -msgstr "Auteur" - -#. type: textblock -#: colobot.pod:47 -msgid "This manpage was written by Didier Raboud >." -msgstr "" -"Cette page de manuel a été écrite et traduite par Didier Raboud " -">." - diff --git a/src/desktop/po4a.cfg b/src/desktop/po4a.cfg deleted file mode 100644 index 881929d..0000000 --- a/src/desktop/po4a.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[po_directory] po/ - -[type:ini] colobot.ini $lang:lang/$lang/colobot.ini -[type:pod] colobot.pod $lang:lang/$lang/colobot.pod - -- cgit v1.2.3-1-g7c22