From 6e47023aac4c2d8dace38efa91912840694c2709 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 12:14:10 +0600 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 +++++ VERSION.md | 1 + source/ublexec.cc | 1 + source/ublexec.h | 1 + 4 files changed, 8 insertions(+) create mode 100644 VERSION.md diff --git a/Makefile b/Makefile index 69aebbf..178739f 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,11 @@ all: init build init: @echo "Initialize ..."; \ + version="$$(cat VERSION.md)"; \ + version=$${version:8}; \ + search="s/string version_application.*$&"; \ + replace="string version_application = \"$${version}\";"; \ + sed -i -e "$$search/$$replace/gi" source/ublexec.h; \ echo "-- Build path: ${CMAKE_BUILD_DIR}" depend: diff --git a/VERSION.md b/VERSION.md new file mode 100644 index 0000000..12ebd01 --- /dev/null +++ b/VERSION.md @@ -0,0 +1 @@ +VERSION 1.0 diff --git a/source/ublexec.cc b/source/ublexec.cc index fcdd503..6f320eb 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -146,6 +146,7 @@ void MainWindow::localization(){ btnAbout->set_label(_("About the program")); aboutWindows->set_comments(_("ublexec")); aboutWindows->set_website_label(_("Project Home Page")); + aboutWindows->set_version(_(version_application.c_str())); lblHeaderName->set_text(_("ublexec")); this->set_title(_("ublexec")); btnStart->set_label(_("Run")); diff --git a/source/ublexec.h b/source/ublexec.h index f15e8f3..fd32684 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -194,6 +194,7 @@ public: Glib::RefPtr list_Development; Glib::RefPtr list_System; public: + string version_application = "1.0"; string cmd_old = ""; string user_cmd=""; string user_cmd_old="";