From 4fd95fe87bb51104132cf8ca7fe3b05062a50643 Mon Sep 17 00:00:00 2001 From: calebbuahin Date: Sat, 27 Jul 2019 15:43:20 -0400 Subject: [PATCH] Added buid date and version --- .gitignore | 1 + HydroCoupleComposer.pro | 8 +++++++- src/hydrocouplecomposer.cpp | 12 +++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a2390f2..b1dcb08 100755 --- a/.gitignore +++ b/.gitignore @@ -248,3 +248,4 @@ Makefile* CMakeLists.txt.user Makefile +.DS_Store diff --git a/HydroCoupleComposer.pro b/HydroCoupleComposer.pro index 9c12763..e666dad 100755 --- a/HydroCoupleComposer.pro +++ b/HydroCoupleComposer.pro @@ -3,7 +3,10 @@ #Date 2016 #License GNU Lesser General Public License (see for details). TEMPLATE = app -VERSION = 1.2.3 +VERSION_MAJOR = 1 +VERSION_MINOR = 2 +VERSION_BUILD = 4 +VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_BUILD} TARGET = HydroCoupleComposer QT += core widgets gui printsupport concurrent opengl xml @@ -11,6 +14,9 @@ QT += core widgets gui printsupport concurrent opengl xml DEFINES += USE_CHPC DEFINES += USE_MPI DEFINES += USE_OPENMP +DEFINES += VERSION_MAJOR=$$VERSION_MAJOR \ + VERSION_MINOR=$$VERSION_MINOR \ + VERSION_BUILD=$$VERSION_BUILD CONFIG += c++11 CONFIG += debug_and_release diff --git a/src/hydrocouplecomposer.cpp b/src/hydrocouplecomposer.cpp index 16c6832..a841c78 100755 --- a/src/hydrocouplecomposer.cpp +++ b/src/hydrocouplecomposer.cpp @@ -16,6 +16,8 @@ #include #include +#define BUILD_YEAR (__DATE__ + 7) + #ifdef USE_MPI #include #endif @@ -3861,6 +3863,10 @@ void HydroCoupleComposer::onShowHydroCoupleVis() void HydroCoupleComposer::onAbout() { + QString buildDateTime = QString("%1T%2").arg(__DATE__).arg(__TIME__); + QString buildYear = QString("%1").arg(BUILD_YEAR); + QString version = QString("%1.%2.%3").arg(VERSION_MAJOR).arg(VERSION_MINOR).arg(VERSION_BUILD); + QMessageBox::about(this, "HydroCouple Composer", "" "" @@ -3868,10 +3874,10 @@ void HydroCoupleComposer::onAbout() "" "" "\"icon\"" - "

HydroCouple Composer 1.2.3

" + "

HydroCouple Composer "+version+"

" "
" - "

Build Date: 11/30/2017

" - "

Copyright 2014-2017. The HydroCouple Organization. All rights reserved.

" + "

Build Date: " + buildDateTime + "

" + "

Copyright 2014-"+ buildYear +". The HydroCouple Organization. All rights reserved.

" "

This program and its associated libraries is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

" "

caleb.buahin@gmail.com

"