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="";