Slightly refactored macros.
This commit is contained in:
parent
2b2ec1df12
commit
26fe0b0499
@ -77,7 +77,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
@ -102,6 +102,9 @@ copy "$(QTDIR)\plugins\imageformats\q???d4.dll" "$(TargetDir)imageformats\"
|
|||||||
copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\"
|
copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\"
|
||||||
</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
@ -120,7 +123,7 @@ copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\"
|
|||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<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)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@ -162,6 +165,9 @@ copy "$(QTDIR)\plugins\imageformats\q????4.dll" "$(TargetDir)imageformats\"
|
|||||||
del "$(TargetDir)imageformats\q???d4.dll"
|
del "$(TargetDir)imageformats\q???d4.dll"
|
||||||
</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
@ -180,7 +186,7 @@ del "$(TargetDir)imageformats\q???d4.dll"
|
|||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<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)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
@ -216,6 +222,9 @@ del "$(TargetDir)imageformats\q???d4.dll"
|
|||||||
<Command>
|
<Command>
|
||||||
</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Decoder_AAC.cpp" />
|
<ClCompile Include="src\Decoder_AAC.cpp" />
|
||||||
@ -974,7 +983,9 @@ del "$(TargetDir)imageformats\q???d4.dll"
|
|||||||
<None Include="ReadMe.txt" />
|
<None Include="ReadMe.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="LameXP.rc" />
|
<ResourceCompile Include="LameXP.rc">
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
40
src/Config.h
40
src/Config.h
@ -19,30 +19,42 @@
|
|||||||
// http://www.gnu.org/licenses/gpl-2.0.txt
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*
|
#pragma once
|
||||||
* LameXP Version Info
|
|
||||||
*/
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// LameXP Version Info
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define VER_LAMEXP_MAJOR 4
|
#define VER_LAMEXP_MAJOR 4
|
||||||
#define VER_LAMEXP_MINOR_HI 0
|
#define VER_LAMEXP_MINOR_HI 0
|
||||||
#define VER_LAMEXP_MINOR_LO 2
|
#define VER_LAMEXP_MINOR_LO 2
|
||||||
#define VER_LAMEXP_BUILD 439
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_SUFFIX Alpha-2
|
#define VER_LAMEXP_PATCH 3
|
||||||
|
#define VER_LAMEXP_BUILD 441
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Tools versions
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*
|
|
||||||
* Tools versions
|
|
||||||
*/
|
|
||||||
#define VER_LAMEXP_TOOL_NEROAAC 1540
|
#define VER_LAMEXP_TOOL_NEROAAC 1540
|
||||||
|
|
||||||
/*
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
* Helper macros (aka: having fun with the C pre-processor)
|
// 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_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_HLP2(U,V,W,X,Y,Z) VER_LAMEXP_STR_HLP1(v##U.V##W Y; Build X; Z)
|
||||||
#define VER_LAMEXP_STR_HLP3(V,W,X,Y,Z) VER_LAMEXP_STR_HLP2(V,W,X,Y,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)
|
#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_HLP1(X) #X
|
||||||
#define VER_LAMEXP_RNAME_HLP2(X) VER_LAMEXP_RNAME_HLP1(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_RNAME VER_LAMEXP_RNAME_HLP2(VER_LAMEXP_SUFFIX)
|
||||||
|
|
||||||
#define VER_LAMEXP_MINOR_HLP1(X,Y) X##Y
|
#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_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_MINOR VER_LAMEXP_MINOR_HLP2(VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO)
|
||||||
|
13
src/Global.h
13
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());
|
#define qFatal64(FORMAT, ...) qFatal("@BASE64@%s", QString(FORMAT).arg(__VA_ARGS__).toUtf8().toBase64().constData());
|
||||||
|
|
||||||
//Check for debug build
|
//Check for debug build
|
||||||
#if defined(_DEBUG) || defined(QT_DEBUG) || !defined(NDEBUG) || !defined(QT_NO_DEBUG)
|
#if defined(_DEBUG) && defined(QT_DEBUG) && !defined(NDEBUG) && !defined(QT_NO_DEBUG)
|
||||||
#define LAMEXP_DEBUG (1)
|
#define LAMEXP_DEBUG (1)
|
||||||
#define LAMEXP_CHECK_DEBUG_BUILD \
|
#elif defined(NDEBUG) && defined(QT_NO_DEBUG) && !defined(_DEBUG) && !defined(QT_DEBUG)
|
||||||
qWarning("---------------------------------------------------------"); \
|
#define LAMEXP_DEBUG (0)
|
||||||
qWarning("DEBUG BUILD: DO NOT RELEASE THIS BINARY TO THE PUBLIC !!!"); \
|
|
||||||
qWarning("---------------------------------------------------------\n");
|
|
||||||
#else
|
#else
|
||||||
#define LAMEXP_DEBUG (0)
|
#error Inconsistent debug defines detected!
|
||||||
#define LAMEXP_CHECK_DEBUG_BUILD
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Memory check
|
//Memory check
|
||||||
|
@ -63,7 +63,12 @@ int lamexp_main(int argc, char* argv[])
|
|||||||
qDebug("This program comes with ABSOLUTELY NO WARRANTY.\n");
|
qDebug("This program comes with ABSOLUTELY NO WARRANTY.\n");
|
||||||
|
|
||||||
//Print warning, if this is a "debug" build
|
//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
|
//Detect CPU capabilities
|
||||||
lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
|
lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
|
||||||
|
Loading…
Reference in New Issue
Block a user