now displays build type in the window title (unless a release build of a release), fixed some macro shenanigans

Fri, 18 Oct 2013 22:30:08 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 18 Oct 2013 22:30:08 +0300
changeset 515
a0ad72800b96
parent 514
d78fea0f664c
child 516
d3373bc7ca3b

now displays build type in the window title (unless a release build of a release), fixed some macro shenanigans

ldforge.pro file | annotate | diff | comparison | revisions
src/common.h file | annotate | diff | comparison | revisions
src/gui.cpp file | annotate | diff | comparison | revisions
--- a/ldforge.pro	Fri Oct 18 22:07:26 2013 +0300
+++ b/ldforge.pro	Fri Oct 18 22:30:08 2013 +0300
@@ -12,7 +12,6 @@
 RC_FILE         = ldforge.rc
 RESOURCES       = ldforge.qrc
 RCC_DIR         = ./build/
-OBJECTS_DIR     = ./build/
 MOC_DIR         = ./build/
 RCC_DIR         = ./build/
 UI_DIR          = ./build/
@@ -26,9 +25,11 @@
 CONFIG (debug, debug|release) {
 	TARGET   = ldforge_debug
 	DEFINES += DEBUG
+	OBJECTS_DIR = ./build_debug/
 } else {
 	TARGET = ldforge
 	DEFINES += RELEASE
+	OBJECTS_DIR = ./build_release/
 }
 
 unix {
--- a/src/common.h	Fri Oct 18 22:07:26 2013 +0300
+++ b/src/common.h	Fri Oct 18 22:30:08 2013 +0300
@@ -48,24 +48,21 @@
 #define RC_NUMBER      0
 
 // =============================================
-#if (BUILD_ID != BUILD_INTERNAL)
-#define RELEASE
-#endif // BUILD_ID
+#ifdef DEBUG
+# undef RELEASE
+#endif // DEBUG
 
+#ifdef RELEASE
+# undef DEBUG
+#endif // RELEASE
+
+// =============================================
 #define alias auto&
-#define elif else if
+#define elif(A) else if (A)
 
 // Null pointer
 static const std::nullptr_t null = nullptr;
 
-#ifdef __GNUC__
-# define FORMAT_PRINTF(M,N) __attribute__ ((format (printf, M, N)))
-# define ATTR(N) __attribute__ ((N))
-#else
-# define FORMAT_PRINTF(M,N)
-# define ATTR(N)
-#endif // __GNUC__
-
 #ifdef WIN32
 # define DIRSLASH "\\"
 # define DIRSLASH_CHAR '\\'
--- a/src/gui.cpp	Fri Oct 18 22:07:26 2013 +0300
+++ b/src/gui.cpp	Fri Oct 18 22:30:08 2013 +0300
@@ -242,6 +242,12 @@
 			title += '*';
 	}
 
+#ifdef DEBUG
+	title += " [debug build]";
+#elif BUILD_ID != BUILD_RELEASE
+	title += " [release build]";
+#endif // DEBUG
+
 	setWindowTitle (title);
 }
 

mercurial