Try to detect "compatibility mode".
This commit is contained in:
parent
38d60fe627
commit
29954feae2
@ -45,7 +45,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(QTDIR)\include";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WIN32_WINNT 0x0500;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@ -131,7 +131,7 @@
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=""$(QTDIR)\include";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WIN32_WINNT 0x0500;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
@ -223,7 +223,7 @@
|
||||
OmitFramePointers="true"
|
||||
WholeProgramOptimization="true"
|
||||
AdditionalIncludeDirectories=""$(QTDIR)\include";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WIN32_WINNT 0x0500;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
@ -577,7 +577,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@ -587,7 +587,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@ -597,7 +597,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@ -1715,7 +1715,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="UIC "$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@ -1725,7 +1725,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="UIC "$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@ -1735,7 +1735,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="UIC "$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\UIC_$(SafeInputName).h" "$(InputPath)"
"
|
||||
Outputs=""$(SolutionDir)tmp\UIC_$(SafeInputName).h""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="dropBoxLabel">
|
||||
<property name="toolTip">
|
||||
<string><b>LameXP DropBox</b><br><nobr>You can add files to LameXP via Drag&amp;Drop here!</nobr><br><nobr>(Right-click to close to DropBox)</nobr></string>
|
||||
<string><b>LameXP DropBox</b><br><nobr>You can add files to LameXP via Drag&amp;Drop here!</nobr><br><nobr>(Right-click to close the DropBox)</nobr></string>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
@ -53,6 +53,7 @@
|
||||
<include location="../res/Images.qrc"/>
|
||||
<include location="../res/Images.qrc"/>
|
||||
<include location="../res/Images.qrc"/>
|
||||
<include location="../res/Images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#define VER_LAMEXP_MAJOR 4
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 0
|
||||
#define VER_LAMEXP_BUILD 182
|
||||
#define VER_LAMEXP_BUILD 183
|
||||
#define VER_LAMEXP_SUFFIX TechPreview
|
||||
|
||||
/*
|
||||
|
@ -66,6 +66,8 @@
|
||||
#define LAMEXP_INIT_QT_STATIC_PLUGIN(X)
|
||||
#endif
|
||||
|
||||
#define X ULONG_MAX
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// TYPES
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -78,6 +80,23 @@ typedef struct
|
||||
char parameter[4096];
|
||||
} lamexp_ipc_t;
|
||||
|
||||
struct lamexp_oscomp_t
|
||||
{
|
||||
DWORD verMajor;
|
||||
DWORD verMinor;
|
||||
char *pcExport;
|
||||
};
|
||||
|
||||
static const struct lamexp_oscomp_t g_lamexp_oscomp[] =
|
||||
{
|
||||
{4, X, "OpenThread"}, // Windows NT 4.0
|
||||
{5, 0, "GetNativeSystemInfo"}, // Windows 2000
|
||||
{5, 1, "GetLargePageMinimum"}, // Windows XP
|
||||
{5, 2, "GetLocaleInfoEx"}, // Windows Server 2003
|
||||
{6, 0, "CreateRemoteThreadEx"}, // Windows Vista
|
||||
{0, 0, NULL} // EOL
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GLOBAL VARS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -390,6 +409,34 @@ void WINAPI debugThreadProc(__in LPVOID lpParameter)
|
||||
TerminateProcess(GetCurrentProcess(), -1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for compatibility mode
|
||||
*/
|
||||
static bool lamexp_check_compatibility_mode(void)
|
||||
{
|
||||
QLibrary kernel32("kernel32.dll");
|
||||
|
||||
OSVERSIONINFOW versionInfo;
|
||||
memset(&versionInfo, 0, sizeof(OSVERSIONINFOW));
|
||||
versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
|
||||
|
||||
if(GetVersionEx(&versionInfo))
|
||||
{
|
||||
for(int i = 0; g_lamexp_oscomp[i].pcExport; i++)
|
||||
{
|
||||
if((g_lamexp_oscomp[i].verMajor == X || g_lamexp_oscomp[i].verMajor == versionInfo.dwMajorVersion) && (g_lamexp_oscomp[i].verMinor == X || g_lamexp_oscomp[i].verMinor == versionInfo.dwMinorVersion))
|
||||
{
|
||||
if(kernel32.resolve(g_lamexp_oscomp[i].pcExport) != NULL)
|
||||
{
|
||||
qFatal("Windows NT %u.%u compatibility mode detected. Aborting!", versionInfo.dwMajorVersion, versionInfo.dwMinorVersion);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize Qt framework
|
||||
@ -431,6 +478,9 @@ bool lamexp_init_qt(int argc, char* argv[])
|
||||
break;
|
||||
}
|
||||
|
||||
//Check if "compatibility mode" is enabled
|
||||
lamexp_check_compatibility_mode();
|
||||
|
||||
//Create Qt application instance and setup version info
|
||||
QApplication *application = new QApplication(argc, argv);
|
||||
application->setApplicationName("LameXP - Audio Encoder Front-End");
|
||||
|
@ -29,7 +29,7 @@
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows XP.
|
||||
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows 2000.
|
||||
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user