Make sure the user has "admin" privileges before checking for updates, because it's kind of pointless to download the update if you won't be able install it anyway. This is especially important for Windows XP, where we don't have UAC. Note that UAC implies "admin" privileges, because the installer process will be elevated as needed - even if the current user is *not* an administrator.

This commit is contained in:
LoRd_MuldeR 2013-12-16 18:07:45 +01:00
parent f6a5ebbde6
commit 0b1644e287
29 changed files with 351 additions and 90 deletions

View File

@ -3310,22 +3310,22 @@
<context>
<name>QApplication</name>
<message>
<location filename="../../src/Global_Win32.cpp" line="1057"/>
<location filename="../../src/Global_Win32.cpp" line="1063"/>
<source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="999"/>
<location filename="../../src/Global_Win32.cpp" line="1005"/>
<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_Win32.cpp" line="1004"/>
<location filename="../../src/Global_Win32.cpp" line="1010"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="1016"/>
<location filename="../../src/Global_Win32.cpp" line="1022"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished"></translation>
</message>
@ -3394,104 +3394,124 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="170"/>
<location filename="../../src/Dialog_Update.cpp" line="351"/>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="364"/>
<source>Build</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="172"/>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="280"/>
<location filename="../../src/Dialog_Update.cpp" line="256"/>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="257"/>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="293"/>
<source>Testing your internet connection, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="301"/>
<location filename="../../src/Dialog_Update.cpp" line="314"/>
<source>It appears that the computer currently is offline!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="302"/>
<location filename="../../src/Dialog_Update.cpp" line="307"/>
<location filename="../../src/Dialog_Update.cpp" line="315"/>
<location filename="../../src/Dialog_Update.cpp" line="320"/>
<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="306"/>
<location filename="../../src/Dialog_Update.cpp" line="319"/>
<source>Network connectivity test has failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="283"/>
<location filename="../../src/Dialog_Update.cpp" line="296"/>
<source>Checking for new updates online, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="311"/>
<location filename="../../src/Dialog_Update.cpp" line="324"/>
<source>Failed to fetch update information from server!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="312"/>
<location filename="../../src/Dialog_Update.cpp" line="325"/>
<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="350"/>
<location filename="../../src/Dialog_Update.cpp" line="363"/>
<source>More information available at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="286"/>
<location filename="../../src/Dialog_Update.cpp" line="299"/>
<source>A new version of LameXP is available!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="277"/>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Ignore</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="290"/>
<source>Initializing, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="287"/>
<location filename="../../src/Dialog_Update.cpp" line="300"/>
<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="291"/>
<location filename="../../src/Dialog_Update.cpp" line="304"/>
<source>No new updates available at this time.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="292"/>
<location filename="../../src/Dialog_Update.cpp" line="305"/>
<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="296"/>
<location filename="../../src/Dialog_Update.cpp" line="309"/>
<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="297"/>
<location filename="../../src/Dialog_Update.cpp" line="310"/>
<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="379"/>
<location filename="../../src/Dialog_Update.cpp" line="392"/>
<source>Update is being downloaded, please be patient...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="426"/>
<location filename="../../src/Dialog_Update.cpp" line="439"/>
<source>Update ready to install. Applicaion will quit...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="434"/>
<location filename="../../src/Dialog_Update.cpp" line="447"/>
<source>Update failed. Please try again or download manually!</source>
<translation type="unfinished"></translation>
</message>

View File

@ -2024,7 +2024,7 @@
</message>
<message>
<source>APE</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
<context>
@ -2743,5 +2743,21 @@
<source>Initializing, please wait...</source>
<translation>Initialisiere, bitte warten...</translation>
</message>
<message>
<source>Discard</source>
<translation>Schließen</translation>
</message>
<message>
<source>Ignore</source>
<translation>Ignorieren</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation>Ausschließlich Benutzer der &quot;Administratoren&quot; Gruppe können Updates installieren.</translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation>Bitte starten Sie den Update-Prozess aus einem Administrator-Konto erneut!</translation>
</message>
</context>
</TS>

View File

