<context>
<name>QApplication</name>
<message>
- <location filename="../../src/Global.cpp" line="935"/>
+ <location filename="../../src/Global.cpp" line="1013"/>
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1188"/>
+ <location filename="../../src/Global.cpp" line="1266"/>
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1193"/>
+ <location filename="../../src/Global.cpp" line="1271"/>
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1207"/>
- <location filename="../../src/Global.cpp" line="1234"/>
+ <location filename="../../src/Global.cpp" line="1283"/>
<source>Executable '%1' requires Windows XP or later.</source>
<translation type="unfinished"></translation>
</message>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="263"/>
- <location filename="../../src/Dialog_Update.cpp" line="540"/>
+ <location filename="../../src/Dialog_Update.cpp" line="276"/>
+ <location filename="../../src/Dialog_Update.cpp" line="548"/>
<source>Build</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="264"/>
+ <location filename="../../src/Dialog_Update.cpp" line="277"/>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="372"/>
+ <location filename="../../src/Dialog_Update.cpp" line="385"/>
<source>Testing your internet connection, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="392"/>
- <location filename="../../src/Dialog_Update.cpp" line="984"/>
+ <location filename="../../src/Dialog_Update.cpp" line="400"/>
+ <location filename="../../src/Dialog_Update.cpp" line="987"/>
<source>It appears that the computer currently is offline!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="395"/>
- <location filename="../../src/Dialog_Update.cpp" line="987"/>
+ <location filename="../../src/Dialog_Update.cpp" line="403"/>
+ <location filename="../../src/Dialog_Update.cpp" line="990"/>
<source>Please make sure your computer is connected to the internet and try again.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="453"/>
+ <location filename="../../src/Dialog_Update.cpp" line="461"/>
<source>Network connectivity test has failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="456"/>
+ <location filename="../../src/Dialog_Update.cpp" line="464"/>
<source>Please make sure your internet connection is working properly and try again.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="470"/>
+ <location filename="../../src/Dialog_Update.cpp" line="478"/>
<source>Checking for new updates online, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="525"/>
+ <location filename="../../src/Dialog_Update.cpp" line="533"/>
<source>Failed to fetch update information from server!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="530"/>
+ <location filename="../../src/Dialog_Update.cpp" line="538"/>
<source>Sorry, the update server might be busy at this time. Plase try again later.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="542"/>
+ <location filename="../../src/Dialog_Update.cpp" line="550"/>
<source>More information available at:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="548"/>
+ <location filename="../../src/Dialog_Update.cpp" line="556"/>
<source>A new version of LameXP is available!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="550"/>
+ <location filename="../../src/Dialog_Update.cpp" line="558"/>
<source>We highly recommend all users to install this update as soon as possible.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="559"/>
+ <location filename="../../src/Dialog_Update.cpp" line="567"/>
<source>No new updates available at this time.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="561"/>
+ <location filename="../../src/Dialog_Update.cpp" line="569"/>
<source>Your version of LameXP is still up-to-date. Please check for updates regularly!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="570"/>
+ <location filename="../../src/Dialog_Update.cpp" line="578"/>
<source>Your version appears to be newer than the latest release.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="572"/>
+ <location filename="../../src/Dialog_Update.cpp" line="580"/>
<source>This usually indicates your are currently using a pre-release version of LameXP.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="865"/>
+ <location filename="../../src/Dialog_Update.cpp" line="873"/>
<source>Update is being downloaded, please be patient...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="910"/>
+ <location filename="../../src/Dialog_Update.cpp" line="918"/>
<source>Update ready to install. Applicaion will quit...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="918"/>
+ <location filename="../../src/Dialog_Update.cpp" line="926"/>
<source>Update failed. Please try again or download manually!</source>
<translation type="unfinished"></translation>
</message>
<context>
<name>QApplication</name>
<message>
- <location filename="../../src/Global.cpp" line="935"/>
+ <location filename="../../src/Global.cpp" line="1013"/>
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
<translation type="unfinished">Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows.</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1188"/>
+ <location filename="../../src/Global.cpp" line="1266"/>
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished">Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1193"/>
+ <location filename="../../src/Global.cpp" line="1271"/>
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
<translation type="unfinished">Plik wykonywalny "%1" został skompilowany dla Qt "%2", znaleziono "%3".</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1207"/>
- <location filename="../../src/Global.cpp" line="1234"/>
+ <location filename="../../src/Global.cpp" line="1283"/>
<source>Executable '%1' requires Windows XP or later.</source>
<translation type="unfinished"></translation>
</message>
<translation type="unfinished">Zamknij</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="263"/>
- <location filename="../../src/Dialog_Update.cpp" line="540"/>
+ <location filename="../../src/Dialog_Update.cpp" line="276"/>
+ <location filename="../../src/Dialog_Update.cpp" line="548"/>
<source>Build</source>
<translation type="unfinished">Build</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="264"/>
+ <location filename="../../src/Dialog_Update.cpp" line="277"/>
<source>Unknown</source>
<translation type="unfinished">Nieznana</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="372"/>
+ <location filename="../../src/Dialog_Update.cpp" line="385"/>
<source>Testing your internet connection, please wait...</source>
<translation type="unfinished">Testowanie połączenia internetowego, prosze czekać...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="392"/>
- <location filename="../../src/Dialog_Update.cpp" line="984"/>
+ <location filename="../../src/Dialog_Update.cpp" line="400"/>
+ <location filename="../../src/Dialog_Update.cpp" line="987"/>
<source>It appears that the computer currently is offline!</source>
<translation type="unfinished">LameXP wykrył brak dostępu do internetu!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="395"/>
- <location filename="../../src/Dialog_Update.cpp" line="987"/>
+ <location filename="../../src/Dialog_Update.cpp" line="403"/>
+ <location filename="../../src/Dialog_Update.cpp" line="990"/>
<source>Please make sure your computer is connected to the internet and try again.</source>
<translation type="unfinished">Upewnij się że komputer jest podłączony do internetu i spróbuj ponownie.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="453"/>
+ <location filename="../../src/Dialog_Update.cpp" line="461"/>
<source>Network connectivity test has failed!</source>
<translation type="unfinished">Test połączenia internetowego zakończony niepowodzeniem!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="456"/>
+ <location filename="../../src/Dialog_Update.cpp" line="464"/>
<source>Please make sure your internet connection is working properly and try again.</source>
<translation type="unfinished">Upewnij się że połączenie internetowe działa prawidłowo i spróbuj ponownie.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="470"/>
+ <location filename="../../src/Dialog_Update.cpp" line="478"/>
<source>Checking for new updates online, please wait...</source>
<translation type="unfinished">Sprawdzanie aktualizacji online, prosze czekać...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="525"/>
+ <location filename="../../src/Dialog_Update.cpp" line="533"/>
<source>Failed to fetch update information from server!</source>
<translation type="unfinished">Pobieranie informacji z serwera zakończone niepowodzeniem!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="530"/>
+ <location filename="../../src/Dialog_Update.cpp" line="538"/>
<source>Sorry, the update server might be busy at this time. Plase try again later.</source>
<translation type="unfinished">Serwer aktualizacji wydaje się nie odpowiadać w tej chwili. Prosze spróbować później.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="542"/>
+ <location filename="../../src/Dialog_Update.cpp" line="550"/>
<source>More information available at:</source>
<translation type="unfinished">Więcej informacji tutaj:</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="548"/>
+ <location filename="../../src/Dialog_Update.cpp" line="556"/>
<source>A new version of LameXP is available!</source>
<translation type="unfinished">Dostępna nowa wersja LameXP!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="550"/>
+ <location filename="../../src/Dialog_Update.cpp" line="558"/>
<source>We highly recommend all users to install this update as soon as possible.</source>
<translation type="unfinished">Jest wysoce zalecane aby zainstalować tę aktualizację jak najszybciej.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="559"/>
+ <location filename="../../src/Dialog_Update.cpp" line="567"/>
<source>No new updates available at this time.</source>
<translation type="unfinished">Nie ma nowych aktualizacji w tej chwili.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="561"/>
+ <location filename="../../src/Dialog_Update.cpp" line="569"/>
<source>Your version of LameXP is still up-to-date. Please check for updates regularly!</source>
<translation type="unfinished">Posiadasz najnowszą wersję LameXP. Sprawdzaj aktualizacje regularnie!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="570"/>
+ <location filename="../../src/Dialog_Update.cpp" line="578"/>
<source>Your version appears to be newer than the latest release.</source>
<translation type="unfinished">Posiadasz nowszą wersję LameXP niż ostatnie wydanie.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="572"/>
+ <location filename="../../src/Dialog_Update.cpp" line="580"/>
<source>This usually indicates your are currently using a pre-release version of LameXP.</source>
<translation type="unfinished">To wskazuje na to, że posiadasz wersję alfa LameXP.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="865"/>
+ <location filename="../../src/Dialog_Update.cpp" line="873"/>
<source>Update is being downloaded, please be patient...</source>
<translation type="unfinished">Pobieranie aktualizacji w toku, prosze czekać...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="910"/>
+ <location filename="../../src/Dialog_Update.cpp" line="918"/>
<source>Update ready to install. Applicaion will quit...</source>
<translation type="unfinished">Aktualizacja gotowa do instalacji. Teraz program zostanie zamknięty...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="918"/>
+ <location filename="../../src/Dialog_Update.cpp" line="926"/>
<source>Update failed. Please try again or download manually!</source>
<translation type="unfinished">Aktualizacja zakończona niepowodzeniem. Prosze spróbować ponownie lub zainstalować ręcznie!</translation>
</message>
<context>
<name>QApplication</name>
<message>
- <location filename="../../src/Global.cpp" line="935"/>
+ <location filename="../../src/Global.cpp" line="1013"/>
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
<translation>EXE-filen '%1' stöder inte Windows kompatibilitetsläge.</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1188"/>
+ <location filename="../../src/Global.cpp" line="1266"/>
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
<translation>EXE-filen '%1' kräver Qt v%2, du har Qt v%3.</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1193"/>
+ <location filename="../../src/Global.cpp" line="1271"/>
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
<translation>EXE-filen '%1' är byggd för Qt '%2', du har Qt '%3'.</translation>
</message>
<message>
- <location filename="../../src/Global.cpp" line="1207"/>
- <location filename="../../src/Global.cpp" line="1234"/>
+ <location filename="../../src/Global.cpp" line="1283"/>
<source>Executable '%1' requires Windows XP or later.</source>
<translation type="unfinished"></translation>
</message>
<translation>Stäng</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="263"/>
- <location filename="../../src/Dialog_Update.cpp" line="540"/>
+ <location filename="../../src/Dialog_Update.cpp" line="276"/>
+ <location filename="../../src/Dialog_Update.cpp" line="548"/>
<source>Build</source>
<translation>Build</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="264"/>
+ <location filename="../../src/Dialog_Update.cpp" line="277"/>
<source>Unknown</source>
<translation>Okänd</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="372"/>
+ <location filename="../../src/Dialog_Update.cpp" line="385"/>
<source>Testing your internet connection, please wait...</source>
<translation>Kontrollerar iInternetanslutningen, vänta...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="392"/>
- <location filename="../../src/Dialog_Update.cpp" line="984"/>
+ <location filename="../../src/Dialog_Update.cpp" line="400"/>
+ <location filename="../../src/Dialog_Update.cpp" line="987"/>
<source>It appears that the computer currently is offline!</source>
<translation>Datorn verkar inte vara ansluten till Internet!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="395"/>
- <location filename="../../src/Dialog_Update.cpp" line="987"/>
+ <location filename="../../src/Dialog_Update.cpp" line="403"/>
+ <location filename="../../src/Dialog_Update.cpp" line="990"/>
<source>Please make sure your computer is connected to the internet and try again.</source>
<translation>Tillse att datorn är ansluten till Internet och försök igen.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="453"/>
+ <location filename="../../src/Dialog_Update.cpp" line="461"/>
<source>Network connectivity test has failed!</source>
<translation>Anslutningskontrollen misslyckades!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="456"/>
+ <location filename="../../src/Dialog_Update.cpp" line="464"/>
<source>Please make sure your internet connection is working properly and try again.</source>
<translation>Tillse att Internetuppkopplingen fungerar korrekt och försök igen.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="470"/>
+ <location filename="../../src/Dialog_Update.cpp" line="478"/>
<source>Checking for new updates online, please wait...</source>
<translation>Söker nya uppdateringar, vänta...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="525"/>
+ <location filename="../../src/Dialog_Update.cpp" line="533"/>
<source>Failed to fetch update information from server!</source>
<translation>Kunde inte hämta uppdateringsinformation från servern!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="530"/>
+ <location filename="../../src/Dialog_Update.cpp" line="538"/>
<source>Sorry, the update server might be busy at this time. Plase try again later.</source>
<translation>Uppdateringsservern kan vara upptagen. Försök senare.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="542"/>
+ <location filename="../../src/Dialog_Update.cpp" line="550"/>
<source>More information available at:</source>
<translation>Mer information hittas på:</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="548"/>
+ <location filename="../../src/Dialog_Update.cpp" line="556"/>
<source>A new version of LameXP is available!</source>
<translation>En ny version av LameXP finns tillgänglig!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="550"/>
+ <location filename="../../src/Dialog_Update.cpp" line="558"/>
<source>We highly recommend all users to install this update as soon as possible.</source>
<translation>Vi rekommenderar alla användare att installera denna uppdatering så snart som möjligt.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="559"/>
+ <location filename="../../src/Dialog_Update.cpp" line="567"/>
<source>No new updates available at this time.</source>
<translation>Det finns inga nya uppdateringar.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="561"/>
+ <location filename="../../src/Dialog_Update.cpp" line="569"/>
<source>Your version of LameXP is still up-to-date. Please check for updates regularly!</source>
<translation>Din version av LameXP är uppdaterad. Kontrollera regelbundet!</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="570"/>
+ <location filename="../../src/Dialog_Update.cpp" line="578"/>
<source>Your version appears to be newer than the latest release.</source>
<translation>Din version verkar vara nyare än senaste 'Release'.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="572"/>
+ <location filename="../../src/Dialog_Update.cpp" line="580"/>
<source>This usually indicates your are currently using a pre-release version of LameXP.</source>
<translation>Det innebär normalt att du använder en beta-version av LameXP.</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="865"/>
+ <location filename="../../src/Dialog_Update.cpp" line="873"/>
<source>Update is being downloaded, please be patient...</source>
<translation>Uppdatering laddas ner, vänta...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="910"/>
+ <location filename="../../src/Dialog_Update.cpp" line="918"/>
<source>Update ready to install. Applicaion will quit...</source>
<translation>Uppdatering klar att installeras. Programmet kommer att avslutas...</translation>
</message>
<message>
- <location filename="../../src/Dialog_Update.cpp" line="918"/>
+ <location filename="../../src/Dialog_Update.cpp" line="926"/>
<source>Update failed. Please try again or download manually!</source>
<translation>Uppdateringen misslyckades. Försök igen, eller ladda ner manuellt!</translation>
</message>
+++ /dev/null
-@echo off
-REM ---------------------------
-call "..\Deployment\_paths.bat"
-if exist "%PATH_QTMSVC%\bin\qtenv2.bat" call "%PATH_QTMSVC%\bin\qtenv2.bat"
-if exist "%PATH_QTMSVC%\bin\qtvars.bat" call "%PATH_QTMSVC%\bin\qtvars.bat"
-REM ---------------------------
-for %%f in (LameXP_??.ts) do (
- lrelease.exe %%f -qm ..\..\res\localization\%%~nf.qm
-)
-REM ---------------------------
-pause
#define VER_LAMEXP_MINOR_LO 9
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 3
-#define VER_LAMEXP_BUILD 1403
+#define VER_LAMEXP_BUILD 1407
#define VER_LAMEXP_CONFG 1348
///////////////////////////////////////////////////////////////////////////////
const char* LAMEXP_DEFAULT_LANGID = "en";
const char* LAMEXP_DEFAULT_TRANSLATION = "LameXP_EN.qm";
+//Known Windows versions - maps marketing names to the actual Windows NT versions
+const lamexp_os_version_t lamexp_winver_win2k = {5,0};
+const lamexp_os_version_t lamexp_winver_winxp = {5,1};
+const lamexp_os_version_t lamexp_winver_xpx64 = {5,2};
+const lamexp_os_version_t lamexp_winver_vista = {6,0};
+const lamexp_os_version_t lamexp_winver_win70 = {6,1};
+const lamexp_os_version_t lamexp_winver_win80 = {6,2};
+const lamexp_os_version_t lamexp_winver_win81 = {6,3};
+
///////////////////////////////////////////////////////////////////////////////
// COMPILER INFO
///////////////////////////////////////////////////////////////////////////////
return g_lamexp_version_date;
}
-static bool lamexp_verify_os_version(const DWORD major, const DWORD minor, const BYTE opMajor, const BYTE opMinor)
+static bool lamexp_verify_os_version(const DWORD major, const DWORD minor)
{
- qDebug("checkOsVersion %u.%u (%u,%u)\n", major, minor, (unsigned int)opMajor, (unsigned int)opMinor);
-
- OSVERSIONINFOEX osvi;
+ OSVERSIONINFOEXW osvi;
DWORDLONG dwlConditionMask = 0;
- //Initialize the OSVERSIONINFOEX structure.
- memset(&osvi, 0, sizeof(OSVERSIONINFOEX));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ //Initialize the OSVERSIONINFOEX structure
+ memset(&osvi, 0, sizeof(OSVERSIONINFOEXW));
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
osvi.dwMajorVersion = major;
osvi.dwMinorVersion = minor;
osvi.dwPlatformId = VER_PLATFORM_WIN32_NT;
//Initialize the condition mask
- VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, opMajor);
- VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, opMinor);
+ VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(dwlConditionMask, VER_PLATFORMID, VER_EQUAL);
// Perform the test
- const BOOL ret = VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_PLATFORMID, dwlConditionMask);
+ const BOOL ret = VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_PLATFORMID, dwlConditionMask);
//Error checking
if(!ret)
*/
static bool lamexp_get_real_os_version(unsigned int *major, unsigned int *minor)
{
- *major = *minor = UINT_MAX;
+ *major = *minor = 0;
- //Determine the *major* version first
- for(DWORD i = 3; i < 100; i++)
+ //Initialize local variables
+ OSVERSIONINFOEXW osvi;
+ memset(&osvi, 0, sizeof(OSVERSIONINFOEXW));
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
+
+ //Try GetVersionEx() first
+ if(GetVersionExW((LPOSVERSIONINFOW)&osvi) != FALSE)
{
- if(lamexp_verify_os_version(i, 0, VER_GREATER_EQUAL, VER_GREATER_EQUAL))
+ if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
- *major = i;
- continue;
+ *major = osvi.dwMajorVersion;
+ *minor = osvi.dwMinorVersion;
}
- break;
}
- //Now also determine the *minor* version
- if((*major) != UINT_MAX)
+ //Determine the real *major* version first
+ forever
{
- for(DWORD i = 0; i < 100; i++)
+ const DWORD nextMajor = (*major) + 1;
+ if(lamexp_verify_os_version(nextMajor, 0))
{
- if(lamexp_verify_os_version((*major), i, VER_EQUAL, VER_GREATER_EQUAL))
- {
- *minor = i;
- continue;
- }
- break;
+ *major = nextMajor;
+ *minor = 0;
+ continue;
}
+ break;
}
- //Check for completeness
- if(((*major) == UINT_MAX) || ((*minor) == UINT_MAX))
+ //Now also determine the real *minor* version
+ forever
{
- *major = *minor = 0;
- return false;
+ const DWORD nextMinor = (*minor) + 1;
+ if(lamexp_verify_os_version((*major), nextMinor))
+ {
+ *minor = nextMinor;
+ continue;
+ }
+ break;
}
- return true;
+ return ((*major) > 0);
}
/*
* Get the native operating system version
*/
-const lamexp_os_version_t *lamexp_get_os_version(void)
+const lamexp_os_version_t &lamexp_get_os_version(void)
{
QReadLocker readLock(&g_lamexp_os_version.lock);
//Already initialized?
if(g_lamexp_os_version.bInitialized)
{
- return &g_lamexp_os_version.version;
+ return g_lamexp_os_version.version;
}
readLock.unlock();
}
}
- return &g_lamexp_os_version.version;
+ return g_lamexp_os_version.version;
}
/*
#endif
//Check the Windows version
- const lamexp_os_version_t *osVersionNo = lamexp_get_os_version();
- if(LAMEXP_MAX_OS_VER(osVersionNo, 5, 0))
+ const lamexp_os_version_t &osVersionNo = lamexp_get_os_version();
+ if(osVersionNo < lamexp_winver_winxp)
{
qFatal("%s", QApplication::tr("Executable '%1' requires Windows XP or later.").arg(executableName).toLatin1().constData());
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 5, 1))
+
+ //Check for compat mode
+ if(osVersionNo == lamexp_winver_winxp)
{
qDebug("Running on Windows XP.\n");
lamexp_check_compatibility_mode("GetLargePageMinimum", executableName);
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 5, 2))
+ else if(osVersionNo == lamexp_winver_xpx64)
{
qDebug("Running on Windows Server 2003 or Windows XP x64-Edition.\n");
lamexp_check_compatibility_mode("GetLocaleInfoEx", executableName);
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 6, 0))
+ else if(osVersionNo == lamexp_winver_vista)
{
qDebug("Running on Windows Vista or Windows Server 2008.\n");
lamexp_check_compatibility_mode("CreateRemoteThreadEx", executableName);
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 6, 1))
+ else if(osVersionNo == lamexp_winver_win70)
{
qDebug("Running on Windows 7 or Windows Server 2008 R2.\n");
lamexp_check_compatibility_mode("CreateFile2", executableName);
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 6, 2))
+ else if(osVersionNo == lamexp_winver_win80)
{
qDebug("Running on Windows 8 or Windows Server 2012.\n");
- lamexp_check_compatibility_mode(NULL, executableName);
+ lamexp_check_compatibility_mode("FindPackagesByPackageFamily", executableName);
}
- else if(LAMEXP_EQL_OS_VER(osVersionNo, 6, 3))
+ else if(osVersionNo == lamexp_winver_win81)
{
qDebug("Running on Windows 8.1 or Windows Server 2012 R2.\n");
lamexp_check_compatibility_mode(NULL, executableName);
}
else
{
- qWarning("Running on an unknown/untested WindowsNT-based OS (v%u.%u).\n", osVersionNo->versionMajor, osVersionNo->versionMinor);
+ const QString message = QString().sprintf("Running on an unknown WindowsNT-based system (v%u.%u).", osVersionNo.versionMajor, osVersionNo.versionMinor);
+ qWarning("%s\n", message.toUtf8().constData());
+ MessageBoxW(NULL, QWCHAR(message), L"LameXP", MB_OK | MB_TOPMOST | MB_ICONWARNING);
}
//Check for Wine
if(!g_lamexp_themes_enabled.bInitialized)
{
g_lamexp_themes_enabled.bThemesEnabled = false;
- const lamexp_os_version_t * osVersion = lamexp_get_os_version();
- if(LAMEXP_MIN_OS_VER(osVersion, 5, 1))
+ const lamexp_os_version_t &osVersion = lamexp_get_os_version();
+ if(osVersion >= lamexp_winver_winxp)
{
IsAppThemedFun IsAppThemedPtr = NULL;
QLibrary uxTheme(QString("%1/UxTheme.dll").arg(lamexp_known_folder(lamexp_folder_systemfolder)));
lamexp_event_t;
//OS version number
-typedef struct
+typedef struct _lamexp_os_version_t
{
unsigned int versionMajor;
unsigned int versionMinor;
+
+ //comparision operators
+ inline bool operator== (const _lamexp_os_version_t &rhs) const { return (versionMajor == rhs.versionMajor) && (versionMinor == rhs.versionMinor); }
+ inline bool operator!= (const _lamexp_os_version_t &rhs) const { return (versionMajor != rhs.versionMajor) || (versionMinor != rhs.versionMinor); }
+ inline bool operator> (const _lamexp_os_version_t &rhs) const { return (versionMajor > rhs.versionMajor) || ((versionMajor == rhs.versionMajor) && (versionMinor > rhs.versionMinor)); }
+ inline bool operator>= (const _lamexp_os_version_t &rhs) const { return (versionMajor > rhs.versionMajor) || ((versionMajor == rhs.versionMajor) && (versionMinor >= rhs.versionMinor)); }
+ inline bool operator< (const _lamexp_os_version_t &rhs) const { return (versionMajor < rhs.versionMajor) || ((versionMajor == rhs.versionMajor) && (versionMinor < rhs.versionMinor)); }
+ inline bool operator<= (const _lamexp_os_version_t &rhs) const { return (versionMajor < rhs.versionMajor) || ((versionMajor == rhs.versionMajor) && (versionMinor <= rhs.versionMinor)); }
}
lamexp_os_version_t;
+//Known Windows versions
+extern const lamexp_os_version_t lamexp_winver_win2k;
+extern const lamexp_os_version_t lamexp_winver_winxp;
+extern const lamexp_os_version_t lamexp_winver_xpx64;
+extern const lamexp_os_version_t lamexp_winver_vista;
+extern const lamexp_os_version_t lamexp_winver_win70;
+extern const lamexp_os_version_t lamexp_winver_win80;
+extern const lamexp_os_version_t lamexp_winver_win81;
+
//Beep types
typedef enum
{
const char *lamexp_website_url(void);
const char *lamexp_mulders_url(void);
const char *lamexp_support_url(void);
-const lamexp_os_version_t *lamexp_get_os_version(void);
+const lamexp_os_version_t &lamexp_get_os_version(void);
bool lamexp_detect_wine(void);
//Public functions
#define LAMEXP_DELETE_ARRAY(PTR) do { if(PTR) { delete [] PTR; PTR = NULL; } } while(0)
#define LAMEXP_SAFE_FREE(PTR) do { if(PTR) { free((void*) PTR); PTR = NULL; } } while(0)
#define LAMEXP_CLOSE(HANDLE) do { if(HANDLE != NULL && HANDLE != INVALID_HANDLE_VALUE) { CloseHandle(HANDLE); HANDLE = NULL; } } while(0)
-#define LAMEXP_MIN_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor > (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor >= (VER_MIN))))
-#define LAMEXP_MAX_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor < (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor <= (VER_MIN))))
-#define LAMEXP_EQL_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor == (VER_MIN)))
#define QWCHAR(STR) reinterpret_cast<const wchar_t*>((STR).utf16())
#define WCHAR2QSTR(STR) QString::fromUtf16(reinterpret_cast<const unsigned short*>(STR))
#define LAMEXP_BOOL2STR(X) (X ? "1" : "0")
{
if(s_findFirstFileExInfoLevel == INT_MAX)
{
- const lamexp_os_version_t *osVersionNo = lamexp_get_os_version();
- s_findFirstFileExInfoLevel = LAMEXP_MIN_OS_VER(osVersionNo, 6, 1) ? FindExInfoBasic : FindExInfoStandard;
+ const lamexp_os_version_t &osVersionNo = lamexp_get_os_version();
+ s_findFirstFileExInfoLevel = (osVersionNo >= lamexp_winver_win70) ? FindExInfoBasic : FindExInfoStandard;
}
WIN32_FIND_DATAW findData;