diff --git a/checker/TODO.md b/checker/TODO.md index 82703a0..2321826 100644 --- a/checker/TODO.md +++ b/checker/TODO.md @@ -93,9 +93,10 @@ DONE -> Updater: Create a "updating" file at start then delete it at the end. Th ## 1.02 DONE -> Force installer to make a folder named "Rise of Mankind - A New Dawn" and to decompress into "Mods/" folder + Check the folder name at start -DONE - Possibility to use the default color (!?) +DONE -> Possibility to use the default color (!?) DONE -> GUI to exclude files -- Drop support for Sinhala (unmaintened and less than 1% translated) +DONE -> Drop support for Sinhala (unmaintened and less than 1% translated) +DONE -> Add a function to reset the mod in the default state ## Pending ? - Fix the weird updating loop !? diff --git a/checker/f_check.cpp b/checker/f_check.cpp index b9401f1..8419981 100644 --- a/checker/f_check.cpp +++ b/checker/f_check.cpp @@ -119,6 +119,22 @@ bool f_check::ActionUpdate() return 0; } +bool f_check::ActionReset() +{ + #ifdef _WIN32 + QProcess update; + update.startDetached("upd_proc.exe reset"); + QApplication::quit(); + #endif + #ifdef __linux + QProcess update; + update.startDetached("upd_proc reset"); + QApplication::quit(); + #endif + + return 0; +} + int f_check::GetLocalVersion() { //** Get version number from "Assets/Python/Contrib/CvModName.py" diff --git a/checker/f_check.h b/checker/f_check.h index 86bebe7..2893c80 100644 --- a/checker/f_check.h +++ b/checker/f_check.h @@ -28,6 +28,7 @@ class f_check : public QObject bool ActionLauncherUpdate(); bool PrepareUpdate(); bool ActionUpdate(); + bool ActionReset(); int GetLocalVersion(); int GetDistantVersion(); QString ExtractChangelog(QString filepath); diff --git a/checker/lang/installer_es.xml b/checker/lang/installer_es.xml index 6a3e90e..4200f38 100644 --- a/checker/lang/installer_es.xml +++ b/checker/lang/installer_es.xml @@ -2,6 +2,9 @@ Civilización IV: A New Dawn pack de expansión necesario + Versión del lanzador: ${VERSION}\n\nEste asistente le guiará a través de la instalación de Civilization IV: A New Dawn.\n\nEl mod se instalará en \'Mis documentos\My Games\Beyond the Sword\Mods\' de forma predeterminada.\nCreará un acceso directo (opcional) al lanzador mod, que se utilizará para descargar fácilmente, actualizar o configurar la mod instalación.\n\nADVERTENCIA: Cualquier instalación existente del mod es compatible. Sin embargo, si tienes archivos modificadas, puede sobrescribirse sobre actualización del mod. + Programa de instalación instalará el paquete de expansión en la siguiente carpeta. +Para instalarlo en una carpeta diferente, haga clic en \'Examinar...\' y seleccione otra carpeta.$\n$\nNOTA: se recomienda encarecidamente utilizar la carpeta predeterminada seleccionada por debajo. Sin embargo, puede instalar el mod directamente en la carpeta del juego (\'Sid Meier\'s Civilization IV Beyond the Sword\Beyond the Sword\Mods\'). El lanzador está instalado. En el primer lanzamiento, detectará si el mod está presente en el directorio. Si no es así, sólo sigue el procedimiento de instalación. Iniciar el lanzador mod Crear acceso directo del escritorio diff --git a/checker/lang/installer_fr.xml b/checker/lang/installer_fr.xml index 5a73db9..f7ff66b 100644 --- a/checker/lang/installer_fr.xml +++ b/checker/lang/installer_fr.xml @@ -2,6 +2,8 @@ Civilization IV: A New Dawn pack d\'expansion requis + Version du lanceur: ${VERSION}\n\nCet assistant d\'installation va vous guider pour l\'installation de Civilization IV: A New Dawn.\n\nLe mod sera installé dans \'My Documents\My Games\Beyond the Sword\Mods\' par défaut. \nIl va créer un raccourci (option) vers le lanceur, qui sera utilisé pour télécharger, mettre à jour ou configurer l\'installation du mod.\n\nATTENTION : Si le mod est déjà installé, le lanceur pourrait remplacer certains de vos fichiers pendant les mises à jour. + L\'installateur va installer le pack d\'expansion dans le dossier suivant.$\nPour l\'installer dans un dossier différent, cliquez sur \'Parcourir...\' et sélectionnez un autre dossier.$\n$\nNOTE: Il est hautement recommandé d\'utiliser le dossier par défaut sélectionné ci-dessous. Cependant, vous pouvez choisir d\'installer le mod directement dans le dossier du jeu (\'Sid Meier\'s Civilization IV Beyond the Sword\Beyond the Sword\Mods\'). Le lanceur est maintenant installé. Au premier lancement, il va essayer de détecter si le mod est présent dans le répertoire. Si ce n\'est pas le cas, il suffit de suivre la procédure d\'installation. Démarrer le lanceur Créer un raccourci sur le bureau diff --git a/checker/lang/launcher.ts b/checker/lang/launcher.ts index 08cfba1..6cd304b 100644 --- a/checker/lang/launcher.ts +++ b/checker/lang/launcher.ts @@ -9,7 +9,7 @@ - + There seems to be a problem with the previous update. Checking file again. @@ -50,6 +50,19 @@ + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -101,22 +114,22 @@ - + Community - + Addons - + Help us to improve the mod ! - + Language @@ -257,30 +270,50 @@ - + + Reset mod to default state + + + + Check for update - + Update available ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -329,81 +362,91 @@ - Black + Dark blue (default) - Coal + Black - Dark red + Coal - Forest + Dark red - Purple + Forest - Red + Purple - Silver + Red + Silver + + + + Cerulean - + Game path: - + Select game path - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + Close the launcher when game start - + Autostart the mod with the game - + + Exclude files from update + + + + No path specified - + The game path has been changed - + No game path specified. diff --git a/checker/lang/launcher_de.ts b/checker/lang/launcher_de.ts index eb1e053..d35ece5 100644 --- a/checker/lang/launcher_de.ts +++ b/checker/lang/launcher_de.ts @@ -7,7 +7,7 @@ Der Launcher ist nicht im richtigen Verzeichnis. Er sollte entweder in 'Dokumente/My Games/Beyond the sword/Mods/Rise of Mankind - A New Dawn' oder in 'Civilization IV (root game folder)/Beyond the sword/Mods/Rise of Mankind - A New Dawn' sein. - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ Es ist ein Update verfügbar. Möchten Sie updaten? + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ Installation reparieren - + Community Community - + Addons - + Help us to improve the mod ! Hilf uns die Mod zu verbessern! - + Language Sprache @@ -255,30 +268,50 @@ SVN Kommando eingeben - + + Reset mod to default state + + + + Check for update Auf Update überprüfen - + Update available ! Update verfügbar! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) Um das Spiel über den Launcher zu starten muss der Pfad zum Spiel in den Optionen (Optionen > Pfad zum Spiel angeben) angegeben werden - + Cache Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. Der Cache wurde geleert. Achtung: Er wird mit jedem Update automatisch geleert. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -327,81 +360,91 @@ + Dark blue (default) + + + + Black Schwarz - + Coal Kohle - + Dark red Dunkelrot - + Forest Wald - + Purple Lila - + Red Rot - + Silver Silber - + Cerulean Himmelblau - + Game path: Spielpfad: - + Select game path Pfad zum Spiel angeben - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher Konfiguration :</span></p></body></html> - + Close the launcher when game start Den Launcher schließen wenn das Spiel startet - + Autostart the mod with the game Die Mod automatisch mit dem Spiel starten - + + Exclude files from update + + + + No path specified Kein Pfad angegeben - + The game path has been changed Der Spielpfad wurde geändert - + No game path specified. Kein Spielpfad angegeben. diff --git a/checker/lang/launcher_es.ts b/checker/lang/launcher_es.ts index 14eeb2b..51466c0 100644 --- a/checker/lang/launcher_es.ts +++ b/checker/lang/launcher_es.ts @@ -7,7 +7,7 @@ El lanzador no está en el correcto directorio. Debe ser en 'My Documents/My Games/Beyond the sword/Mods/Rise of Mankind - A New Dawn' o en ' Civilization IV (carpeta del juego)/Beyond the sword/Mods/Rise of Mankind - A New Dawn' - + There seems to be a problem with the previous update. Checking file again. Parece haber un problema con la actualización anterior. Revisando el archivo. @@ -32,7 +32,7 @@ files left. - + ficheros restante. @@ -48,6 +48,19 @@ Hay una actualización disponible. ¿Quieres actualizar? + + w_exclusion + + + Choose which files to exclude from update + Seleccione los archivos a excluir de la actualización + + + + File + Archivo + + w_install @@ -99,22 +112,22 @@ Reparar instalación - + Community Comunidad - + Addons Addons - + Help us to improve the mod ! Ayúdanos a mejorar el mod! - + Language Idioma @@ -255,30 +268,50 @@ Introduzca el comando SVN - + + Reset mod to default state + Restablecer mod al estado predeterminado + + + Check for update Verificación de actualización - + Update available ! Actualización disponible! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) Para ser capaz de lanzar el juego desde el lanzador, necesita establecer la ruta de juego en la ventana de opciones. (Opciones > seleccione ruta del juego) - + Cache Caché - + The cache is now cleared. NOTE: It is already automatically cleared on update. Ahora es la cache. Nota: Ya automáticamente está desactivada en actualización. + + + Reset mod + Reiniciar el mod + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + Esto reiniciará el mod para el estado por defecto. Se eliminará cualquier modificación o preferencias del lanzador. + + + + Are you sure to continue ? + ¿Está seguro de continuar? + w_modules @@ -328,82 +361,92 @@ Configuración mod :</span></p></body></html> + Dark blue (default) + Azul oscuro (defecto) + + + Black Negro - + Coal Carbón - + Dark red Rojo oscuro - + Forest Bosque - + Purple Púrpura - + Red Rojo - + Silver Plata - + Cerulean Cerúleo - + Game path: Ruta de juego: - + Select game path Seleccione ruta del juego - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> <html><head/><body><p><span style=" font-size:10pt; font-weight:600;"> Configuración del lanzador :</span></p></body></html> - + Close the launcher when game start Cierra el lanzador cuando empiezan a juego - + Autostart the mod with the game Iniciar el mod con el juego - + + Exclude files from update + Excluir archivos de actualización + + + No path specified No hay ruta de acceso especificada - + The game path has been changed Se ha cambiado el camino juego - + No game path specified. No hay juego ruta de acceso especificada. diff --git a/checker/lang/launcher_fi.ts b/checker/lang/launcher_fi.ts index 79e57b6..fff4eed 100644 --- a/checker/lang/launcher_fi.ts +++ b/checker/lang/launcher_fi.ts @@ -7,7 +7,7 @@ - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ - + Community - + Addons - + Help us to improve the mod ! - + Language @@ -255,30 +268,50 @@ - + + Reset mod to default state + + + + Check for update - + Update available ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -327,81 +360,91 @@ - Black + Dark blue (default) - Coal + Black - Dark red + Coal - Forest + Dark red - Purple + Forest - Red + Purple - Silver + Red + Silver + + + + Cerulean - + Game path: - + Select game path - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + Close the launcher when game start - + Autostart the mod with the game - + + Exclude files from update + + + + No path specified - + The game path has been changed - + No game path specified. diff --git a/checker/lang/launcher_fr.ts b/checker/lang/launcher_fr.ts index b322c93..32c44ac 100644 --- a/checker/lang/launcher_fr.ts +++ b/checker/lang/launcher_fr.ts @@ -7,7 +7,7 @@ Le lanceur n'est pas dans le bon répertoire. Il devrait se trouver dans "My Documents/My Games/Beyond the sword/Mods/Rise of Mankind - A New Dawn' ou dans ' Civilization IV (dossier racine du jeu)/Beyond the sword/Mods/Rise of Mankind - A New Dawn' - + There seems to be a problem with the previous update. Checking file again. Il semble qu'il y ait eu un problème avec la mise à jour précédente. Nouvelle vérification des fichiers. @@ -48,6 +48,19 @@ Il y a une mise à jour disponible. Vous voulez mettre à jour ? + + w_exclusion + + + Choose which files to exclude from update + Choisir les fichiers à exclure de la mise à jour + + + + File + Fichier + + w_install @@ -99,22 +112,22 @@ Réparer installation - + Community Communauté - + Addons Modules - + Help us to improve the mod ! Aidez-nous à améliorer le mod ! - + Language Langue @@ -255,30 +268,50 @@ Entrez la commande SVN - + + Reset mod to default state + Réinitialiser l'installation du mod + + + Check for update Vérifier mises à jours - + Update available ! Mise à jour disponible ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) Pour être en mesure de lancer le jeu depuis le lanceur, vous devez définir le chemin d'accès de jeu dans la fenêtre options. (Options > Selectionner chemin du jeu) - + Cache Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. Le cache est maintenant effacé. Remarque : il est déjà automatiquement effacé lors d'une mise à jour. + + + Reset mod + Réinitialiser le mod + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + Cela réinitialisera le mod à son état par défaut. Toute modification ou préférence du lanceur sera supprimée. + + + + Are you sure to continue ? + Êtes-vous sûr de continuer ? + w_modules @@ -327,81 +360,91 @@ + Dark blue (default) + Bleu foncé (défaut) + + + Black Noir - + Coal Charbon - + Dark red Rouge foncé - + Forest Forêt - + Purple Violet - + Red Rouge - + Silver Argent - + Cerulean Bleu céruléen - + Game path: Chemin du jeu : - + Select game path Sélectionnez chemin du jeu - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Configuration du lanceur :</span></p></body></html> - + Close the launcher when game start Fermer le lanceur lorsque le jeu démarre - + Autostart the mod with the game Démarrer le mod avec le jeu - + + Exclude files from update + Exclure des fichiers de la mise à jour + + + No path specified Aucun chemin d'accès spécifié - + The game path has been changed Le chemin d'accès de jeu a été changé - + No game path specified. Aucun chemin d'accès du jeu spécifié diff --git a/checker/lang/launcher_hu.ts b/checker/lang/launcher_hu.ts index e286496..fc104dc 100644 --- a/checker/lang/launcher_hu.ts +++ b/checker/lang/launcher_hu.ts @@ -7,7 +7,7 @@ - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ - + Community - + Addons - + Help us to improve the mod ! - + Language @@ -255,30 +268,50 @@ - + + Reset mod to default state + + + + Check for update - + Update available ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -327,81 +360,91 @@ - Black + Dark blue (default) - Coal + Black - Dark red + Coal - Forest + Dark red - Purple + Forest - Red + Purple - Silver + Red + Silver + + + + Cerulean - + Game path: - + Select game path - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + Close the launcher when game start - + Autostart the mod with the game - + + Exclude files from update + + + + No path specified - + The game path has been changed - + No game path specified. diff --git a/checker/lang/launcher_it.ts b/checker/lang/launcher_it.ts index d120586..7a3c323 100644 --- a/checker/lang/launcher_it.ts +++ b/checker/lang/launcher_it.ts @@ -7,7 +7,7 @@ Il lanciatore non è nella giusta directory. Dovrebbe essere in ' My Documents / My Games/Beyond spada/Mods/aumento dell'umanità - nuova alba A' o in ' Civilization IV (cartella principale del gioco) / di là della spada/Mods/aumento dell'umanità - nuova alba A' - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ C'è un aggiornamento disponibile. Vuoi aggiornare? + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ - + Community - + Addons - + Help us to improve the mod ! - + Language @@ -255,30 +268,50 @@ - + + Reset mod to default state + + + + Check for update - + Update available ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -327,81 +360,91 @@ - Black + Dark blue (default) - Coal + Black - Dark red + Coal - Forest + Dark red - Purple + Forest - Red + Purple - Silver + Red + Silver + + + + Cerulean - + Game path: - + Select game path - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + Close the launcher when game start - + Autostart the mod with the game - + + Exclude files from update + + + + No path specified - + The game path has been changed - + No game path specified. diff --git a/checker/lang/launcher_pl.ts b/checker/lang/launcher_pl.ts index 8fd63eb..9b22e22 100644 --- a/checker/lang/launcher_pl.ts +++ b/checker/lang/launcher_pl.ts @@ -7,7 +7,7 @@ Launcher nie jest w prawidłowym katalogu. Powinien znajdować się w: 'My Documents/My Games/Beyond the sword/Mods/Rise of Mankind - A New Dawn' lub w 'Civilization IV (root game folder)/Beyond the sword/Mods/Rise of Mankind - A New Dawn' - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ Jest dostępna aktualizacja. Chcesz zaktualizować? + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ Napraw instalacje - + Community Społeczność - + Addons - + Help us to improve the mod ! Pomóż nam ulepszyć modyfikację! - + Language Język @@ -256,30 +269,50 @@ Wprowadź komendę SVN - + + Reset mod to default state + + + + Check for update Sprawdź aktualizacje - + Update available ! Aktualizacja dostępna! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) By uruchomić grę z launchera, należy podać w opcjach ścieżkę do gry (Opcje > Podaj ścieżkę gry) - + Cache Pamięć podręczna - + The cache is now cleared. NOTE: It is already automatically cleared on update. Pamięć podręczna została wyczyszczona. UWAGA: Będzie czyszczony automatycznie przy aktualizacji + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -328,81 +361,91 @@ + Dark blue (default) + + + + Black Czarny - + Coal Węglowy - + Dark red Ciemny Czerwony - + Forest Las - + Purple Purpurowy - + Red Czerwony - + Silver Srebrny - + Cerulean Ceruleum - + Game path: Ścieżka gry: - + Select game path Podaj ścieżkę gry - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Konfiguracja launchera:</span></p></body></html> - + Close the launcher when game start Zamknij launcher przy starcie gry - + Autostart the mod with the game Automatyczny start modyfikacji wraz ze startem gry - + + Exclude files from update + + + + No path specified Brak podanej ścieżki - + The game path has been changed Ścieżka gry została zmieniona - + No game path specified. Brak podanej ścieżki do gry diff --git a/checker/lang/launcher_ru.ts b/checker/lang/launcher_ru.ts index 7555f35..54cff96 100644 --- a/checker/lang/launcher_ru.ts +++ b/checker/lang/launcher_ru.ts @@ -7,7 +7,7 @@ - + There seems to be a problem with the previous update. Checking file again. @@ -48,6 +48,19 @@ + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install @@ -99,22 +112,22 @@ - + Community - + Addons - + Help us to improve the mod ! - + Language @@ -255,30 +268,50 @@ - + + Reset mod to default state + + + + Check for update - + Update available ! - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + Cache - + The cache is now cleared. NOTE: It is already automatically cleared on update. + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + + w_modules @@ -327,81 +360,91 @@ - Black + Dark blue (default) - Coal + Black - Dark red + Coal - Forest + Dark red - Purple + Forest - Red + Purple - Silver + Red + Silver + + + + Cerulean - + Game path: - + Select game path - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + Close the launcher when game start - + Autostart the mod with the game - + + Exclude files from update + + + + No path specified - + The game path has been changed - + No game path specified. diff --git a/checker/lang/launcher_si.ts b/checker/lang/launcher_si.ts index 0c55194..b49f84a 100644 --- a/checker/lang/launcher_si.ts +++ b/checker/lang/launcher_si.ts @@ -1,4 +1,6 @@ - + + + QObject @@ -7,9 +9,9 @@ දියත්කිරීම නියමිත නාමාවලියෙහි නොමැත .එය 'මගේ ලියවිලි /මගේ ක්‍රීඩා /අසිපත් වලින් ඔබ්බට /මොඩ්ස්/මනුෂ්‍ය වර්ගය පිබිදීම -නව පිබිදීමක් හෝ 4 වන ශිෂ්ටාචාරය (මුල් ක්‍රීඩා ගොනුව )/අසිපත් වලින් ඔබ්බට /මොඩ්ස්/මනුෂ්‍ය වර්ගය පිබිදීම -නව පිබිදීමක් - + There seems to be a problem with the previous update. Checking file again. - + @@ -17,22 +19,22 @@ Module updater - + Updating the game. Please be patient. - + Checking and downloading data: - + files left. - + @@ -48,27 +50,40 @@ නවීකරණයක් පවතියි .ඔබට නවීකරණයක් අවශ්‍ය ද ? + + w_exclusion + + + Choose which files to exclude from update + + + + + File + + + w_install Mod installation - + <html><head/><body><p align="center"><span style=" font-size:10pt; font-weight:600;">A New Dawn : </span></p><p align="center"><span style=" font-size:9pt;">The mod is not installed.</span></p><p align="center"><span style=" font-size:9pt;">Do you want to download and install it ?</span></p></body></html> - + Ok - + Cancel - + @@ -76,208 +91,228 @@ Launch Civilization IV - + Manage modules - + Options - + Menu - + Fix installation - + - + Community - + - + Addons - + - + Help us to improve the mod ! - + - + Language - + Exit - + Forum - + Bugreport (forum) - + About AND Resurrection team (forum) - + "Mega Civ Pack" (forum) - + "More music / More handicaps / Dinosaurs" (forum) - + Open mod folder - + Git: Create binary pack - + Git: Create update binary pack - + Translate the mod - + Help for translation (forum) - + Translate the launcher - + English - + French - + Sinhala - + Hungarian - + Finnish - + Polish - + Italian - + Spanish - + German - + Russian - + Restore default state - + Revert to an older revision... - + Addon "Blue marble" - + Clear cache - + Enter SVN command - + + + + + Reset mod to default state + - + Check for update - + - + Update available ! - + - + To be able to launch the game from the launcher, you need to set the game path in the options window. (Options > Select game path) - + - + Cache - + - + The cache is now cleared. NOTE: It is already automatically cleared on update. - + + + + + Reset mod + + + + + This will reset the mod to the default state. Any modification or launcher preferences will be removed. + + + + + Are you sure to continue ? + @@ -285,17 +320,17 @@ Modules - + Local - + Distant - + @@ -303,107 +338,117 @@ Options - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Mod configuration :</span></p></body></html> - + Enable formations (more graphical units) - + Enable Blue Marble (alternative terrain graphics) - + Interface color: - + - Black - + Dark blue (default) + - Coal - + Black + - Dark red - + Coal + - Forest - + Dark red + - Purple - + Forest + - Red - + Purple + - Silver - + Red + + Silver + + + + Cerulean - + - + Game path: - + - + Select game path - + - + <html><head/><body><p><span style=" font-size:10pt; font-weight:600;">Launcher configuration :</span></p></body></html> - + - + Close the launcher when game start - + - + Autostart the mod with the game - + + + + + Exclude files from update + - + No path specified - + - + The game path has been changed - + - + No game path specified. - + - \ No newline at end of file + diff --git a/checker/main.cpp b/checker/main.cpp index 942bcde..ae8f1ed 100644 --- a/checker/main.cpp +++ b/checker/main.cpp @@ -84,20 +84,27 @@ int main(int argc, char *argv[]) // Check for existing installation QFile temp("updating"); - if(temp.exists()){ + QFile reset("reset"); + if(temp.exists() || reset.exists()){ f_check updater; updater.PrepareUpdate(); QMessageBox msgBox; msgBox.setText(QObject::tr("There seems to be a problem with the previous update. Checking file again.")); msgBox.exec(); - QFile::remove("updating"); #ifdef _WIN32 system("taskkill /IM rsync.exe"); #endif #ifdef __linux system("killall rsync"); #endif - updater.ActionUpdate(); + if(temp.exists()){ + QFile::remove("updating"); + updater.ActionUpdate(); + } + if(reset.exists()){ + QFile::remove("reset"); + updater.ActionReset(); + } return a.exec(); } diff --git a/checker/w_main.cpp b/checker/w_main.cpp index cb64e6f..4254f84 100644 --- a/checker/w_main.cpp +++ b/checker/w_main.cpp @@ -46,7 +46,6 @@ w_main::w_main(QWidget *parent) : clear_language_state(); if(loc=="en"){ui->language_en->setChecked(1);} if(loc=="fr"){ui->language_fr->setChecked(1);} - if(loc=="si"){ui->language_si->setChecked(1);} if(loc=="hu"){ui->language_hu->setChecked(1);} if(loc=="fi"){ui->language_fi->setChecked(1);} if(loc=="it"){ui->language_it->setChecked(1);} @@ -64,7 +63,6 @@ w_main::w_main(QWidget *parent) : ui->language_it->setIcon(QIcon("checker/icons/it.png")); ui->language_pl->setIcon(QIcon("checker/icons/pl.png")); ui->language_ru->setIcon(QIcon("checker/icons/ru.png")); - ui->language_si->setIcon(QIcon("checker/icons/si.png")); ui->language_es->setIcon(QIcon("checker/icons/es.png")); ui->actionOpen_mod_folder->setIcon(QIcon("checker/icons/open.png")); ui->actionExit->setIcon(QIcon("checker/icons/exit.png")); @@ -81,6 +79,7 @@ w_main::w_main(QWidget *parent) : ui->menuFix_installation->setIcon(QIcon("checker/icons/fix.png")); ui->actionClean_up->setIcon(QIcon("checker/icons/clean.png")); ui->actionClear_cache->setIcon(QIcon("checker/icons/clear.png")); + ui->actionReset->setIcon(QIcon("checker/icons/reset.png")); // GUI : Set title and background @@ -286,16 +285,6 @@ void w_main::on_language_fr_triggered() ui->language_fr->setChecked(1); } -void w_main::on_language_si_triggered() -{ - translator->load(QString("launcher_si.qm"),"checker/lang/"); - setCheckerParam("Main/Lang","si"); - ui->retranslateUi(this); - modules->UpdateWindow(); - clear_language_state(); - ui->language_si->setChecked(1); -} - void w_main::on_language_hu_triggered() { translator->load(QString("launcher_hu.qm"),"checker/lang/"); @@ -372,3 +361,25 @@ void w_main::on_actionClear_cache_triggered() clearCache(); QMessageBox::information(this,tr("Cache"),tr("The cache is now cleared. NOTE: It is already automatically cleared on update.")); } + +void w_main::on_actionReset_triggered() +{ + f_check reset; + QMessageBox msgBox; + msgBox.setWindowTitle(tr("Reset mod")); + msgBox.setText(tr("This will reset the mod to the default state. Any modification or launcher preferences will be removed.")); + msgBox.setInformativeText(tr("Are you sure to continue ?")); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Cancel); + int ret = msgBox.exec(); + switch (ret) { + case QMessageBox::Ok: + reset.PrepareUpdate(); + reset.ActionReset(); + break; + case QMessageBox::Cancel: + break; + default: + break; + } +} diff --git a/checker/w_main.h b/checker/w_main.h index dcff15c..ce23ac0 100644 --- a/checker/w_main.h +++ b/checker/w_main.h @@ -17,7 +17,7 @@ class installBox; } namespace versions { -const QString CHECKER_VERSION = "1.01"; +const QString CHECKER_VERSION = "1.02"; } namespace tools { @@ -68,7 +68,6 @@ private slots: void clear_language_state(); void on_language_en_triggered(); void on_language_fr_triggered(); - void on_language_si_triggered(); void on_language_hu_triggered(); void on_language_fi_triggered(); void on_language_it_triggered(); @@ -78,6 +77,7 @@ private slots: void on_language_pl_triggered(); void on_actionAddon_Blue_marble_triggered(); void on_actionClear_cache_triggered(); + void on_actionReset_triggered(); private: Ui::w_main *ui; diff --git a/checker/w_main.ui b/checker/w_main.ui index d8b5911..f76d0b4 100644 --- a/checker/w_main.ui +++ b/checker/w_main.ui @@ -210,7 +210,7 @@ 0 0 600 - 21 + 18 @@ -228,6 +228,7 @@ Fix installation + @@ -273,7 +274,6 @@ - @@ -458,6 +458,11 @@ Enter SVN command + + + Reset mod to default state + + diff --git a/installer/installer_script.nsi b/installer/installer_script.nsi index 3e38faa..4debdcc 100644 --- a/installer/installer_script.nsi +++ b/installer/installer_script.nsi @@ -63,7 +63,6 @@ RequestExecutionLevel admin !insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "Italian" !insertmacro MUI_LANGUAGE "Polish" -!insertmacro MUI_LANGUAGE "Sinhala" !insertmacro MUI_LANGUAGE "Spanish" Function .onInit @@ -141,17 +140,6 @@ LangString SHORTCUT ${LANG_POLISH} "Stwórz skrót na pulpicie" LangString MSVC10 ${LANG_POLISH} "Microsoft Visual C++ 2010 Redist jest nie zainstalowany. Pobieranie oraz instalacja. Proszę czekać..." LangString MSVC13 ${LANG_POLISH} "Microsoft Visual C++ 2013 Redist jest nie zainstalowany. Pobieranie oraz instalacja. Proszę czekać..." -; Sinhala - -LangString WELCOME_TITLE ${LANG_SINHALA} "4 වන ශිෂ්ටාචාරය : නව අවධියක උදාව" -LangString WELCOME ${LANG_SINHALA} "විහිදුවා හරින සංස්කරණය:${VERSION}\nමෙම පිහිටුවීම් ක්‍රමය 4 වන ශිෂ්ධාචාරය ස්ථාපනයට උපදෙස් සපයයි : නව උදාවක් \nමොඩ් ස්ථාපනය කළ යුත්තේ \'මගේ ලියවිලි/මගේ ක්‍රීඩා /කඩු වලට ඔබ්බට ගිය /මොඩ් මුල් ආකාරයෙන් \nඑය මොඩ් දියත් කිරීමට කෙටි මාර්ගයක් සපයයි ,එය පහසුවෙන් භාගත කිරීමට උපකාරී වේ.\nමොඩ් ස්ථානගත කිරීම නවීකරණය හෝ පිළියෙළ කිරීම . \nඅවවාදයයි :පවත්නා ඕනෑම මොඩ් ස්ථාපනයක් අනුකුල වේ .ඔබ සතුව මොඩ් ගොණු තිබේනම් ඒවා නවිකරණ හෝ නැවත ලිවිම කළ යුතුය ." -LangString REQUIRED ${LANG_SINHALA} "required" -LangString DIRECTORY ${LANG_SINHALA} "පරිස්ථිතිය පුළුල් ලෙස පවතින ගොනුවෙහි ස්ථාපනය කළ යුතුය.$\nඑය වෙනස් ගොනුවක ස්ථාපනය කිරීමට ,විමසීම ක්ලික් කර වෙනත් ගොනුවක් තොර ගත යුතුය$\n$\nසටහන :එය වෙනත් ගොනුවක තොර ගැනීම ඉහල ලෙස නිර්දේශ කෙරේ .කෙසේ වෙතත් ඔබට මොඩ් ඍජු ලෙසම ක්‍රීඩා ගොනුවෙහි ස්ථානගත කළ හැක.(\'සිඩ් මෙයිරස් 4 වන ශිෂ්ටාචාරය අසිපත් වලින් එපිටට \ සිපත් වලින් එපිටට\මොඩ්ස්\')." -LangString FINISH ${LANG_SINHALA} "දැන් දියත් කිරීම ස්ථාපිතයි .පළමු දියත් කිරීමේදී ,මොඩ් නාමාවලියෙහි පවතින බව මෙහිදී අනාවරණය කරයි , නොඑසේනම් ස්ථානගත කිරිමේ ක්‍රියාමාර්ගය අනුගමනය කළ යුතුය ." -LangString RUN ${LANG_SINHALA} "මොඩ් දියත් කිරීම අරඹන්න" -LangString SHORTCUT ${LANG_SINHALA} "මුහුණත කෙටිමාර්ගය සකස් කරන්න" -LangString MSVC10 ${LANG_SINHALA} "මයික්‍රොසොෆ්ට් විෂුවල් සී ++ 2010 ස්ථානගත කර නොමැත .භාගත කිරීම සහ ස්ථානගත කිරීම සිදු කරන්න . කරුණාකර රැදී සිටින්න ." -LangString MSVC13 ${LANG_SINHALA} "මයික්‍රොසොෆ්ට් විෂුවල් සී ++ 2013 ස්ථානගත කර නොමැත .භාගත කිරීම සහ ස්ථානගත කිරීම සිදු කරන්න . කරුණාකර රැදී සිටින්න ." ; Spanish diff --git a/updater/main.cpp b/updater/main.cpp index 7a70a0c..9e9b94b 100644 --- a/updater/main.cpp +++ b/updater/main.cpp @@ -15,22 +15,38 @@ int main(int argc, char *argv[]) w.show(); w.DebugWindow(3000); - // Write temp file - QFile temp("updating"); - temp.open(QIODevice::WriteOnly | QIODevice::Truncate); - temp.close(); + if(argc > 1) + { + QString arg1 = argv[1]; + if(arg1 == "reset") + { + QFile temp("reset"); + temp.open(QIODevice::WriteOnly | QIODevice::Truncate); + temp.close(); + QString operation = tools::TOOL_RSYNC + QString("-rz --info=progress2 --delete-after --exclude \"cygcrypto-1.0.0.dll\" --exclude \"cyggcc_s-1.dll\" --exclude \"cygiconv-2.dll\" --exclude \"cygssp-0.dll\" --exclude \"cygwin1.dll\" --exclude \"cygz.dll\" --exclude \"rsync.exe\" --exclude \"upd_proc.exe\" --exclude \".svn*\" --exclude \"updating\" afforess.com::ftp/ ."); + w.StartUpdate(operation); + } + else{ + qDebug() << "Unknown argument"; + } + } + else{ + // Write temp file + QFile temp("updating"); + temp.open(QIODevice::WriteOnly | QIODevice::Truncate); + temp.close(); - // Check exclusion file - QString exclusion = w.ReadExcludeList("checker/exclusions.default.xml"); - QString exclusion_custom = w.ReadExcludeList("checker/exclusions.custom.xml"); + // Check exclusion file + QString exclusion = w.ReadExcludeList("checker/exclusions.default.xml"); + QString exclusion_custom = w.ReadExcludeList("checker/exclusions.custom.xml"); - // Initialize update - QString operation = tools::TOOL_RSYNC + QString("-rz --info=progress2 --delete-after %1%2afforess.com::ftp/ .").arg(exclusion).arg(exclusion_custom); - //operation.replace("\"","\\\""); - qDebug() << operation; - - // Execute update operation - w.StartUpdate(operation); + // Initialize update + QString operation = tools::TOOL_RSYNC + QString("-rz --info=progress2 --delete-after %1%2afforess.com::ftp/ .").arg(exclusion).arg(exclusion_custom); + //operation.replace("\"","\\\""); + qDebug() << operation; + // Execute update operation + w.StartUpdate(operation); + } return 0; }