main/enigma.cpp: use new defines for getEnigmaVersionString
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 19 Nov 2009 10:15:46 +0000 (11:15 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 19 Nov 2009 10:16:45 +0000 (11:16 +0100)
main/enigma.cpp

index be9d9a537326ac5a28605526b49bc753627664fb..b5523d31bda5abfda22e2d9cdfa8840da4eeaddf 100644 (file)
@@ -309,14 +309,21 @@ void quitMainloop(int exitCode)
 
 const char *getEnigmaVersionString()
 {
-       return 
-#ifdef ENIGMA2_CHECKOUT_TAG
-               ENIGMA2_CHECKOUT_TAG
+       std::string date =
+#ifdef ENIGMA2_LAST_CHANGE_DATE
+               ENIGMA2_LAST_CHANGE_DATE;
+#else
+               __DATE__;
+#endif
+       std::string branch =
+#ifdef ENIGMA2_BRANCH
+               ENIGMA2_BRANCH;
 #else
                "HEAD"
 #endif
-                       "-" __DATE__;
+       return std::string(date + '-' + branch).c_str();
 }
+
 #include <malloc.h>
 
 void dump_malloc_stats(void)