src/main.cpp

changeset 40
809a75a7113b
parent 38
db677d321cf4
child 41
e985ebb67fdd
--- a/src/main.cpp	Sat Jun 06 22:03:00 2015 +0300
+++ b/src/main.cpp	Sat Jun 06 22:18:30 2015 +0300
@@ -21,6 +21,7 @@
 #include "types.h"
 #include "demo.h"
 #include "prompts.h"
+#include "hginfo.h"
 
 //
 // -------------------------------------------------------------------------------------------------
@@ -67,7 +68,18 @@
 
 QString versionString()
 {
+#ifndef RELEASE
+# ifdef HG_NODE
+	// non-release with hg info
+	return VERSION_STRING "-" HG_NODE;
+# else
+	// non-release, no hg info
+	return VERSION_STRING "-beta";
+# endif
+#else
+	// release
 	return VERSION_STRING;
+#endif
 }
 
 //
@@ -76,5 +88,11 @@
 
 QString versionSignature()
 {
-	return QString (APPNAME) + " " + versionString();
+#ifdef HG_DATE_STRING
+# define DATE_INFO " (" HG_DATE_STRING ")"
+#else
+# define DATE_INFO ""
+#endif
+	
+	return QString (APPNAME) + " " + versionString() + DATE_INFO;
 }
\ No newline at end of file

mercurial