Some code clean-up.

This commit is contained in:
LoRd_MuldeR 2013-10-26 15:49:16 +02:00
parent 655427d7a6
commit 75fad0f0fd
5 changed files with 22 additions and 49 deletions

View File

@ -3290,22 +3290,22 @@
<context> <context>
<name>QApplication</name> <name>QApplication</name>
<message> <message>
<location filename="../../src/Global.cpp" line="1442"/> <location filename="../../src/Global.cpp" line="1415"/>
<source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source> <source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1384"/> <location filename="../../src/Global.cpp" line="1357"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1389"/> <location filename="../../src/Global.cpp" line="1362"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1401"/> <location filename="../../src/Global.cpp" line="1374"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source> <source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -3327,22 +3327,22 @@
<context> <context>
<name>QApplication</name> <name>QApplication</name>
<message> <message>
<location filename="../../src/Global.cpp" line="1442"/> <location filename="../../src/Global.cpp" line="1415"/>
<source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source> <source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1384"/> <location filename="../../src/Global.cpp" line="1357"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1389"/> <location filename="../../src/Global.cpp" line="1362"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished">Plik wykonywalny &quot;%1&quot; został skompilowany dla Qt &quot;%2&quot;, znaleziono &quot;%3&quot;.</translation> <translation type="unfinished">Plik wykonywalny &quot;%1&quot; został skompilowany dla Qt &quot;%2&quot;, znaleziono &quot;%3&quot;.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1401"/> <location filename="../../src/Global.cpp" line="1374"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source> <source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -3310,22 +3310,22 @@
<context> <context>
<name>QApplication</name> <name>QApplication</name>
<message> <message>
<location filename="../../src/Global.cpp" line="1442"/> <location filename="../../src/Global.cpp" line="1415"/>
<source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source> <source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
<translation>EXE-filen &apos;%1&apos; stöder inte Windows kompatibilitetsläge.</translation> <translation>EXE-filen &apos;%1&apos; stöder inte Windows kompatibilitetsläge.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1384"/> <location filename="../../src/Global.cpp" line="1357"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation>EXE-filen &apos;%1&apos; kräver Qt v%2, du har Qt v%3.</translation> <translation>EXE-filen &apos;%1&apos; kräver Qt v%2, du har Qt v%3.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1389"/> <location filename="../../src/Global.cpp" line="1362"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation>EXE-filen &apos;%1&apos; är byggd för Qt &apos;%2&apos;, du har Qt &apos;%3&apos;.</translation> <translation>EXE-filen &apos;%1&apos; är byggd för Qt &apos;%2&apos;, du har Qt &apos;%3&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="1401"/> <location filename="../../src/Global.cpp" line="1374"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source> <source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 9 #define VER_LAMEXP_MINOR_LO 9
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 4 #define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 1426 #define VER_LAMEXP_BUILD 1427
#define VER_LAMEXP_CONFG 1348 #define VER_LAMEXP_CONFG 1348
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1060,29 +1060,22 @@ lamexp_cpu_t lamexp_detect_cpu_features(const QStringList &argv)
*/ */
static __forceinline bool lamexp_check_for_debugger(void) static __forceinline bool lamexp_check_for_debugger(void)
{ {
if(IsDebuggerPresent()) __try
{
CloseHandle((HANDLE)((DWORD_PTR)-3));
}
__except(1)
{ {
return true; return true;
} }
__try __try
{ {
CloseHandle((HANDLE) 0x7FFFFFFF); __debugbreak();
} }
__except(EXCEPTION_EXECUTE_HANDLER) __except(1)
{ {
return true; return IsDebuggerPresent();
} }
__try
{
DebugBreak();
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
return false;
}
return true; return true;
} }
@ -1099,7 +1092,7 @@ static unsigned int __stdcall lamexp_debug_thread_proc(LPVOID lpParameter)
lamexp_fatal_exit(L"Not a debug build. Please unload debugger and try again!"); lamexp_fatal_exit(L"Not a debug build. Please unload debugger and try again!");
return 666; return 666;
} }
lamexp_sleep(1); lamexp_sleep(100);
} }
} }
@ -1112,30 +1105,10 @@ static HANDLE lamexp_debug_thread_init()
{ {
lamexp_fatal_exit(L"Not a debug build. Please unload debugger and try again!"); lamexp_fatal_exit(L"Not a debug build. Please unload debugger and try again!");
} }
const uintptr_t h = _beginthreadex(NULL, 0, lamexp_debug_thread_proc, NULL, 0, NULL);
return (HANDLE) _beginthreadex(NULL, 0, lamexp_debug_thread_proc, NULL, 0, NULL); return (HANDLE)(h^0xdeadbeef);
} }
/*
* Check for compatibility mode
*/
//static bool lamexp_check_compatibility_mode(const char *exportName, const QString &executableName)
//{
// QLibrary kernel32("kernel32.dll");
//
// if((exportName != NULL) && kernel32.load())
// {
// if(kernel32.resolve(exportName) != NULL)
// {
// qWarning("Function '%s' exported from 'kernel32.dll' -> Windows compatibility mode!", exportName);
// qFatal("%s", QApplication::tr("Executable '%1' doesn't support Windows compatibility mode.").arg(executableName).toLatin1().constData());
// return false;
// }
// }
//
// return true;
//}
/* /*
* Computus according to H. Lichtenberg * Computus according to H. Lichtenberg
*/ */
@ -3257,7 +3230,7 @@ void lamexp_finalization(void)
/* /*
* Initialize debug thread * Initialize debug thread
*/ */
static const HANDLE g_debug_thread = LAMEXP_DEBUG ? NULL : lamexp_debug_thread_init(); static const HANDLE g_debug_thread1 = LAMEXP_DEBUG ? NULL : lamexp_debug_thread_init();
/* /*
* Get number private bytes [debug only] * Get number private bytes [debug only]