# HG changeset patch # User Santeri Piippo # Date 1382124608 -10800 # Node ID a0ad72800b968b0c472e3562cac84dce3d5815b4 # Parent d78fea0f664c62fb1035d0658534e82ee7d36cec now displays build type in the window title (unless a release build of a release), fixed some macro shenanigans diff -r d78fea0f664c -r a0ad72800b96 ldforge.pro --- 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 { diff -r d78fea0f664c -r a0ad72800b96 src/common.h --- 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 '\\' diff -r d78fea0f664c -r a0ad72800b96 src/gui.cpp --- 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); }