mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-30 05:28:15 +03:00
Ping command check before telemetry check
This commit is contained in:
parent
c461f35391
commit
62aaab0d74
2 changed files with 19 additions and 0 deletions
|
@ -231,6 +231,11 @@ notifications:
|
|||
title: 'Launcher update available: {from} -> {to}'
|
||||
body: You can download a new version of the launcher from the project's repository at {repository}
|
||||
|
||||
# Before telemetry check when iputils is not downloaded
|
||||
iputils_package_required:
|
||||
title: An Anime Game Launcher
|
||||
body: You must have iputils installed for telemetry checking
|
||||
|
||||
# When telemetry servers are not disabled
|
||||
telemetry_not_disabled:
|
||||
title: An Anime Game Launcher
|
||||
|
|
|
@ -13,6 +13,20 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
return new Promise(async (resolve) => {
|
||||
const debugThread = new DebugThread('State/Launch', 'Starting the game');
|
||||
|
||||
// Show an error notification if ping is not available
|
||||
if (!await Launcher.isPackageAvailable('ping'))
|
||||
{
|
||||
Notification.show({
|
||||
...(Locales.translate('notifications.iputils_package_required') as { title: string, body: string }),
|
||||
icon: `${constants.paths.appDir}/public/images/baal64-transparent.png`,
|
||||
importance: 'critical'
|
||||
});
|
||||
|
||||
debugThread.log('iputils package is not installed!');
|
||||
|
||||
resolve();
|
||||
}
|
||||
|
||||
const telemetry = await Game.isTelemetryDisabled();
|
||||
|
||||
// If telemetry servers are not disabled
|
||||
|
|
Loading…
Reference in a new issue