diff --git a/CMakeLists.txt b/CMakeLists.txt index eb2936f..ee8a8a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,13 @@ set (PB_VERSION_MAJOR 2) set (PB_VERSION_MINOR 0) set (PB_VERSION_PATCH 0) +configure_file ( + "${PROJECT_SOURCE_DIR}/src/config.h.in" + "${PROJECT_BINARY_DIR}/include/config.h" +) + +include_directories ("${PROJECT_BINARY_DIR}/include") + file (GLOB_RECURSE sources src/*.cxx src/*.h) file (GLOB_RECURSE po resources/po/*.po) diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..c9a4476 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,3 @@ +#define PB_VERSION_MAJOR @PB_VERSION_MAJOR@ +#define PB_VERSION_MINOR @PB_VERSION_MINOR@ +#define PB_VERSION_PATCH @PB_VERSION_PATCH@ diff --git a/src/event.cxx b/src/event.cxx index e2061ab..e6b043b 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -4,6 +4,7 @@ #include #include +#include "config.h" #include "gettext.h" #include "blupi.h" #include "def.h" @@ -1917,9 +1918,11 @@ bool CEvent::DrawButtons() if (m_phase == WM_PHASE_INIT) { - pos.x = 580; + pos.x = 570; pos.y = 465; - DrawText (m_pPixmap, pos, "Version 1.7", FONTLITTLE); + snprintf (res, sizeof (res), "%s %u.%u.%u", gettext ("Version"), + PB_VERSION_MAJOR, PB_VERSION_MINOR, PB_VERSION_PATCH); + DrawText (m_pPixmap, pos, res, FONTLITTLE); } if (m_phase == WM_PHASE_SETUP ||