@ -2742,5 +2742,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">Iniciando, espere por favor...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished">Ignorar</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2753,5 +2753,21 @@ Ouvrir le dossier récursivement...</translation>
<source>Initializing, please wait...</source>
<translation type="unfinished">Initialisation, patientez...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Abandonner</translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished">Ignorer</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2743,5 +2743,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">Inizializzazione, attendere prego...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Annulla</translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished">Ignora</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2725,5 +2725,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">, ...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3347,22 +3347,22 @@
<context>
<name>QApplication</name>
<message>
<location filename="../../src/Global_Win32.cpp" line="1057"/>
<location filename="../../src/Global_Win32.cpp" line="1063"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="999"/>
<location filename="../../src/Global_Win32.cpp" line="1005"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="1004"/>
<location filename="../../src/Global_Win32.cpp" line="1010"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="1016"/>
<location filename="../../src/Global_Win32.cpp" line="1022"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished">Plik wykonywalny &quot;%1&quot; wymaga Windows XP lub nowszego.</translation>
</message>
@ -3431,104 +3431,124 @@
<translation type="unfinished">Zamknij</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="170"/>
<location filename="../../src/Dialog_Update.cpp" line="351"/>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="364"/>
<source>Build</source>
<translation type="unfinished">Build</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="172"/>
<source>Unknown</source>
<translation type="unfinished">Nieznana</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="280"/>
<location filename="../../src/Dialog_Update.cpp" line="256"/>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="257"/>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="293"/>
<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="301"/>
<location filename="../../src/Dialog_Update.cpp" line="314"/>
<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="302"/>
<location filename="../../src/Dialog_Update.cpp" line="307"/>
<location filename="../../src/Dialog_Update.cpp" line="315"/>
<location filename="../../src/Dialog_Update.cpp" line="320"/>
<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="306"/>
<location filename="../../src/Dialog_Update.cpp" line="319"/>
<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="283"/>
<location filename="../../src/Dialog_Update.cpp" line="296"/>
<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="311"/>
<location filename="../../src/Dialog_Update.cpp" line="324"/>
<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="312"/>
<location filename="../../src/Dialog_Update.cpp" line="325"/>
<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="350"/>
<location filename="../../src/Dialog_Update.cpp" line="363"/>
<source>More information available at:</source>
<translation type="unfinished">Więcej informacji tutaj:</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="286"/>
<location filename="../../src/Dialog_Update.cpp" line="299"/>
<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="277"/>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Ignore</source>
<translation type="unfinished">Ignoruj</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="290"/>
<source>Initializing, please wait...</source>
<translation type="unfinished">Inicjowanie, prosze czekać...</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="287"/>
<location filename="../../src/Dialog_Update.cpp" line="300"/>
<source>We highly recommend all users to install this update as soon as possible.</source>
<translation type="unfinished">Jest wysoce zalecane aby zainstalować aktualizację jak najszybciej.</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="291"/>
<location filename="../../src/Dialog_Update.cpp" line="304"/>
<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="292"/>
<location filename="../../src/Dialog_Update.cpp" line="305"/>
<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="296"/>
<location filename="../../src/Dialog_Update.cpp" line="309"/>
<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="297"/>
<location filename="../../src/Dialog_Update.cpp" line="310"/>
<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="379"/>
<location filename="../../src/Dialog_Update.cpp" line="392"/>
<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="426"/>
<location filename="../../src/Dialog_Update.cpp" line="439"/>
<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="434"/>
<location filename="../../src/Dialog_Update.cpp" line="447"/>
<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>

View File

