Skip to content

Commit

Permalink
Added buid date and version
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbuahin committed Jul 27, 2019
1 parent 2db97c1 commit 4fd95fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,4 @@ Makefile*
CMakeLists.txt.user
Makefile

.DS_Store
8 changes: 7 additions & 1 deletion HydroCoupleComposer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
#Date 2016
#License GNU Lesser General Public License (see <http: //www.gnu.org/licenses/> 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

#DEFINES += GRAPHVIZ_LIBRARY
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
Expand Down
12 changes: 9 additions & 3 deletions src/hydrocouplecomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <QPrintDialog>
#include <QPointF>

#define BUILD_YEAR (__DATE__ + 7)

#ifdef USE_MPI
#include <mpi.h>
#endif
Expand Down Expand Up @@ -3861,17 +3863,21 @@ 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",
"<html>"
"<head>"
"<title>Component Information</title>"
"</head>"
"<body>"
"<img alt=\"icon\" src=':/HydroCoupleComposer/hydrocouplecomposer' width=\"100\" align=\"left\" />"
"<h3 align=\"center\">HydroCouple Composer 1.2.3</h3>"
"<h3 align=\"center\">HydroCouple Composer "+version+"</h3>"
"<hr>"
"<p>Build Date: 11/30/2017</p>"
"<p align=\"center\">Copyright 2014-2017. The HydroCouple Organization. All rights reserved.</p>"
"<p>Build Date: " + buildDateTime + "</p>"
"<p align=\"center\">Copyright 2014-"+ buildYear +". The HydroCouple Organization. All rights reserved.</p>"
"<p align=\"center\">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.</p>"
"<p align=\"center\"><a href=\"mailto:[email protected]?Subject=HydroCouple Composer\">[email protected]</a></p>"
Expand Down

0 comments on commit 4fd95fe

Please sign in to comment.