mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-21 01:11:46 +03:00
Changed game integrity checking feature
- said button was moved to the settings - fixed launcher state updating in some cases
This commit is contained in:
parent
5d75bd51d6
commit
b1f5e237f8
16 changed files with 42 additions and 36 deletions
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Starten
|
launch: Starten
|
||||||
predownload: Update vorinstallieren
|
predownload: Update vorinstallieren
|
||||||
integrity: Dateien verifizieren und reparieren
|
|
||||||
|
|
||||||
# Einstellungs Fenster
|
# Einstellungs Fenster
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: Launcher Ordner öffnen
|
launcher: Launcher Ordner öffnen
|
||||||
game: Spiel Ordner öffnen
|
game: Spiel Ordner öffnen
|
||||||
|
repair_game: spiel-dateien reparieren
|
||||||
|
|
||||||
# Verberssungen
|
# Verberssungen
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Launch
|
launch: Launch
|
||||||
predownload: Pre-download update
|
predownload: Pre-download update
|
||||||
integrity: Verify and repair files
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: launcher folder
|
launcher: launcher folder
|
||||||
game: game folder
|
game: game folder
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Jugar
|
launch: Jugar
|
||||||
predownload: Pre-descargar actualización
|
predownload: Pre-descargar actualización
|
||||||
integrity: Verificar y reparar archivos
|
|
||||||
|
|
||||||
# Ventana de opciones
|
# Ventana de opciones
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: carpeta del launcher
|
launcher: carpeta del launcher
|
||||||
game: carpeta del juego
|
game: carpeta del juego
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Mejoras
|
# Mejoras
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -75,7 +75,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Lancer
|
launch: Lancer
|
||||||
predownload: Pre-téléchargement de mise à jour
|
predownload: Pre-téléchargement de mise à jour
|
||||||
integrity: Vérifie et corrige les fichiers du jeu
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -137,6 +136,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: Dossier du Launcher
|
launcher: Dossier du Launcher
|
||||||
game: Dossier du jeu
|
game: Dossier du jeu
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Indítás
|
launch: Indítás
|
||||||
predownload: Frissítés előtöltése
|
predownload: Frissítés előtöltése
|
||||||
integrity: Verify and repair files
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: launcher mappa
|
launcher: launcher mappa
|
||||||
game: játékmappa
|
game: játékmappa
|
||||||
|
repair_game: Játékfájlok javítása
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Luncurkan
|
launch: Luncurkan
|
||||||
predownload: Pembaruan pra-unduh
|
predownload: Pembaruan pra-unduh
|
||||||
integrity: Verify and repair files
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: folder peluncur
|
launcher: folder peluncur
|
||||||
game: folder game
|
game: folder game
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Avvia
|
launch: Avvia
|
||||||
predownload: Pre-scarica aggiornamento
|
predownload: Pre-scarica aggiornamento
|
||||||
integrity: Verify and repair files
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -132,6 +131,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: Cartella del launcher
|
launcher: Cartella del launcher
|
||||||
game: Cartella del gioco
|
game: Cartella del gioco
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Start
|
launch: Start
|
||||||
predownload: Forhånds-nedlast oppdatering
|
predownload: Forhånds-nedlast oppdatering
|
||||||
integrity: Verify and repair files
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: launcher mappe
|
launcher: launcher mappe
|
||||||
game: spill mappe
|
game: spill mappe
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: Запустить
|
launch: Запустить
|
||||||
predownload: Предзагрузить обновление
|
predownload: Предзагрузить обновление
|
||||||
integrity: Проверить и исправить файлы
|
|
||||||
|
|
||||||
# Окно настроек
|
# Окно настроек
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: папка лаунчера
|
launcher: папка лаунчера
|
||||||
game: папка игры
|
game: папка игры
|
||||||
|
repair_game: исправить файлы игры
|
||||||
|
|
||||||
# Улучшения
|
# Улучшения
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: launch (◕▿◕✿)
|
launch: launch (◕▿◕✿)
|
||||||
predownload: pwe-downwoad update
|
predownload: pwe-downwoad update
|
||||||
integrity: vewify files & wepaiw
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: waunchew f-fowdew
|
launcher: waunchew f-fowdew
|
||||||
game: game f-fowdew
|
game: game f-fowdew
|
||||||
|
repair_game: wepaiw game fiwes
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -72,7 +72,6 @@ launcher:
|
||||||
ready:
|
ready:
|
||||||
launch: 启动
|
launch: 启动
|
||||||
predownload: 预下载更新
|
predownload: 预下载更新
|
||||||
integrity: 验证并修复文件
|
|
||||||
|
|
||||||
# Settings window
|
# Settings window
|
||||||
settings:
|
settings:
|
||||||
|
@ -133,6 +132,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: 启动器文件夹
|
launcher: 启动器文件夹
|
||||||
game: 游戏文件夹
|
game: 游戏文件夹
|
||||||
|
repair_game: repair game files
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
import GearIcon from './assets/images/gear.png';
|
import GearIcon from './assets/images/gear.png';
|
||||||
import GearActiveIcon from './assets/images/gear-active.png';
|
import GearActiveIcon from './assets/images/gear-active.png';
|
||||||
import DownloadIcon from './assets/images/cloud-download.png';
|
import DownloadIcon from './assets/images/cloud-download.png';
|
||||||
import WrenchIcon from './assets/images/wrench.png';
|
|
||||||
|
|
||||||
const launcher = new Launcher(onMount);
|
const launcher = new Launcher(onMount);
|
||||||
|
|
||||||
|
@ -145,10 +144,6 @@
|
||||||
|
|
||||||
<img src={GearActiveIcon} class="active" alt="Settings">
|
<img src={GearActiveIcon} class="active" alt="Settings">
|
||||||
</div>
|
</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">
|
<button class="button hint--left hint--small" aria-label="{typeof $locale === 'string' ? $_('launcher.states.ready.predownload') : ''}" id="predownload">
|
||||||
<img src={DownloadIcon} alt="Download" />
|
<img src={DownloadIcon} alt="Download" />
|
||||||
|
|
|
@ -295,6 +295,16 @@
|
||||||
background: true
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,23 @@ export default class Launcher
|
||||||
|
|
||||||
record.pop();
|
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();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ export default class State
|
||||||
public launchButton: HTMLElement;
|
public launchButton: HTMLElement;
|
||||||
public pauseButton: HTMLElement;
|
public pauseButton: HTMLElement;
|
||||||
public predownloadButton: HTMLElement;
|
public predownloadButton: HTMLElement;
|
||||||
public integrityButton: HTMLElement;
|
|
||||||
public settingsButton: HTMLElement;
|
public settingsButton: HTMLElement;
|
||||||
|
|
||||||
protected _state: LauncherState = 'game-launch-available';
|
protected _state: LauncherState = 'game-launch-available';
|
||||||
|
@ -57,7 +56,6 @@ export default class State
|
||||||
this.launchButton = <HTMLElement>document.getElementById('launch');
|
this.launchButton = <HTMLElement>document.getElementById('launch');
|
||||||
this.pauseButton = <HTMLElement>document.getElementById('pause');
|
this.pauseButton = <HTMLElement>document.getElementById('pause');
|
||||||
this.predownloadButton = <HTMLElement>document.getElementById('predownload');
|
this.predownloadButton = <HTMLElement>document.getElementById('predownload');
|
||||||
this.integrityButton = <HTMLElement>document.getElementById('integrity');
|
|
||||||
this.settingsButton = <HTMLElement>document.getElementById('settings');
|
this.settingsButton = <HTMLElement>document.getElementById('settings');
|
||||||
|
|
||||||
this.launchButton.onclick = () => {
|
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 () => {
|
this.update().then(async () => {
|
||||||
// Close splash screen
|
// Close splash screen
|
||||||
IPC.write('launcher-loaded');
|
IPC.write('launcher-loaded');
|
||||||
|
@ -256,7 +239,6 @@ export default class State
|
||||||
|
|
||||||
this.launcher.progressBar!.hide();
|
this.launcher.progressBar!.hide();
|
||||||
this.predownloadButton.style['display'] = 'none';
|
this.predownloadButton.style['display'] = 'none';
|
||||||
this.integrityButton.style['display'] = 'none';
|
|
||||||
|
|
||||||
this.launchButton.classList.remove('button-blue');
|
this.launchButton.classList.remove('button-blue');
|
||||||
this.launchButton.setAttribute('aria-label', '');
|
this.launchButton.setAttribute('aria-label', '');
|
||||||
|
@ -290,8 +272,6 @@ export default class State
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'game-launch-available':
|
case 'game-launch-available':
|
||||||
this.integrityButton.style['display'] = 'block';
|
|
||||||
|
|
||||||
this.launchButton.textContent = dictionary['ready']['launch'];
|
this.launchButton.textContent = dictionary['ready']['launch'];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -367,8 +367,12 @@ export default (launcher: Launcher): Promise<void> => {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else resolve();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
debugThread.log('No pkg_version file provided');
|
debugThread.log('No pkg_version file provided');
|
||||||
|
|
Loading…
Reference in a new issue