Skip to content

Commit

Permalink
starting Suprafit 1 Beta 1
Browse files Browse the repository at this point in the history
  • Loading branch information
conradhuebler committed May 1, 2017
1 parent 9d99aa0 commit 9eb28fe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@ execute_process(
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git log -1 --format=%aD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)

add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
add_definitions("-DGIT_BRANCH=${GIT_BRANCH}")
add_definitions("-DGIT_COMMIT_DATE=${GIT_COMMIT_DATE}")

if (${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
set (_DEBUG ON)
Expand Down
2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ int main(int argc, char** argv)
app.setOrganizationName("Conrad Huebler");

app.setApplicationVersion(version);
app.setProperty("GIT_BRANCH", git_branch);
app.setProperty("GIT_COMMIT_HASH", git_commit_hash);

QCommandLineParser parser;
parser.setApplicationDescription ( "A Open Source Qt5 based fitting tool for supramolecular titration experiments." );
Expand Down
2 changes: 1 addition & 1 deletion src/ui/mainwindow/modelwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ void ModelWidget::Data2Text()
text += "******************************************************************************************************\n";
text += "This is a SupraFit save file for " + m_model->Name() + "\n";
text += "SupraFit has been compilied on " + QString::fromStdString(__DATE__) + " at " +QString::fromStdString( __TIME__) + "\n";
text += "Git Branch used was " + git_branch+ " - Commit Hash: " + git_commit_hash + "as tagged as "+ git_tag + ".\n";
text += "Git Branch used was " + git_branch+ " - Commit Hash: " + git_commit_hash + " at "+ git_date + ".\n";
text += "******************************************************************************************************\n";
text += "\n";
text += "#### Begin of Data Description ####\n";
Expand Down
5 changes: 3 additions & 2 deletions src/ui/mainwindow/suprafit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,15 @@ void MainWindow::InsertHistoryElement(const QJsonObject &model, int active)
void MainWindow::about()
{
QString info;
info = "<p>This is all about SupraFit, nothing else matters< /p>";
info = "<h4>" + version + "</h4>";
info += "<p>This is all about SupraFit, nothing else matters< /p>";
info += "<p>Created by Conrad Hübler</p>";
info += "<p>Special thanks to <b>Prof. M. Mazik</b>, TU Bergakademie Freiberg for her support.</p>";
info += "<p>Special thanks to <b>Stefan Kaiser</b> for finding bugs and constructive feedback.</p>";
info += "<p>Thanks to all encouraged me writing the application.</p>";
info += "<p>Built-in Icon Theme taken from Oxygens Icon : http://www.oxygen-icons.org/</p>";
info += "<p>SupraFit has been compilied on " + QString::fromStdString(__DATE__) + " at " +QString::fromStdString( __TIME__) + ".\n";
info += "Git Branch used was " + git_branch+ " - Commit Hash: " + git_commit_hash + "as tagged as "+ git_tag + ".</p>";
info += "Git Branch used was " + git_branch+ " - Commit Hash: " + git_commit_hash + ".</p>";
QMessageBox::about(this, tr("SuprFit"), info);
}

Expand Down
3 changes: 1 addition & 2 deletions src/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
const QString git_branch = "@GIT_BRANCH@"; /*! Current name of the branch */
const QString git_commit_hash = "@GIT_COMMIT_HASH@"; /*! Current hash of the git branch */
const QString git_date = "@GIT_COMMIT_DATE@"; /*! Current date of the git branch */
const QString git_tag = "@GIT_TAG@"; /*! Current tag of the git branch */

#ifdef _DEBUG
const QString conf_mode = "DEBUG Mode"; /*! Last compilation mode used */
#else
const QString conf_mode = "RELEASE Mode"; /*! Last compilation mode used */
#endif

const QString version = "@GIT_BRANCH@ - @GIT_TAG@ - @GIT_COMMIT_HASH@ - @GIT_COMMIT_DATE@ - " + conf_mode; /*! Version name */
const QString version = "Suprafit 1.0 Beta 1\n Git Branch: @GIT_BRANCH@ -- Commit: @GIT_COMMIT_HASH@ -- Commit Date : @GIT_COMMIT_DATE@ - " + conf_mode; /*! Version name */

#endif

0 comments on commit 9eb28fe

Please sign in to comment.