From 291a465a76bad382b81472d11300855d90d0f31a Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 9 Apr 2015 20:41:21 +0100 Subject: [PATCH] Build Revision Info Added Travis now overwrites RevisionIdent.h to place a commit reference into the Build Info of the AboutDialog I also added .opensdf to .gitignore. --- .gitignore | 3 ++ .travis.yml | 2 ++ src/AboutDialog.cpp | 4 +++ src/RevisionIdent.h | 28 +++++++++++++++++++ win/Projects/Audacity/Audacity.vcxproj | 1 + .../Audacity/Audacity.vcxproj.filters | 15 ++++------ 6 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 src/RevisionIdent.h diff --git a/.gitignore b/.gitignore index 2e7c7a485..3da21734f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ *.log *.tlog *.ipch +*.opensdf # Precompiled Headers *.gch @@ -40,3 +41,5 @@ *.out *.app win/resetPrefs.txt +src/RevisionIdent.h + diff --git a/.travis.yml b/.travis.yml index 38a024927..2a6024293 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -y libwxgtk2.8-dev + - git show -s --format="wxT(\"%h of %cd\")" + - git show -s --format="wxT(\"%h of %cd\")" > ./src/RevisionIdent.h language: cpp compiler: - gcc diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index 4f8410f46..830d10822 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -549,6 +549,10 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S ) // Current date AddBuildinfoRow(&informationStr, _("Program build date: "), __TDATE__); + AddBuildinfoRow(&informationStr, _("Commit Id:"), +#include "RevisionIdent.h" +); + #ifdef __WXDEBUG__ AddBuildinfoRow(&informationStr, _("Build type:"), _("Debug build")); #else diff --git a/src/RevisionIdent.h b/src/RevisionIdent.h new file mode 100644 index 000000000..a0bee9b61 --- /dev/null +++ b/src/RevisionIdent.h @@ -0,0 +1,28 @@ +/********************************************************************** + + Audacity: A Digital Audio Editor + Audacity(R) is copyright (c) 1999-2015 Audacity Team. + License: GPL v2. See License.txt. + + RevisionIdent.h + + +********************************************************************//*! + +\file RevisionIdent.h + + This entire file will be replaced by the revision identifier string + based on the branch SHA when the automated build system builds + Audacity. That striing will look something like: + + "7f2e839 of + Thu Apr 9 20:03:11 2015 +0100" + +*//********************************************************************/ + +// The string below is what you get if +// the build system does not replace this file. + +wxT("No revision identifier was provided") + diff --git a/win/Projects/Audacity/Audacity.vcxproj b/win/Projects/Audacity/Audacity.vcxproj index 26d6ff45c..9b0f6ff83 100755 --- a/win/Projects/Audacity/Audacity.vcxproj +++ b/win/Projects/Audacity/Audacity.vcxproj @@ -529,6 +529,7 @@ + diff --git a/win/Projects/Audacity/Audacity.vcxproj.filters b/win/Projects/Audacity/Audacity.vcxproj.filters index f7e26c35c..196d32cfe 100755 --- a/win/Projects/Audacity/Audacity.vcxproj.filters +++ b/win/Projects/Audacity/Audacity.vcxproj.filters @@ -1670,6 +1670,9 @@ src + + src + @@ -1684,15 +1687,6 @@ - - nyquist - - - nyquist - - - nyquist - @@ -1812,6 +1806,9 @@ nyquist + + +