Added hack to disable 'x64' support on Windows 8 Developer Preview, as our MPress-compressed x64 binaries currently crash on that platform. It's not yet clear whether Windows 8 or MPress is at fault...

This commit is contained in:
LoRd_MuldeR 2011-09-30 20:17:42 +02:00
parent 48efab12eb
commit f8512798a2
3 changed files with 22 additions and 7 deletions

View File

@ -2689,17 +2689,17 @@
<context>
<name>QApplication</name>
<message>
<location filename="../../src/Global.cpp" line="671"/>
<location filename="../../src/Global.cpp" line="686"/>
<source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Global.cpp" line="758"/>
<location filename="../../src/Global.cpp" line="773"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Global.cpp" line="767"/>
<location filename="../../src/Global.cpp" line="782"/>
<source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
<translation type="unfinished"></translation>
</message>

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 706
#define VER_LAMEXP_BUILD 707
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -516,12 +516,14 @@ lamexp_cpu_t lamexp_detect_cpu_features(int argc, char **argv)
lamexp_cpu_t features;
SYSTEM_INFO systemInfo;
OSVERSIONINFO osVersionInfo;
int CPUInfo[4] = {-1};
char CPUIdentificationString[0x40];
char CPUBrandString[0x40];
memset(&features, 0, sizeof(lamexp_cpu_t));
memset(&systemInfo, 0, sizeof(SYSTEM_INFO));
memset(&osVersionInfo, 0, sizeof(OSVERSIONINFO));
memset(CPUIdentificationString, 0, sizeof(CPUIdentificationString));
memset(CPUBrandString, 0, sizeof(CPUBrandString));
@ -600,15 +602,28 @@ lamexp_cpu_t lamexp_detect_cpu_features(int argc, char **argv)
features.count = systemInfo.dwNumberOfProcessors;
features.x64 = true;
#endif
//Hack to disable x64 on the Windows 8 Developer Preview
osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if(features.x64 && GetVersionEx(&osVersionInfo))
{
if((osVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) && (osVersionInfo.dwMajorVersion == 6) && (osVersionInfo.dwMinorVersion == 2))
{
qWarning("Windows 8 (x64) detected. Going to disable all x64 support for now!\n");
features.x64 = false;
}
}
if(argv)
{
bool flag = false;
for(int i = 0; i < argc; i++)
{
if(!_stricmp("--force-cpu-no-64bit", argv[i])) features.x64 = false;
if(!_stricmp("--force-cpu-no-sse", argv[i])) features.sse = features.sse2 = features.sse3 = features.ssse3 = false;
if(!_stricmp("--force-cpu-no-intel", argv[i])) features.intel = false;
if(!_stricmp("--force-cpu-no-64bit", argv[i])) { flag = true; features.x64 = false; }
if(!_stricmp("--force-cpu-no-sse", argv[i])) { flag = true; features.sse = features.sse2 = features.sse3 = features.ssse3 = false; }
if(!_stricmp("--force-cpu-no-intel", argv[i])) { flag = true; features.intel = false; }
}
if(flag) qWarning("CPU flags overwritten by user-defined parameters. Take care!\n");
}
return features;