summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2013-09-02 13:33:18 -0400
committerOrcan Ogetbil <oget.fedora@gmail.com>2013-09-02 13:33:18 -0400
commitb05fdd7bd212cf664eb64ec292936f1843a400f5 (patch)
tree406db9154dbe508b15404c3bb7f65b448d30ad12
parent9d08fbdd3ee0e41dd6d13206a31043b72684ada4 (diff)
About box displays the git string and year 2013
-rw-r--r--muse2/CMakeLists.txt24
-rw-r--r--muse2/ChangeLog3
-rw-r--r--muse2/config.h.in2
-rw-r--r--muse2/muse/main.cpp5
-rw-r--r--muse2/muse/widgets/aboutbox.ui2
-rw-r--r--muse2/muse/widgets/aboutbox_impl.cpp4
6 files changed, 27 insertions, 13 deletions
diff --git a/muse2/CMakeLists.txt b/muse2/CMakeLists.txt
index f417347a..66a2ea1b 100644
--- a/muse2/CMakeLists.txt
+++ b/muse2/CMakeLists.txt
@@ -109,14 +109,22 @@ SET(MusE_SHARE_DIR ${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME})
## Lib directory
SET(MusE_LIB_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME})
-FIND_PROGRAM(SVNVER svnversion)
-if (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
- SET (MusE_SVNVER 0)
-else (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
- EXEC_PROGRAM( svnversion
- ARGS ${PROJECT_SOURCE_DIR}
- OUTPUT_VARIABLE MusE_SVNVER )
-endif (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
+include(FindGit)
+if (GIT_FOUND)
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "log -1 --format='%ci'"
+ OUTPUT_VARIABLE MusE_GITDATE )
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "log -1 --format='%t'"
+ OUTPUT_VARIABLE MusE_GITHASH )
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "rev-parse --abbrev-ref HEAD"
+ OUTPUT_VARIABLE MusE_GITBRANCH )
+ SET(MusE_GITSTRING "git: ${MusE_GITBRANCH} - ${MusE_GITHASH} - ${MusE_GITDATE}")
+else (GIT_FOUND)
+ SET(MusE_GITSTRING "")
+endif (GIT_FOUND)
+
option ( ENABLE_LASH "Enable LASH Audio Session Handler (or LADISH compatibility layer)" ON)
option ( ENABLE_OSC "Enable Lightweight Open Sound Control (liblo) (DSSI also recommended)" ON)
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 4eaf5f1c..7a81f9a1 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,6 @@
+02.09.2013:
+ - Display git hash and date in the about box instead of svn revision (Orcan)
+ - Bumped the year string to 2013 in the about box
01.09.2013:
- Mods/fixes to Midi Input Transformator plugin: (Tim)
Fixed some bugs when reading procVal2Op from song.
diff --git a/muse2/config.h.in b/muse2/config.h.in
index ddcd51e1..7dc31c59 100644
--- a/muse2/config.h.in
+++ b/muse2/config.h.in
@@ -29,7 +29,7 @@
#cmakedefine USE_SSE
#define VERSION "${MusE_VERSION_FULL}"
-#define SVNVERSION "${MusE_SVNVER}"
+#define GITSTRING "${MusE_GITSTRING}"
#define PACKAGE_NAME "MusE"
#define DOCDIR "${MusE_DOC_DIR}"
#define SHAREDIR "${MusE_SHARE_DIR}"
diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp
index feb14324..2d2165d1 100644
--- a/muse2/muse/main.cpp
+++ b/muse2/muse/main.cpp
@@ -127,7 +127,10 @@ static void getCapabilities()
static void printVersion(const char* prog)
{
- fprintf(stderr, "%s: Linux Music Editor; Version %s, (svn revision %s)\n", prog, VERSION, SVNVERSION);
+ if (strcmp("", GITSTRING))
+ fprintf(stderr, "%s: Linux Music Editor; Version %s, (%s)\n", prog, VERSION, GITSTRING);
+ else
+ fprintf(stderr, "%s: Linux Music Editor; Version %s\n", prog, VERSION);
}
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/aboutbox.ui b/muse2/muse/widgets/aboutbox.ui
index bf14e099..29497422 100644
--- a/muse2/muse/widgets/aboutbox.ui
+++ b/muse2/muse/widgets/aboutbox.ui
@@ -58,7 +58,7 @@
<item>
<widget class="QLabel" name="textLabel1">
<property name="text">
- <string>(C) Copyright 1999-2012 Werner Schweer and others.
+ <string>(C) Copyright 1999-2013 Werner Schweer and others.
See http://www.muse-sequencer.org for new versions and
more information.
diff --git a/muse2/muse/widgets/aboutbox_impl.cpp b/muse2/muse/widgets/aboutbox_impl.cpp
index b53e246f..fcb96a1d 100644
--- a/muse2/muse/widgets/aboutbox_impl.cpp
+++ b/muse2/muse/widgets/aboutbox_impl.cpp
@@ -31,8 +31,8 @@ AboutBoxImpl::AboutBoxImpl()
setupUi(this);
imageLabel->setPixmap(*aboutMuseImage);
QString version(VERSION);
- QString svnrevision(SVNVERSION);
- versionLabel->setText("Version: " + version + " (svn revision: "+ svnrevision +")");
+ QString gitstring(GITSTRING);
+ versionLabel->setText("Version: " + version + (gitstring == QString() ? "" : "\n("+ gitstring + ")"));
}
}