diff --git a/LameXP_VS2010.vcxproj b/LameXP_VS2010.vcxproj index 35b37f16..6c7211c7 100644 --- a/LameXP_VS2010.vcxproj +++ b/LameXP_VS2010.vcxproj @@ -77,7 +77,7 @@ Disabled $(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG;%(PreprocessorDefinitions) + _CONFIG_NAME=$(ConfigurationName);WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -102,6 +102,9 @@ copy "$(QTDIR)\plugins\imageformats\q???d4.dll" "$(TargetDir)imageformats\" copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\" + + _CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions) + @@ -120,7 +123,7 @@ copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\" true true $(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;%(PreprocessorDefinitions) + _CONFIG_NAME=$(ConfigurationName);WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;%(PreprocessorDefinitions) false Default MultiThreadedDLL @@ -162,6 +165,9 @@ copy "$(QTDIR)\plugins\imageformats\q????4.dll" "$(TargetDir)imageformats\" del "$(TargetDir)imageformats\q???d4.dll" + + _CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions) + @@ -180,7 +186,7 @@ del "$(TargetDir)imageformats\q???d4.dll" true true $(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL;%(PreprocessorDefinitions) + _CONFIG_NAME=$(ConfigurationName);WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL;%(PreprocessorDefinitions) false Default MultiThreaded @@ -216,6 +222,9 @@ del "$(TargetDir)imageformats\q???d4.dll" + + _CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions) + @@ -974,7 +983,9 @@ del "$(TargetDir)imageformats\q???d4.dll" - + + _CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions) + diff --git a/src/Config.h b/src/Config.h index 55856932..80856935 100644 --- a/src/Config.h +++ b/src/Config.h @@ -19,30 +19,42 @@ // http://www.gnu.org/licenses/gpl-2.0.txt /////////////////////////////////////////////////////////////////////////////// -/* - * LameXP Version Info - */ -#define VER_LAMEXP_MAJOR 4 -#define VER_LAMEXP_MINOR_HI 0 -#define VER_LAMEXP_MINOR_LO 2 -#define VER_LAMEXP_BUILD 439 -#define VER_LAMEXP_SUFFIX Alpha-2 +#pragma once -/* - * Tools versions - */ -#define VER_LAMEXP_TOOL_NEROAAC 1540 +/////////////////////////////////////////////////////////////////////////////// +// LameXP Version Info +/////////////////////////////////////////////////////////////////////////////// -/* - * Helper macros (aka: having fun with the C pre-processor) - */ -#define VER_LAMEXP_STR_HLP1(X) #X -#define VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) VER_LAMEXP_STR_HLP1(v##V.W##X Z [Build Y]) -#define VER_LAMEXP_STR_HLP3(V,W,X,Y,Z) VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) -#define VER_LAMEXP_STR VER_LAMEXP_STR_HLP3(VER_LAMEXP_MAJOR,VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO,VER_LAMEXP_BUILD,VER_LAMEXP_SUFFIX) -#define VER_LAMEXP_RNAME_HLP1(X) #X -#define VER_LAMEXP_RNAME_HLP2(X) VER_LAMEXP_RNAME_HLP1(X) -#define VER_LAMEXP_RNAME VER_LAMEXP_RNAME_HLP2(VER_LAMEXP_SUFFIX) -#define VER_LAMEXP_MINOR_HLP1(X,Y) X##Y -#define VER_LAMEXP_MINOR_HLP2(X,Y) VER_LAMEXP_MINOR_HLP1(X,Y) -#define VER_LAMEXP_MINOR VER_LAMEXP_MINOR_HLP2(VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO) +#define VER_LAMEXP_MAJOR 4 +#define VER_LAMEXP_MINOR_HI 0 +#define VER_LAMEXP_MINOR_LO 2 +#define VER_LAMEXP_TYPE Alpha +#define VER_LAMEXP_PATCH 3 +#define VER_LAMEXP_BUILD 441 + +/////////////////////////////////////////////////////////////////////////////// +// Tools versions +/////////////////////////////////////////////////////////////////////////////// + +#define VER_LAMEXP_TOOL_NEROAAC 1540 + +/////////////////////////////////////////////////////////////////////////////// +// Helper macros (aka: having fun with the C pre-processor) +/////////////////////////////////////////////////////////////////////////////// + +#define VER_LAMEXP_SUFFIX_HLP1(X,Y) X-Y +#define VER_LAMEXP_SUFFIX_HLP2(X,Y) VER_LAMEXP_SUFFIX_HLP1(X,Y) +#define VER_LAMEXP_SUFFIX VER_LAMEXP_SUFFIX_HLP2(VER_LAMEXP_TYPE, VER_LAMEXP_PATCH) + +#define VER_LAMEXP_STR_HLP1(X) #X +#define VER_LAMEXP_STR_HLP2(U,V,W,X,Y,Z) VER_LAMEXP_STR_HLP1(v##U.V##W Y; Build X; Z) +#define VER_LAMEXP_STR_HLP3(U,V,W,X,Y,Z) VER_LAMEXP_STR_HLP2(U,V,W,X,Y,Z) +#define VER_LAMEXP_STR VER_LAMEXP_STR_HLP3(VER_LAMEXP_MAJOR,VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO,VER_LAMEXP_BUILD,VER_LAMEXP_SUFFIX,_CONFIG_NAME) + +#define VER_LAMEXP_RNAME_HLP1(X) #X +#define VER_LAMEXP_RNAME_HLP2(X) VER_LAMEXP_RNAME_HLP1(X) +#define VER_LAMEXP_RNAME VER_LAMEXP_RNAME_HLP2(VER_LAMEXP_SUFFIX) + +#define VER_LAMEXP_MINOR_HLP1(X,Y) X##Y +#define VER_LAMEXP_MINOR_HLP2(X,Y) VER_LAMEXP_MINOR_HLP1(X,Y) +#define VER_LAMEXP_MINOR VER_LAMEXP_MINOR_HLP2(VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO) diff --git a/src/Global.h b/src/Global.h index 9685d50e..dcc1abee 100644 --- a/src/Global.h +++ b/src/Global.h @@ -135,15 +135,12 @@ SIZE_T lamexp_dbg_private_bytes(void); #define qFatal64(FORMAT, ...) qFatal("@BASE64@%s", QString(FORMAT).arg(__VA_ARGS__).toUtf8().toBase64().constData()); //Check for debug build -#if defined(_DEBUG) || defined(QT_DEBUG) || !defined(NDEBUG) || !defined(QT_NO_DEBUG) -#define LAMEXP_DEBUG (1) -#define LAMEXP_CHECK_DEBUG_BUILD \ - qWarning("---------------------------------------------------------"); \ - qWarning("DEBUG BUILD: DO NOT RELEASE THIS BINARY TO THE PUBLIC !!!"); \ - qWarning("---------------------------------------------------------\n"); +#if defined(_DEBUG) && defined(QT_DEBUG) && !defined(NDEBUG) && !defined(QT_NO_DEBUG) + #define LAMEXP_DEBUG (1) +#elif defined(NDEBUG) && defined(QT_NO_DEBUG) && !defined(_DEBUG) && !defined(QT_DEBUG) + #define LAMEXP_DEBUG (0) #else -#define LAMEXP_DEBUG (0) -#define LAMEXP_CHECK_DEBUG_BUILD + #error Inconsistent debug defines detected! #endif //Memory check diff --git a/src/Main.cpp b/src/Main.cpp index 1f237cd7..939a78f4 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -63,7 +63,12 @@ int lamexp_main(int argc, char* argv[]) qDebug("This program comes with ABSOLUTELY NO WARRANTY.\n"); //Print warning, if this is a "debug" build - LAMEXP_CHECK_DEBUG_BUILD; + if(LAMEXP_DEBUG) + { + qWarning("---------------------------------------------------------"); + qWarning("DEBUG BUILD: DO NOT RELEASE THIS BINARY TO THE PUBLIC !!!"); + qWarning("---------------------------------------------------------\n"); + } //Detect CPU capabilities lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();