Create a central version

Make it 0.1.0~pre-alpha for now.

- Add it to runtime program
- Add it to -help option
- Add it to manpage
- Update translations
dev-ui
Didier Raboud 2012-12-27 17:10:45 +01:00
parent b046c33206
commit e62996858b
9 changed files with 42 additions and 21 deletions

View File

@ -7,6 +7,32 @@ cmake_minimum_required(VERSION 2.8)
project(colobot C CXX)
##
# Project version
##
set(COLOBOT_VERSION_CODENAME "Gold")
set(COLOBOT_VERSION_MAJOR 0)
set(COLOBOT_VERSION_MINOR 1)
set(COLOBOT_VERSION_REVISION 0)
# Comment out when releasing
set(COLOBOT_VERSION_UNRELEASED "~pre-alpha")
# Append git characteristics to version
if(DEFINED COLOBOT_VERSION_UNRELEASED AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
find_package(Git)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
OUTPUT_VARIABLE GIT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(COLOBOT_VERSION_UNRELEASED "${COLOBOT_VERSION_UNRELEASED}-git-${GIT_BRANCH}~r${GIT_REVISION}")
endif()
set(COLOBOT_VERSION_FULL "${COLOBOT_VERSION_MAJOR}.${COLOBOT_VERSION_MINOR}.${COLOBOT_VERSION_REVISION}${COLOBOT_VERSION_UNRELEASED}")
message(STATUS "Building Colobot \"${COLOBOT_VERSION_CODENAME}\" (${COLOBOT_VERSION_FULL})")
# Include cmake directory with some additional scripts
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${colobot_SOURCE_DIR}/cmake")

View File

@ -246,7 +246,7 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
else if (arg == "-help")
{
GetLogger()->Message("\n");
GetLogger()->Message("COLOBOT GOLD pre-alpha\n");
GetLogger()->Message("Colobot %s (%s)\n",COLOBOT_CODENAME,COLOBOT_VERSION);
GetLogger()->Message("\n");
GetLogger()->Message("List of available options:\n");
GetLogger()->Message(" -help this help\n");

View File

@ -8,6 +8,10 @@
#cmakedefine USE_GLEW @USE_GLEW@
#cmakedefine GLEW_STATIC
#define COLOBOT_VERSION "@COLOBOT_VERSION_FULL@"
#define COLOBOT_CODENAME "@COLOBOT_VERSION_CODENAME@"
#define COLOBOT_FULLNAME "Colobot @COLOBOT_VERSION_CODENAME@"
#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"
#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@"

View File

@ -17,6 +17,8 @@
#include "common/restext.h"
#include "common/config.h"
#include "common/global.h"
#include "common/event.h"
#include "common/logger.h"
@ -39,7 +41,7 @@ const char* stringsCbot[TX_MAX] = { nullptr };
void InitializeRestext()
{
stringsText[RT_VERSION_ID] = "Colobot Gold";
stringsText[RT_VERSION_ID] = COLOBOT_FULLNAME;
stringsText[RT_DISINFO_TITLE] = "SatCom";
stringsText[RT_WINDOW_MAXIMIZED] = "Maximize";

View File

@ -53,6 +53,7 @@ if(POD2MAN)
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"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-27 13:53+0100\n"
"POT-Creation-Date: 2012-12-27 17:09+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"
@ -20,9 +20,6 @@ msgstr ""
msgid "Colobot rules!"
msgstr ""
msgid "Colobot Gold"
msgstr ""
msgid "SatCom"
msgstr ""

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-27 13:53+0100\n"
"POT-Creation-Date: 2012-12-27 17:09+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -378,9 +378,6 @@ msgstr "Schließen"
msgid "Closing bracket missing "
msgstr "Es fehlt eine geschlossene Klammer \")\""
msgid "Colobot Gold"
msgstr "Colobot Gold"
msgid "Colobot rules!"
msgstr "Colobot ist wunderbar!"

View File

@ -2,16 +2,16 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-27 13:53+0100\n"
"POT-Creation-Date: 2012-12-27 17:09+0100\n"
"PO-Revision-Date: 2012-12-27 14:07+0100\n"
"Last-Translator: Didier Raboud <odyx@debian.org>\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"
"X-Language: fr_FR\n"
"X-Source-Language: en_US\n"
"Last-Translator: Didier Raboud <odyx@debian.org>\n"
"PO-Revision-Date: 2012-12-27 14:07+0100\n"
"Language: fr\n"
"X-Generator: Lokalize 1.4\n"
msgid " "
@ -378,9 +378,6 @@ msgstr "Fermer"
msgid "Closing bracket missing "
msgstr "Il manque une parenthèse fermante"
msgid "Colobot Gold"
msgstr "Colobot Gold"
msgid "Colobot rules!"
msgstr "Colobot est super!"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-27 13:53+0100\n"
"POT-Creation-Date: 2012-12-27 17:09+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -380,9 +380,6 @@ msgstr "Zamknij"
msgid "Closing bracket missing "
msgstr "Brak nawiasu zamykającego"
msgid "Colobot Gold"
msgstr "Colobot Gold"
msgid "Colobot rules!"
msgstr "Colobot rządzi!"