summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
-rw-r--r--src/app/app.cpp2
-rw-r--r--src/common/config.h.cmake4
-rw-r--r--src/common/restext.cpp4
-rw-r--r--src/desktop/CMakeLists.txt1
-rw-r--r--src/po/colobot.pot5
-rw-r--r--src/po/de.po5
-rw-r--r--src/po/fr.po11
-rw-r--r--src/po/pl.po5
9 files changed, 42 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe88d87..a3bd7f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 1e577ca..c936ac1 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -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");
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index dd280a3..022bb69 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -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@"
diff --git a/src/common/restext.cpp b/src/common/restext.cpp
index da06131..4c56ae5 100644
--- a/src/common/restext.cpp
+++ b/src/common/restext.cpp
@@ -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";
diff --git a/src/desktop/CMakeLists.txt b/src/desktop/CMakeLists.txt
index 1a1cfd5..ce4f48d 100644
--- a/src/desktop/CMakeLists.txt
+++ b/src/desktop/CMakeLists.txt
@@ -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"
diff --git a/src/po/colobot.pot b/src/po/colobot.pot
index a45303e..e1f9dc7 100644
--- a/src/po/colobot.pot
+++ b/src/po/colobot.pot
@@ -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 ""
diff --git a/src/po/de.po b/src/po/de.po
index 6edcedd..2992cb1 100644
--- a/src/po/de.po
+++ b/src/po/de.po
@@ -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!"
diff --git a/src/po/fr.po b/src/po/fr.po
index 973dc19..662fb93 100644
--- a/src/po/fr.po
+++ b/src/po/fr.po
@@ -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!"
diff --git a/src/po/pl.po b/src/po/pl.po
index 27b05c4..9bab529 100644
--- a/src/po/pl.po
+++ b/src/po/pl.po
@@ -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!"