@ -2768,5 +2768,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">Инициализация, пожалуйста, подождите...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Отменить</translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished">Игнорировать</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3330,22 +3330,22 @@
<context>
<name>QApplication</name>
<message>
<location filename="../../src/Global_Win32.cpp" line="1057"/>
<location filename="../../src/Global_Win32.cpp" line="1063"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="999"/>
<location filename="../../src/Global_Win32.cpp" line="1005"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="1004"/>
<location filename="../../src/Global_Win32.cpp" line="1010"/>
<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>
</message>
<message>
<location filename="../../src/Global_Win32.cpp" line="1016"/>
<location filename="../../src/Global_Win32.cpp" line="1022"/>
<source>Executable &apos;%1&apos; requires Windows XP or later.</source>
<translation type="unfinished"></translation>
</message>
@ -3414,104 +3414,124 @@
<translation>Stäng</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="170"/>
<location filename="../../src/Dialog_Update.cpp" line="351"/>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="364"/>
<source>Build</source>
<translation>Build</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="171"/>
<location filename="../../src/Dialog_Update.cpp" line="172"/>
<source>Unknown</source>
<translation>Okänd</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="280"/>
<location filename="../../src/Dialog_Update.cpp" line="256"/>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="257"/>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="293"/>
<source>Testing your internet connection, please wait...</source>
<translation>Kontrollerar iInternetanslutningen, vänta...</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="301"/>
<location filename="../../src/Dialog_Update.cpp" line="314"/>
<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="302"/>
<location filename="../../src/Dialog_Update.cpp" line="307"/>
<location filename="../../src/Dialog_Update.cpp" line="315"/>
<location filename="../../src/Dialog_Update.cpp" line="320"/>
<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="306"/>
<location filename="../../src/Dialog_Update.cpp" line="319"/>
<source>Network connectivity test has failed!</source>
<translation>Anslutningskontrollen misslyckades!</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="283"/>
<location filename="../../src/Dialog_Update.cpp" line="296"/>
<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="311"/>
<location filename="../../src/Dialog_Update.cpp" line="324"/>
<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="312"/>
<location filename="../../src/Dialog_Update.cpp" line="325"/>
<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="350"/>
<location filename="../../src/Dialog_Update.cpp" line="363"/>
<source>More information available at:</source>
<translation>Mer information hittas :</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="286"/>
<location filename="../../src/Dialog_Update.cpp" line="299"/>
<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="277"/>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Discard</source>
<translation type="unfinished">Stäng</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="258"/>
<source>Ignore</source>
<translation type="unfinished">Ignorera</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="290"/>
<source>Initializing, please wait...</source>
<translation type="unfinished">Initierar, vänta...</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="287"/>
<location filename="../../src/Dialog_Update.cpp" line="300"/>
<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 snart som möjligt.</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="291"/>
<location filename="../../src/Dialog_Update.cpp" line="304"/>
<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="292"/>
<location filename="../../src/Dialog_Update.cpp" line="305"/>
<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="296"/>
<location filename="../../src/Dialog_Update.cpp" line="309"/>
<source>Your version appears to be newer than the latest release.</source>
<translation>Din version verkar vara nyare än senaste &apos;Release&apos;.</translation>
</message>
<message>
<location filename="../../src/Dialog_Update.cpp" line="297"/>
<location filename="../../src/Dialog_Update.cpp" line="310"/>
<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="379"/>
<location filename="../../src/Dialog_Update.cpp" line="392"/>
<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="426"/>
<location filename="../../src/Dialog_Update.cpp" line="439"/>
<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="434"/>
<location filename="../../src/Dialog_Update.cpp" line="447"/>
<source>Update failed. Please try again or download manually!</source>
<translation>Uppdateringen misslyckades. Försök igen, eller ladda ner manuellt!</translation>
</message>

View File

@ -2724,5 +2724,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">,...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2761,5 +2761,21 @@
<source>Initializing, please wait...</source>
<translation type="unfinished">Ініціалізація, будь ласка, зачекайте...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished">Ігнорувати</translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2724,5 +2724,21 @@
<source>Initializing, please wait...</source>
<translation>,...</translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorry, but only users in the &quot;Administrators&quot; group can install updates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start application from an administrator account and try again!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -99,6 +99,7 @@
<file>icons/script_go.png</file>
<file>icons/server_error.png</file>
<file>icons/shield_admin.png</file>
<file>icons/shield_blue.png</file>
<file>icons/shield_error.png</file>
<file>icons/shield_exclamation.png</file>
<file>icons/shield_green.png</file>

BIN
res/icons/shield_blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 9
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 10
#define VER_LAMEXP_BUILD 1507
#define VER_LAMEXP_BUILD 1511
#define VER_LAMEXP_CONFG 1348
///////////////////////////////////////////////////////////////////////////////

View File

@ -41,6 +41,7 @@
#include <QUrl>
#include <QCloseEvent>
#include <QMovie>
#include <QMessageBox>
///////////////////////////////////////////////////////////////////////////////
@ -238,8 +239,7 @@ void UpdateDialog::updateInit(void)
{
setMinimumSize(size());
setMaximumHeight(height());
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
checkForUpdates();
QTimer::singleShot(0, this, SLOT(checkForUpdates()));
}
void UpdateDialog::checkForUpdates(void)
@ -249,6 +249,19 @@ void UpdateDialog::checkForUpdates(void)
qWarning("Update in progress, cannot check for updates now!");
}
if(!lamexp_user_is_admin())
{
qWarning("User is not in the \"admin\" group, cannot update!");
QString message;
message += QString("<nobr>%1</nobr><br>").arg(tr("Sorry, but only users in the \"Administrators\" group can install updates."));
message += QString("<nobr>%1</nobr>").arg(tr("Please start application from an administrator account and try again!"));
if(QMessageBox::critical(this, this->windowTitle(), message, tr("Discard"), tr("Ignore")) != 1)
{
ui->closeButton->setEnabled(true);
close(); return;
}
}
WinSevenTaskbar::setTaskbarState(this->parentWidget(), WinSevenTaskbar::WinSevenTaskbarNormalState);
WinSevenTaskbar::setOverlayIcon(this->parentWidget(), &QIcon(":/icons/transmit_blue.png"));
@ -294,7 +307,7 @@ void UpdateDialog::threadStatusChanged(const int status)
break;
case UpdateCheckThread::UpdateStatus_CompletedNewVersionOlder:
ui->statusLabel->setText(tr("Your version appears to be newer than the latest release."));
SHOW_HINT(tr("This usually indicates your are currently using a pre-release version of LameXP."), ":/icons/shield_error.png");
SHOW_HINT(tr("This usually indicates your are currently using a pre-release version of LameXP."), ":/icons/shield_blue.png");
UPDATE_TASKBAR(WinSevenTaskbar::WinSevenTaskbarNormalState, ":/icons/shield_error.png");
break;
case UpdateCheckThread::UpdateStatus_ErrorNoConnection:

