an-anime-game-launcher/src/defaultSettings.ts

246 lines
5.9 KiB
TypeScript
Raw Normal View History

import { Configs } from './empathize';
2022-01-28 20:37:44 +03:00
import constants from './ts/Constants';
import Locales from './ts/launcher/Locales';
export default new Promise<void>(async (resolve) => {
2022-02-20 14:33:11 +03:00
const systemLocale = await Locales.system();
await Configs.defaults({
lang: {
launcher: systemLocale,
voice: [
'en-us'
]
},
/**
* Game server
*
* Available options: "global" and "cn"
*/
server: systemLocale === 'zh-cn' ? 'cn' : 'global',
folders: {
/**
* Path to wine prefix
*
2022-01-06 20:28:20 +03:00
* @default "~/.local/share/anime-game-launcher/game"
*/
prefix: await constants.paths.prefix.default,
/**
* Path to game installation folder
*
* @default "~/.local/share/anime-game-launcher/game/drive_c/Program Files/[An Anime Game]"
*/
game: `${await constants.paths.prefix.default}/drive_c/Program Files/${constants.placeholders.uppercase.first} ${constants.placeholders.uppercase.second}`,
/**
* Path to some temp folder
*
* @default "~/.local/share/anime-game-launcher"
*/
2022-01-06 20:28:20 +03:00
temp: await constants.paths.launcherDir
},
/**
* Runner name to use, or null if runner is not specified
*
* @default null
*/
runner: null,
/**
* DXVK name to use, or null if DXVK is not specified
*
* @default null
*/
dxvk: null,
/**
* Environment variables
*
* null to disable any
*
* @default null
*/
env: null,
/**
* Launcher theme
*
* Can be "system", "light" and "dark"
*
2022-02-04 18:20:54 +03:00
* @default "system"
*/
theme: 'system',
/**
* HUD
*
2021-12-27 17:36:54 +03:00
* "none" if not in use. Otherwise it's "dxvk" or "mangohud"
*
* @default "none"
*/
hud: 'none',
/**
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* Wine-related configs
*/
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
wine: {
2022-01-30 18:49:01 +03:00
/**
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* Wine synchronization
2022-01-30 18:49:01 +03:00
*
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* Available options: none, esync, fsync
*
2022-02-04 18:20:54 +03:00
* @default "esync"
2022-01-30 18:49:01 +03:00
*/
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
sync: 'esync',
2022-01-30 18:49:01 +03:00
/**
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* If the launcher should enable AMD FSR
2022-01-30 18:49:01 +03:00
*
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* @default true
2022-01-30 18:49:01 +03:00
*/
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
fsr: true,
2022-01-30 18:49:01 +03:00
/**
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
* Wine Virtual Desktop
2022-01-30 18:49:01 +03:00
*/
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
virtual_desktop: {
/**
* If it is enabled
*
* @default false
*/
enabled: false,
/**
* Virtual Desktop Width
*
* @default 720
*/
width: 720,
/**
* Virtual Desktop Height
*
* @default 1280
*/
height: 1280
}
2022-01-30 18:49:01 +03:00
},
/**
* vkBasalt preset to use
*
* "none" if not in use. Otherwise it should be a folder name from the "shaders" folder
*
* @default "none"
*/
shaders: 'none',
/**
* Discord RPC integration
*/
discord: {
/**
* If it is enabled
*
* @default false
*/
enabled: false,
/**
* Should it display amount of spent time or not
*
* @default true
*/
timer: true,
/**
* Discord RPC states
*/
states: {
'in-launcher': {
details: 'Preparing to launch',
state: '',
icon: 'launcher'
},
'in-game': {
details: 'Exploring the landscape',
state: 'of Teyvat',
icon: 'game'
}
}
},
/**
2021-12-27 17:36:54 +03:00
* If the launcher should use GameMode
*
* @default false
*/
gamemode: false,
/**
* Allow Borderless Window
*
* Whether the game launches with the parameters "-screen-fullscreen 0 -popupwindow"
* This allows the game to be played in a borderless window by selecting fullscreen and pressing alt+enter
*
* @default false
*/
borderless_window: false,
/**
2021-12-27 17:36:54 +03:00
* If the launcher should unlock FPS
*
* @default false
*/
fps_unlocker: false,
/**
* Use separate terminal window to run the wine command
*
* It'll try to use some of the supported default terminal applications. Otherwise the option will not have an effect
*
* More details in the `Launch.ts` script
*
* @default false
*/
use_terminal: false,
/**
* If the launcher should automatically delete log files
*/
purge_logs: {
/**
* Should launcher delete some game logs (DXVK .log and .dmp files)
*
* @default true
*/
game: true,
/**
* Period of time launcher should delete its logs
*
* Can be in "*d" format, where * is amount of days (e.g. 5d = 5 days), or "never" to never delete logs
*
* @default "5d"
*/
launcher: '5d'
},
/**
* Skip analytics window
*
* @default false
*/
skip_analytics: false
});
resolve();
});