From 264e8b118e766c0402ed8c787fdfbc56133f886e Mon Sep 17 00:00:00 2001 From: Robert Carlsen Date: Tue, 6 Jan 2009 01:54:01 +0000 Subject: [PATCH] Changed from Build Date to Version Numbering system in the about dialog. As discussed on the list, the protocol is major.minor.revision, currently 1.0.271. The major and minor version numbers are set in src.pro; the revision number should be automatically derived using "svnversion . | cut -f '2' -d ':'" in src.pro. --- src/MainWindow.cpp | 13 +++++++++---- src/src.pro | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index d989fa57d..04f4e8ba7 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -44,9 +44,12 @@ #include "DatePickerDialog.h" #include "ToolsDialog.h" -#ifndef GC_BUILD_DATE /* temp for the qmake/QMAKE_CXXFLAGS bug with xcode */ -#define GC_BUILD_DATE "Todo: Fix xcode/qmake bug" +#ifndef GC_SVN_VERSION +#define GC_SVN_VERSION "0" +#endif +#ifndef GC_BUILD_DATE +#define GC_BUILD_DATE GC_SVN_VERSION #endif #define FOLDER_TYPE 0 @@ -1102,8 +1105,10 @@ MainWindow::aboutDialog() "
" "

GoldenCheetah

" "Cycling Power Analysis Software for Linux, Mac, and Windows" - "

Build date: " - "") + QString(GC_BUILD_DATE).replace("_", " ") + ("" +// "

Build date: " +// "") + QString(GC_BUILD_DATE).replace("_", " ") + ("" + "

Version: " + "")+QString::number(GC_MAJOR_VER)+(".") +QString::number(GC_MINOR_VER)+(".")+QString(GC_SVN_VERSION) + ("" "

GoldenCheetah is licensed under the " "GNU General " "Public License." diff --git a/src/src.pro b/src/src.pro index f0d735e55..b38c1d630 100644 --- a/src/src.pro +++ b/src/src.pro @@ -7,7 +7,10 @@ CONFIG += static debug QT += xml LIBS += /usr/local/qwt/lib/libqwt.a LIBS += -lm -lz -lftd2xx -QMAKE_CXXFLAGS = -DGC_BUILD_DATE="`date +'\"%a_%b_%d,_%Y\"'`" +QMAKE_CXXFLAGS += -DGC_BUILD_DATE="`date +'\"%a_%b_%d,_%Y\"'`" +QMAKE_CXXFLAGS += -DGC_SVN_VERSION="`svnversion . | cut -f '2' -d ':'`" +QMAKE_CXXFLAGS += -DGC_MAJOR_VER=1 +QMAKE_CXXFLAGS += -DGC_MINOR_VER=0 RC_FILE = images/gc.icns macx {