View File

@ -229,6 +229,7 @@ QString lamexp_translation_name(const QString &language);
bool lamexp_translation_register(const QString &langId, const QString &qmFile, const QString &langName, unsigned int &systemId, unsigned int &country);
unsigned int lamexp_translation_sysid(const QString &langId);
bool lamexp_update_sysmenu(const QWidget *win, const unsigned int identifier, const QString &text);
bool lamexp_user_is_admin(void);
const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString *tag = NULL);
const char *lamexp_version_arch(void);
unsigned int lamexp_version_build(void);

View File

@ -892,13 +892,14 @@ static bool lamexp_event_filter(void *message, long *result)
/*
* Check for process elevation
*/
static bool lamexp_check_elevation(void)
static bool lamexp_process_is_elevated(bool *bIsUacEnabled = NULL)
{
typedef enum { lamexp_token_elevationType_class = 18, lamexp_token_elevation_class = 20 } LAMEXP_TOKEN_INFORMATION_CLASS;
typedef enum { lamexp_elevationType_default = 1, lamexp_elevationType_full, lamexp_elevationType_limited } LAMEXP_TOKEN_ELEVATION_TYPE;
HANDLE hToken = NULL;
bool bIsProcessElevated = false;
if(bIsUacEnabled) *bIsUacEnabled = false;
HANDLE hToken = NULL;
if(OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
{
@ -916,9 +917,14 @@ static bool lamexp_check_elevation(void)
case lamexp_elevationType_full:
qWarning("Process token elevation type: Full -> potential security risk!\n");
bIsProcessElevated = true;
if(bIsUacEnabled) *bIsUacEnabled = true;
break;
case lamexp_elevationType_limited:
qDebug("Process token elevation type: Limited -> not elevated.\n");
if(bIsUacEnabled) *bIsUacEnabled = true;
break;
default:
qWarning("Unknown tokenElevationType value: %d", tokenElevationType);
break;
}
}
@ -930,7 +936,7 @@ static bool lamexp_check_elevation(void)
qWarning("Failed to open process token!");
}
return !bIsProcessElevated;
return bIsProcessElevated;
}
/*
@ -1098,7 +1104,7 @@ bool lamexp_init_qt(int argc, char* argv[])
lamexp_translation_init();
//Check for process elevation
if((!lamexp_check_elevation()) && (!lamexp_detect_wine()))
if(lamexp_process_is_elevated() && (!lamexp_detect_wine()))
{
QMessageBox messageBox(QMessageBox::Warning, "LameXP", "<nobr>LameXP was started with 'elevated' rights, altough LameXP does not need these rights.<br>Running an applications with unnecessary rights is a potential security risk!</nobr>", QMessageBox::NoButton, NULL, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowStaysOnTopHint);
messageBox.addButton("Quit Program (Recommended)", QMessageBox::NoRole);
@ -1852,15 +1858,15 @@ bool lamexp_bring_process_to_front(const unsigned long pid)
}
/*
* Check the network connection status
* Check the network connectivity status
*/
int lamexp_network_status(void)
{
DWORD dwFlags;
const BOOL ret = (IsNetworkAlive(&dwFlags) == TRUE);
const BOOL ret = IsNetworkAlive(&dwFlags);
if(GetLastError() == 0)
{
return (ret == TRUE) ? lamexp_network_yes : lamexp_network_non;
return (ret != FALSE) ? lamexp_network_yes : lamexp_network_non;
}
return lamexp_network_err;
}
@ -2163,6 +2169,42 @@ QColor lamexp_system_color(const int color_id)
return color;
}
/*
* Check if the current user is in the "admin" group (up to and including Windows XP only)
*/
bool lamexp_user_is_admin(void)
{
bool isAdmin = false;
//Check for process elevation and UAC first!
if(lamexp_process_is_elevated(&isAdmin))
{
qWarning("Process is elevated -> user is admin!");
return true;
}
//If not elevated and UAC is not available -> user must be in admin group!
if(!isAdmin)
{
qDebug("UAC is disabled/unavailable -> checking for Administrators group");
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
if(AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup))
{
BOOL b = FALSE;
if(CheckTokenMembership(NULL, AdministratorsGroup, &b))
{
if(b) isAdmin = true;
}
FreeSid(AdministratorsGroup);
}
}
return isAdmin;
}
/*
* Fatal application exit
*/