Changed game integrity checking feature

- said button was moved to the settings
- fixed launcher state updating in some cases
This commit is contained in:
Observer KRypt0n_ 2022-02-20 20:48:58 +02:00
parent 5d75bd51d6
commit b1f5e237f8
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
16 changed files with 42 additions and 36 deletions

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Starten
predownload: Update vorinstallieren
integrity: Dateien verifizieren und reparieren
# Einstellungs Fenster
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: Launcher Ordner öffnen
game: Spiel Ordner öffnen
repair_game: spiel-dateien reparieren
# Verberssungen
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Launch
predownload: Pre-download update
integrity: Verify and repair files
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: launcher folder
game: game folder
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Jugar
predownload: Pre-descargar actualización
integrity: Verificar y reparar archivos
# Ventana de opciones
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: carpeta del launcher
game: carpeta del juego
repair_game: repair game files
# Mejoras
enhancements:

View file

@ -75,7 +75,6 @@ launcher:
ready:
launch: Lancer
predownload: Pre-téléchargement de mise à jour
integrity: Vérifie et corrige les fichiers du jeu
# Settings window
settings:
@ -137,6 +136,7 @@ settings:
winecfg: winecfg
launcher: Dossier du Launcher
game: Dossier du jeu
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Indítás
predownload: Frissítés előtöltése
integrity: Verify and repair files
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: launcher mappa
game: játékmappa
repair_game: Játékfájlok javítása
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Luncurkan
predownload: Pembaruan pra-unduh
integrity: Verify and repair files
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: folder peluncur
game: folder game
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Avvia
predownload: Pre-scarica aggiornamento
integrity: Verify and repair files
# Settings window
settings:
@ -132,6 +131,7 @@ settings:
winecfg: winecfg
launcher: Cartella del launcher
game: Cartella del gioco
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Start
predownload: Forhånds-nedlast oppdatering
integrity: Verify and repair files
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: launcher mappe
game: spill mappe
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: Запустить
predownload: Предзагрузить обновление
integrity: Проверить и исправить файлы
# Окно настроек
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: папка лаунчера
game: папка игры
repair_game: исправить файлы игры
# Улучшения
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: launch (◕▿◕✿)
predownload: pwe-downwoad update
integrity: vewify files & wepaiw
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: waunchew f-fowdew
game: game f-fowdew
repair_game: wepaiw game fiwes
# Enhancements
enhancements:

View file

@ -72,7 +72,6 @@ launcher:
ready:
launch: 启动
predownload: 预下载更新
integrity: 验证并修复文件
# Settings window
settings:
@ -133,6 +132,7 @@ settings:
winecfg: winecfg
launcher: 启动器文件夹
game: 游戏文件夹
repair_game: repair game files
# Enhancements
enhancements:

View file

@ -16,7 +16,6 @@
import GearIcon from './assets/images/gear.png';
import GearActiveIcon from './assets/images/gear-active.png';
import DownloadIcon from './assets/images/cloud-download.png';
import WrenchIcon from './assets/images/wrench.png';
const launcher = new Launcher(onMount);
@ -145,10 +144,6 @@
<img src={GearActiveIcon} class="active" alt="Settings">
</div>
<button class="button hint--left hint--small" aria-label="{typeof $locale === 'string' ? $_('launcher.states.ready.integrity') : ''}" id="integrity">
<img src={WrenchIcon} alt="Integrity" />
</button>
<button class="button hint--left hint--small" aria-label="{typeof $locale === 'string' ? $_('launcher.states.ready.predownload') : ''}" id="predownload">
<img src={DownloadIcon} alt="Download" />

View file

@ -295,6 +295,16 @@
background: true
});
}} />
<!-- svelte-ignore missing-declaration -->
<Button
lang="settings.general.items.buttons.repair_game"
click={async () => {
await IPC.write('check-files-integrity');
Neutralino.app.exit();
}}
/>
</div>
</div>

View file

@ -127,6 +127,23 @@ export default class Launcher
record.pop();
}
else if (record.data === 'check-files-integrity')
{
this.state!.launchButton.style['display'] = 'none';
this.state!.settingsButton.style['display'] = 'none';
import('./launcher/states/CheckIntegrity').then((module) => {
module.default(this).then(() => {
this.state!.update().then(() => {
this.state!.launchButton.style['display'] = 'block';
this.state!.settingsButton.style['display'] = 'block';
});
});
});
record.pop();
}
});
});

View file

@ -27,7 +27,6 @@ export default class State
public launchButton: HTMLElement;
public pauseButton: HTMLElement;
public predownloadButton: HTMLElement;
public integrityButton: HTMLElement;
public settingsButton: HTMLElement;
protected _state: LauncherState = 'game-launch-available';
@ -57,7 +56,6 @@ export default class State
this.launchButton = <HTMLElement>document.getElementById('launch');
this.pauseButton = <HTMLElement>document.getElementById('pause');
this.predownloadButton = <HTMLElement>document.getElementById('predownload');
this.integrityButton = <HTMLElement>document.getElementById('integrity');
this.settingsButton = <HTMLElement>document.getElementById('settings');
this.launchButton.onclick = () => {
@ -98,21 +96,6 @@ export default class State
});
};
this.integrityButton.onclick = () => {
this.launchButton.style['display'] = 'none';
this.integrityButton.style['display'] = 'none';
this.settingsButton.style['display'] = 'none';
import('./states/CheckIntegrity').then((module) => {
module.default(this.launcher).then(() => {
this.update().then(() => {
this.launchButton.style['display'] = 'block';
this.settingsButton.style['display'] = 'block';
});
});
});
};
this.update().then(async () => {
// Close splash screen
IPC.write('launcher-loaded');
@ -256,7 +239,6 @@ export default class State
this.launcher.progressBar!.hide();
this.predownloadButton.style['display'] = 'none';
this.integrityButton.style['display'] = 'none';
this.launchButton.classList.remove('button-blue');
this.launchButton.setAttribute('aria-label', '');
@ -290,8 +272,6 @@ export default class State
break;
case 'game-launch-available':
this.integrityButton.style['display'] = 'block';
this.launchButton.textContent = dictionary['ready']['launch'];
break;

View file

@ -367,8 +367,12 @@ export default (launcher: Launcher): Promise<void> => {
resolve();
});
}
else resolve();
});
}
else resolve();
})
.catch(() => {
debugThread.log('No pkg_version file provided');