From 213e418ee848e7a0efa7666668df13e2bde50a99 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Mon, 10 Jan 2022 20:57:30 +0200 Subject: [PATCH] 2.0.0-rc1 - updated locales - made `Launcher.isPackageAvailable()` method to check if some package installed - added GameMode and shaders packages existance checking From previous commits: - added 8 new discord rpc icons - updated way `DiscordSettings` handles RPC icons - fixed windows sizing on wayland - updated dependencies - added proper shaders menu section - made `Locales.bind()` method to bind some callback to locale changing event - with change above, made proper translations for button on the main window - added UWU (Cursed) Language (by Marie) - removed vi-vn and es-es locales because no one translate it - added 6 new splash screen messages - encoded file names for discord rpc icons - fixed old launcher logs deletion - added environmental variables manager - fixed `Domain.getInfo()` method work in some specific cases(?) - added `Launcher.version` field that represents... current launcher version - made `Git` class to work with git repositories; made `Git.getTags()` method to list remove repository tags - added outdated launcher version notification - now by default config file's `env` field contains `{ WINEESYNC: 1 }` so now ESync enabled by default - added `fsr` field to config file; added checkbox to the settings menu if this option enabled, launcher will run the game with `WINE_FULLSCREEN_FSR: 1` and `WINE_FULLSCREEN_FSR_STRENGTH: 3` environmental variables --- public/locales/de-de.yaml | 8 +++-- public/locales/en-us.yaml | 8 +++-- public/locales/fr-fr.yaml | 11 +++--- public/locales/it-it.yaml | 5 ++- public/locales/ru-ru.yaml | 8 +++-- public/locales/uwu.yaml | 5 ++- src/components/ShadersSelection.svelte | 49 +++++++++++++++----------- src/settings.svelte | 25 +++++++++++-- src/ts/Launcher.ts | 46 ++++++++++++++++++++++++ src/ts/launcher/states/Launch.ts | 10 +++--- 10 files changed, 135 insertions(+), 40 deletions(-) diff --git a/public/locales/de-de.yaml b/public/locales/de-de.yaml index 451ecf2..856baee 100644 --- a/public/locales/de-de.yaml +++ b/public/locales/de-de.yaml @@ -119,12 +119,15 @@ settings: # GameMode gamemode: title: Benutze GameMode - tooltip: GameMode ist ein Program welches die Leistung verbessert + tooltip: + enabled: GameMode ist ein Program welches die Leistung verbessert + disabled: ⚠️ Sie haben GameMode nicht installiert # AMD FSR fsr: title: AMD FSR - tooltip: Diese Option aktiviert AMD FidelityFX Super Resolution (FSR), womit kleine Resolution hochskaliert wird um FPS-verlust zu vermeiden. + tooltip: Diese Option aktiviert AMD FidelityFX Super Resolution (FSR), + womit kleine Resolution hochskaliert wird um FPS-verlust zu vermeiden. # Unlock FPS fps_unlocker: @@ -181,6 +184,7 @@ settings: author: 'Autor: {author}' no_images: Keine Bilder verfügbar + not_installed: Sie haben vkBasalt und Reshade-Shader nicht installiert # Environmantal variables manager environment: diff --git a/public/locales/en-us.yaml b/public/locales/en-us.yaml index 875a979..2466c6a 100644 --- a/public/locales/en-us.yaml +++ b/public/locales/en-us.yaml @@ -119,12 +119,15 @@ settings: # GameMode gamemode: title: Use GameMode - tooltip: It is a software that can improve the game performance + tooltip: + enabled: It is a software that can improve the game performance + disabled: ⚠️ You don't have gamemode package installed # AMD FSR fsr: title: Enable AMD FSR - tooltip: This option enables AMD FidelityFX Super Resolution (FSR) which will scale your game resolution without losing FPS + tooltip: This option enables AMD FidelityFX Super Resolution (FSR) + which will scale your game resolution without losing FPS # Unlock FPS fps_unlocker: @@ -180,6 +183,7 @@ settings: author: 'Author: {author}' no_images: No images added + not_installed: You haven't installed vkBasalt and reshade-shaders library # Environmantal variables manager environment: diff --git a/public/locales/fr-fr.yaml b/public/locales/fr-fr.yaml index c8aa0ea..8952176 100644 --- a/public/locales/fr-fr.yaml +++ b/public/locales/fr-fr.yaml @@ -121,13 +121,15 @@ settings: # GameMode gamemode: title: Utiliser GameMode - tooltip: C'est un logiciel qui permet d'améliorer les - performances en jeu + tooltip: + enabled: C'est un logiciel qui permet d'améliorer les performances en jeu + disabled: ⚠️ You don't have gamemode package installed # AMD FSR fsr: - title: Enable AMD FSR - tooltip: This option enables AMD FidelityFX Super Resolution (FSR) which will scale your game resolution without losing FPS + title: Activer AMD FSR + tooltip: Cette option active "AMD FidelityFX Super Resolution" (FSR) + ce qui permet d'augmenter votre résolution sans perdre des FPS (images par secondes) # Unlock FPS fps_unlocker: @@ -187,6 +189,7 @@ settings: author: 'Auteur: {author}' no_images: Aucune image ajoutée + not_installed: You haven't installed vkBasalt and reshade-shaders library # Environmantal variables manager environment: diff --git a/public/locales/it-it.yaml b/public/locales/it-it.yaml index de7a4e6..a1ed82f 100644 --- a/public/locales/it-it.yaml +++ b/public/locales/it-it.yaml @@ -119,7 +119,9 @@ settings: # GameMode gamemode: title: Usa GameMode - tooltip: È un software che può migliorare le prestazioni in gioco + tooltip: + enabled: È un software che può migliorare le prestazioni in gioco + disabled: ⚠️ You don't have gamemode package installed # AMD FSR fsr: @@ -179,6 +181,7 @@ settings: author: 'Autore: {author}' no_images: Nessuna immagine aggiunta + not_installed: You haven't installed vkBasalt and reshade-shaders library # Environmantal variables manager environment: diff --git a/public/locales/ru-ru.yaml b/public/locales/ru-ru.yaml index 30e4bc0..f7bb8a1 100644 --- a/public/locales/ru-ru.yaml +++ b/public/locales/ru-ru.yaml @@ -119,12 +119,15 @@ settings: # GameMode gamemode: title: Использовать GameMode - tooltip: Это программа, которая может улучшить производительность игры + tooltip: + enabled: Это программа, которая может улучшить производительность игры + disabled: ⚠️ У вас не установлен пакет gamemode # AMD FSR fsr: title: Включить AMD FSR - tooltip: Эта опция включает AMD FidelityFX Super Resolution (FSR), который может увеличить разрешение игры без потери кадров + tooltip: Эта опция включает AMD FidelityFX Super Resolution (FSR), + который может увеличить разрешение игры без потери кадров # Разблокировать FPS fps_unlocker: @@ -179,6 +182,7 @@ settings: author: 'Автор: {author}' no_images: Нет добавленных изображений + not_installed: У вас не установлены пакеты vkBasalt и reshade-shaders # Менеджер переменных среды environment: diff --git a/public/locales/uwu.yaml b/public/locales/uwu.yaml index 85c85f3..d785ada 100644 --- a/public/locales/uwu.yaml +++ b/public/locales/uwu.yaml @@ -119,7 +119,9 @@ settings: # GameMode gamemode: title: use G-GameMode - tooltip: it i-is a software t-that can impwove the game pewfowmance + tooltip: + enabled: it i-is a software t-that can impwove the game pewfowmance + disabled: ⚠️ You don't have gamemode package installed # AMD FSR fsr: @@ -180,6 +182,7 @@ settings: author: 'a-authow: {author}' no_images: no images avaiwable + not_installed: You haven't installed vkBasalt and reshade-shaders library # Environmantal variables manager environment: diff --git a/src/components/ShadersSelection.svelte b/src/components/ShadersSelection.svelte index 4fbc91b..88e440c 100644 --- a/src/components/ShadersSelection.svelte +++ b/src/components/ShadersSelection.svelte @@ -2,11 +2,14 @@ import { _, locale } from 'svelte-i18n'; import type { Shader } from '../ts/types/Shaders'; + import Shaders from '../ts/launcher/Shaders'; + import Launcher from '../ts/Launcher'; import SelectionBox from './SelectionBox.svelte'; let shaders: Shader[] = [], + reshadeInstalled = true, shadersOptions = { 'none': 'settings.shaders.items.shaders.items.none' }; @@ -19,33 +22,39 @@ shadersOptions['custom'] = 'settings.shaders.items.shaders.items.custom'; }); + + Launcher.isPackageAvailable('reshade').then((available) => reshadeInstalled = available);
- + {#if !reshadeInstalled} +

{$_('settings.shaders.items.not_installed')}

+ {:else} + - {#each shaders as shader} -

{shader.name}

+ {#each shaders as shader} +

{shader.name}

-

{$_('settings.shaders.items.author', { values: { author: shader.author } })}

+

{$_('settings.shaders.items.author', { values: { author: shader.author } })}

- {#if !shader.images} -

{$_('settings.shaders.items.no_images')}

- {:else} - {#each shader.images as image} - {#await Shaders.getPicture(shader.folder, image.file) then picture} - + {#if !shader.images} +

{$_('settings.shaders.items.no_images')}

+ {:else} + {#each shader.images as image} + {#await Shaders.getPicture(shader.folder, image.file) then picture} + -

{$locale && image.caption[$locale] ? image.caption[$locale] : image.caption['en-us']}

- {/await} - {/each} - {/if} - {/each} +

{$locale && image.caption[$locale] ? image.caption[$locale] : image.caption['en-us']}

+ {/await} + {/each} + {/if} + {/each} + {/if}