Merge pull request #199 from an-anime-team/next

Release 3.7.3
This commit is contained in:
Observer KRypt0n_ 2023-06-18 16:24:49 +02:00 committed by GitHub
commit f5eaebdd3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 266 additions and 276 deletions

View file

@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added
- Added telemetry disabling state support
- Added Discord RPC icons updating
### Changed
- Replaced xlua patch by "disable mhypbase" option
- Returned back old `background` file path
## [3.7.2] - 14.06.2023 ## [3.7.2] - 14.06.2023
### Fixed ### Fixed

36
Cargo.lock generated
View file

@ -48,8 +48,8 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "1.12.1" version = "1.13.1"
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.12.1#af3b58e1657a19d0c8069956f3c2ac610704fc46" source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.13.1#e8b99564f4ea12a331aa276ea91fe65c0ead465e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bzip2", "bzip2",
@ -96,8 +96,8 @@ dependencies = [
[[package]] [[package]]
name = "anime-launcher-sdk" name = "anime-launcher-sdk"
version = "1.7.2" version = "1.8.2"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.7.2#14882b44e6f70cff763c5f3750e079fccd73670b" source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.8.2#1a9323152099ec958538e32cb5a3c423271b00c8"
dependencies = [ dependencies = [
"anime-game-core", "anime-game-core",
"anyhow", "anyhow",
@ -543,9 +543,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]] [[package]]
name = "cpufeatures" name = "cpufeatures"
version = "0.2.7" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@ -1136,9 +1136,9 @@ dependencies = [
[[package]] [[package]]
name = "gimli" name = "gimli"
version = "0.27.2" version = "0.27.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
[[package]] [[package]]
name = "gio" name = "gio"
@ -2321,9 +2321,9 @@ dependencies = [
[[package]] [[package]]
name = "rustls-native-certs" name = "rustls-native-certs"
version = "0.6.2" version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [ dependencies = [
"openssl-probe", "openssl-probe",
"rustls-pemfile", "rustls-pemfile",
@ -2437,9 +2437,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.96" version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@ -2479,9 +2479,9 @@ dependencies = [
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.10.6" version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures", "cpufeatures",
@ -3157,9 +3157,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "wincompatlib" name = "wincompatlib"
version = "0.7.2" version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f1df70b617ad08dc336d13f1c7998a95781313fd6a0bffa1f45857c8254581" checksum = "89cd8dd63a2925273bdc4efd837ac5b847b06b23f141ce73664e274d54bbfa83"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"minreq", "minreq",
@ -3314,9 +3314,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.4.6" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]

View file

@ -17,7 +17,7 @@ glib-build-tools = "0.17"
[dependencies.anime-launcher-sdk] [dependencies.anime-launcher-sdk]
git = "https://github.com/an-anime-team/anime-launcher-sdk" git = "https://github.com/an-anime-team/anime-launcher-sdk"
tag = "1.7.2" tag = "1.8.2"
features = ["all", "genshin", "genshin-patch"] features = ["all", "genshin", "genshin-patch"]
# path = "../anime-launcher-sdk" # ! for dev purposes only # path = "../anime-launcher-sdk" # ! for dev purposes only

View file

@ -42,6 +42,10 @@ patch-sync-failed = Synchronisierung des Patch-Ordners fehlgeschlagen
patch-state-check-failed = Status des Patchordners konnte nicht überprüft werden patch-state-check-failed = Status des Patchordners konnte nicht überprüft werden
game-patching-error = Spiel konnte nicht gepatcht werden game-patching-error = Spiel konnte nicht gepatcht werden
# Disable telemetry
telemetry-servers-disabling-error = Telemetrie server konnten nicht geblockt werden
# Sandbox # Sandbox
documentation-url-open-failed = Dokumentations-URL kann nicht geöffnet werden documentation-url-open-failed = Dokumentations-URL kann nicht geöffnet werden

View file

@ -37,9 +37,6 @@ game-outdated = Das Spiel ist zu veraltet und kann nicht mehr aktualisiert werde
player-patch-version = Hauptpatch-Version player-patch-version = Hauptpatch-Version
player-patch-version-description = Hauptpatch, mit dem Sie das Spiel unter Linux spielen können player-patch-version-description = Hauptpatch, mit dem Sie das Spiel unter Linux spielen können
xlua-patch-version = zusätzliche Patch-Version
xlua-patch-version-description = Zusätzlicher Patch, der einige Probleme behebt und die Leistung auf Low-End-PCs verbessert
patch-not-available = nicht verfügbar patch-not-available = nicht verfügbar
patch-not-available-tooltip = Patch-Server sind unerreichbar patch-not-available-tooltip = Patch-Server sind unerreichbar
@ -55,7 +52,8 @@ patch-not-applied-tooltip = Patch ist nicht angewendet
apply-main-patch = Hauptpatch Anwenden apply-main-patch = Hauptpatch Anwenden
apply-main-patch-description = Experimentell. Wenn Sie diese Option deaktivieren, können Sie das Spiel ausführen, ohne den Patch anzuwenden. Dies könnte möglicherweise nicht funktionieren oder erfordert manuelle Änderungen an den Dateien. Verwenden Sie dies nur wenn Sie wissen was Sie tun. apply-main-patch-description = Experimentell. Wenn Sie diese Option deaktivieren, können Sie das Spiel ausführen, ohne den Patch anzuwenden. Dies könnte möglicherweise nicht funktionieren oder erfordert manuelle Änderungen an den Dateien. Verwenden Sie dies nur wenn Sie wissen was Sie tun.
apply-xlua-patch = Zusätzlichen Patch anwenden disable-mhypbase = Deaktiviere mhypbase
disable-mhypbase-description = Experimentell. Wenn sie diese option aktivieren, wird der launcher mhypbase.dll während des patchens deaktivieren, welches mit dem xlua Patch gleichzusetzen ist. Verbessert die Leistung und reduzuert Prozessorauslastung.
ask-superuser-permissions = Superuser-Berechtigungen anfordern ask-superuser-permissions = Superuser-Berechtigungen anfordern
ask-superuser-permissions-description = Launcher benötigt Superuser-Zugriff, um Ihre Hosts-Datei automatisch zu aktualisieren. Dies ist in der Flatpak-Edition nicht erforderlich ask-superuser-permissions-description = Launcher benötigt Superuser-Zugriff, um Ihre Hosts-Datei automatisch zu aktualisieren. Dies ist in der Flatpak-Edition nicht erforderlich

View file

@ -55,6 +55,7 @@ launch = Starten
migrate-folders = Ordner migrieren migrate-folders = Ordner migrieren
migrate-folders-tooltip = Spielordnerstruktur aktualisieren migrate-folders-tooltip = Spielordnerstruktur aktualisieren
apply-patch = Patch anwenden apply-patch = Patch anwenden
disable-telemetry = Blockiere Telemetrie
download-wine = Wine Herunterladen download-wine = Wine Herunterladen
create-prefix = Prefix erstellen create-prefix = Prefix erstellen
update = Updaten update = Updaten

View file

@ -42,6 +42,10 @@ patch-sync-failed = Failed to sync patch folder
patch-state-check-failed = Failed to check patch folder state patch-state-check-failed = Failed to check patch folder state
game-patching-error = Failed to patch game game-patching-error = Failed to patch game
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Failed to open documentation URL documentation-url-open-failed = Failed to open documentation URL

View file

@ -37,9 +37,6 @@ game-outdated = Game is too outdated and can't be updated. Latest version: {$lat
player-patch-version = Player patch version player-patch-version = Player patch version
player-patch-version-description = Main patch that lets you play the game on Linux player-patch-version-description = Main patch that lets you play the game on Linux
xlua-patch-version = Xlua patch version
xlua-patch-version-description = Additional patch that fixes some issues and improves performance on low-end PCs
patch-not-available = not available patch-not-available = not available
patch-not-available-tooltip = Patch servers are unreachable patch-not-available-tooltip = Patch servers are unreachable
@ -55,7 +52,8 @@ patch-not-applied-tooltip = Patch is not applied
apply-main-patch = Apply main patch apply-main-patch = Apply main patch
apply-main-patch-description = Experimental. Disabling this allows you to run the game without applying the patch. This may not work, or require manual files modifications. Use if you know what you're doing apply-main-patch-description = Experimental. Disabling this allows you to run the game without applying the patch. This may not work, or require manual files modifications. Use if you know what you're doing
apply-xlua-patch = Apply xlua patch disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Ask superuser permissions ask-superuser-permissions = Ask superuser permissions
ask-superuser-permissions-description = Launcher will use them to automatically update your hosts file. This is not needed in flatpak edition ask-superuser-permissions-description = Launcher will use them to automatically update your hosts file. This is not needed in flatpak edition

View file

@ -55,6 +55,7 @@ launch = Launch
migrate-folders = Migrate folders migrate-folders = Migrate folders
migrate-folders-tooltip = Update game folders structure migrate-folders-tooltip = Update game folders structure
apply-patch = Apply patch apply-patch = Apply patch
disable-telemetry = Disable telemetry
download-wine = Download wine download-wine = Download wine
create-prefix = Create prefix create-prefix = Create prefix
update = Update update = Update

View file

@ -42,6 +42,10 @@ patch-sync-failed = Fallo al sincronizar carpeta del parche
patch-state-check-failed = Fallo al comprobar estado de carpeta del parche patch-state-check-failed = Fallo al comprobar estado de carpeta del parche
game-patching-error = Fallo al parchear el juego game-patching-error = Fallo al parchear el juego
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Failed to open documentation URL documentation-url-open-failed = Failed to open documentation URL

View file

@ -37,9 +37,6 @@ game-outdated = El juego está demasiado desactualizado y no puede actualizarse.
player-patch-version = Versión del parche del jugador player-patch-version = Versión del parche del jugador
player-patch-version-description = El parche principal que te permite jugar al juego en Linux player-patch-version-description = El parche principal que te permite jugar al juego en Linux
xlua-patch-version = Versión del parche Xlua
xlua-patch-version-description = Parche adicional que arregla algunos problemas y mejora el rendimiento en PCs de gama baja
patch-not-available = No disponible patch-not-available = No disponible
patch-not-available-tooltip = Los servidores del parche no pudieron contactarse patch-not-available-tooltip = Los servidores del parche no pudieron contactarse
@ -55,7 +52,8 @@ patch-not-applied-tooltip = El parche no está aplicado
apply-main-patch = Aplicar parche principal apply-main-patch = Aplicar parche principal
apply-main-patch-description = Experimental. Deshabilitar esta opción te permitirá correr el juego sin aplicar el parche. Esto podría no funcionar, o requerir modificaciones manuales a los archivos. Úsalo sólo si sabes lo que estás haciendo apply-main-patch-description = Experimental. Deshabilitar esta opción te permitirá correr el juego sin aplicar el parche. Esto podría no funcionar, o requerir modificaciones manuales a los archivos. Úsalo sólo si sabes lo que estás haciendo
apply-xlua-patch = Aplicar parche Xlua disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Pedir permisos de superusuario ask-superuser-permissions = Pedir permisos de superusuario
ask-superuser-permissions-description = El launcher usará los permisos para actualizar automáticamente tu archivo hosts. Esto no es necesario en la versión de Flatpak ask-superuser-permissions-description = El launcher usará los permisos para actualizar automáticamente tu archivo hosts. Esto no es necesario en la versión de Flatpak

View file

@ -55,6 +55,7 @@ launch = Iniciar
migrate-folders = Migrar carpetas migrate-folders = Migrar carpetas
migrate-folders-tooltip = Actualizar estructura de carpetas del juego migrate-folders-tooltip = Actualizar estructura de carpetas del juego
apply-patch = Aplicar parche apply-patch = Aplicar parche
disable-telemetry = Disable telemetry
download-wine = Descargar wine download-wine = Descargar wine
create-prefix = Crear prefijo create-prefix = Crear prefijo
update = Actualizar update = Actualizar

View file

@ -42,6 +42,10 @@ patch-sync-failed = Impossible de synchroniser le patch
patch-state-check-failed = Impossible de déterminer l'état du patch patch-state-check-failed = Impossible de déterminer l'état du patch
game-patching-error = Le patch du jeu a échoué game-patching-error = Le patch du jeu a échoué
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Failed to open documentation URL documentation-url-open-failed = Failed to open documentation URL

View file

@ -37,9 +37,6 @@ game-outdated = La version du jeu installée est trop ancienne et ne peut pas ê
player-patch-version = Player patch version player-patch-version = Player patch version
player-patch-version-description = Main patch that lets you play the game on Linux player-patch-version-description = Main patch that lets you play the game on Linux
xlua-patch-version = Xlua patch version
xlua-patch-version-description = Additional patch that fixes some issues and improves performance on low-end PCs
patch-not-available = patch non disponible patch-not-available = patch non disponible
patch-not-available-tooltip = Impossible d'accéder aux serveurs de patch patch-not-available-tooltip = Impossible d'accéder aux serveurs de patch
@ -55,7 +52,8 @@ patch-not-applied-tooltip = Patch is not applied
apply-main-patch = Appliquer le patch principal apply-main-patch = Appliquer le patch principal
apply-main-patch-description = Expériment. Désactiver cette option permet de lancer le jeu sans le patch. Il n'est pas garanti que cette option marche, et des modifications manuelles seront potentiellement nécessaires. À n'utiliser que si vous savez ce que vous faites apply-main-patch-description = Expériment. Désactiver cette option permet de lancer le jeu sans le patch. Il n'est pas garanti que cette option marche, et des modifications manuelles seront potentiellement nécessaires. À n'utiliser que si vous savez ce que vous faites
apply-xlua-patch = Apply xlua patch disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Ask superuser permissions ask-superuser-permissions = Ask superuser permissions
ask-superuser-permissions-description = Launcher will use them to automatically update your hosts file. This is not needed in flatpak edition ask-superuser-permissions-description = Launcher will use them to automatically update your hosts file. This is not needed in flatpak edition

View file

@ -55,6 +55,7 @@ launch = Lancer
migrate-folders = Migrate folders migrate-folders = Migrate folders
migrate-folders-tooltip = Update game folders structure migrate-folders-tooltip = Update game folders structure
apply-patch = Appliquer le patch apply-patch = Appliquer le patch
disable-telemetry = Disable telemetry
download-wine = Télécharger wine download-wine = Télécharger wine
create-prefix = Créer le préfix wine create-prefix = Créer le préfix wine
update = Mettre à jour update = Mettre à jour

View file

@ -42,6 +42,10 @@ patch-sync-failed = Patch mappa szinkronizálása sikertelen
patch-state-check-failed = Patch mappa állapota ellenőrzése sikertelen patch-state-check-failed = Patch mappa állapota ellenőrzése sikertelen
game-patching-error = Sikertelen játék patchelés game-patching-error = Sikertelen játék patchelés
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Failed to open documentation URL documentation-url-open-failed = Failed to open documentation URL

View file

@ -37,9 +37,6 @@ game-outdated = A játékverzió túl régi és nem frissíthető. Legfrissebb:
player-patch-version = Játékos patch verzió player-patch-version = Játékos patch verzió
player-patch-version-description = A fő patch amivel játszhatsz Linuxon player-patch-version-description = A fő patch amivel játszhatsz Linuxon
xlua-patch-version = Xlua patch verzió
xlua-patch-version-description = Extra patch ami javít pár problémán és jobb teljesítményt nyújt gyenge gépeken
patch-not-available = nem elérhető patch-not-available = nem elérhető
patch-not-available-tooltip = A patch szerverek nem elérhetőek patch-not-available-tooltip = A patch szerverek nem elérhetőek
@ -55,7 +52,8 @@ patch-not-applied-tooltip = A patch nincs alkalmazva
apply-main-patch = Fő patch alkalmazása apply-main-patch = Fő patch alkalmazása
apply-main-patch-description = Kísérleti opció, a kikapcsolásával futtathatod a játékot patch nélkül. Lehet hogy nem fog működni, vagy a fájlokat manuálisan kell szerkesztened, akkor kapcsold ki ha tudod mit csinálsz. apply-main-patch-description = Kísérleti opció, a kikapcsolásával futtathatod a játékot patch nélkül. Lehet hogy nem fog működni, vagy a fájlokat manuálisan kell szerkesztened, akkor kapcsold ki ha tudod mit csinálsz.
apply-xlua-patch = Xlua patch alkalmazása disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Superuser engedély kérése ask-superuser-permissions = Superuser engedély kérése
ask-superuser-permissions-description = A Launcher autómatikusan használni fogja hogy frissítse a hosts fájlodat. A Flatpak verzióhoz nem kell ask-superuser-permissions-description = A Launcher autómatikusan használni fogja hogy frissítse a hosts fájlodat. A Flatpak verzióhoz nem kell

View file

@ -55,6 +55,7 @@ launch = Indítás
migrate-folders = Mappák migrálása migrate-folders = Mappák migrálása
migrate-folders-tooltip = Játékmappa struktúra frissítése migrate-folders-tooltip = Játékmappa struktúra frissítése
apply-patch = Patch alkalmazása apply-patch = Patch alkalmazása
disable-telemetry = Disable telemetry
download-wine = Wine letöltése download-wine = Wine letöltése
create-prefix = Prefix létrehozása create-prefix = Prefix létrehozása
update = Frissítés update = Frissítés

View file

@ -42,6 +42,10 @@ patch-sync-failed = Gagal mensinkronisasi folder patch
patch-state-check-failed = Gagal mengecek kondisi folder patch patch-state-check-failed = Gagal mengecek kondisi folder patch
game-patching-error = Gagal melakukan patch pada game game-patching-error = Gagal melakukan patch pada game
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Gagal membuka tautan dokumentasi documentation-url-open-failed = Gagal membuka tautan dokumentasi

View file

@ -37,9 +37,6 @@ game-outdated = Versi game terlalu lama dan tidak dapat diperbarui. Versi terbar
player-patch-version = Versi patch player-patch-version = Versi patch
player-patch-version-description = Patch utama yang membuat game bisa dimainkan di Linux player-patch-version-description = Patch utama yang membuat game bisa dimainkan di Linux
xlua-patch-version = Versi patch Xlua
xlua-patch-version-description = Patch tambahan yang memperbaiki beberapa isu dan meningkatkan performa di PC low-end
patch-not-available = Tidak tersedia patch-not-available = Tidak tersedia
patch-not-available-tooltip = Server patch tidak bisa dijangkau patch-not-available-tooltip = Server patch tidak bisa dijangkau
@ -55,7 +52,8 @@ patch-not-applied-tooltip = Patch tidak diterapkan
apply-main-patch = Terapkan patch utama apply-main-patch = Terapkan patch utama
apply-main-patch-description = Eksperimental. Menonaktifkan opsi ini akan menginzinkan Anda menjalankan game tanpa menerapkan patch. Hal ini mungkin tidak bekerja, atau membutuhkan modifikasi file secara manual. Gunakan jika Anda tahu apa yang Anda lakukan apply-main-patch-description = Eksperimental. Menonaktifkan opsi ini akan menginzinkan Anda menjalankan game tanpa menerapkan patch. Hal ini mungkin tidak bekerja, atau membutuhkan modifikasi file secara manual. Gunakan jika Anda tahu apa yang Anda lakukan
apply-xlua-patch = Terapkan patch xlua disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Minta izin dari admin ask-superuser-permissions = Minta izin dari admin
ask-superuser-permissions-description = Launcher akan otomatis memperbarui file hosts Anda. Opsi ini tidak diperlukan jika Anda memakai edisi flatpak ask-superuser-permissions-description = Launcher akan otomatis memperbarui file hosts Anda. Opsi ini tidak diperlukan jika Anda memakai edisi flatpak

View file

@ -55,6 +55,7 @@ launch = Luncurkan
migrate-folders = Pindahkan folder migrate-folders = Pindahkan folder
migrate-folders-tooltip = Perbarui struktur folder game migrate-folders-tooltip = Perbarui struktur folder game
apply-patch = Terapkan patch apply-patch = Terapkan patch
disable-telemetry = Disable telemetry
download-wine = Unduh wine download-wine = Unduh wine
create-prefix = Buat prefix create-prefix = Buat prefix
update = Perbarui update = Perbarui

View file

@ -42,6 +42,10 @@ patch-sync-failed = Sincronizzazione della cartella della patch non riuscita
patch-state-check-failed = Controllo dello stato della cartella della patch non riuscito patch-state-check-failed = Controllo dello stato della cartella della patch non riuscito
game-patching-error = Patching del gioco non riuscito game-patching-error = Patching del gioco non riuscito
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Apertura dell'URL della documentazione non riuscita documentation-url-open-failed = Apertura dell'URL della documentazione non riuscita

View file

@ -37,9 +37,6 @@ game-outdated = La versione del gioco è troppo vecchia e non può essere aggior
player-patch-version = Versione della patch player player-patch-version = Versione della patch player
player-patch-version-description = Patch principale che ti permette di giocare al gioco su Linux player-patch-version-description = Patch principale che ti permette di giocare al gioco su Linux
xlua-patch-version = Versione dell patch Xlua
xlua-patch-version-description = Ulteriore patch che sistema alcuni problemi e migliora le prestazioni su PC di fascia bassa
patch-not-available = non disponibile patch-not-available = non disponibile
patch-not-available-tooltip = I server delle patch sono irraggiungibili patch-not-available-tooltip = I server delle patch sono irraggiungibili
@ -55,7 +52,8 @@ patch-not-applied-tooltip = La patch non è applicata
apply-main-patch = Applica la patch principale apply-main-patch = Applica la patch principale
apply-main-patch-description = Sperimentale. Disabilitandola ti permette di eseguite il gioco senza applicare la patch. Ciò potrebbe non funzionare o richiedere modifiche manuali ai file. Usala se sai cosa stai facendo apply-main-patch-description = Sperimentale. Disabilitandola ti permette di eseguite il gioco senza applicare la patch. Ciò potrebbe non funzionare o richiedere modifiche manuali ai file. Usala se sai cosa stai facendo
apply-xlua-patch = Applica la patch xlua disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Chiedi permessi di amministratore ask-superuser-permissions = Chiedi permessi di amministratore
ask-superuser-permissions-description = Il launcher li userà per aggiornare automaticamente il tuo file hosts. Questo non è necessario nell'edizione flatpak ask-superuser-permissions-description = Il launcher li userà per aggiornare automaticamente il tuo file hosts. Questo non è necessario nell'edizione flatpak

View file

@ -55,6 +55,7 @@ launch = Lancia
migrate-folders = Migra cartelle migrate-folders = Migra cartelle
migrate-folders-tooltip = Aggiorna la struttura delle cartelle del gioco migrate-folders-tooltip = Aggiorna la struttura delle cartelle del gioco
apply-patch = Applica patch apply-patch = Applica patch
disable-telemetry = Disable telemetry
download-wine = Scarica wine download-wine = Scarica wine
create-prefix = Crea prefisso create-prefix = Crea prefisso
update = Aggiorna update = Aggiorna

View file

@ -42,6 +42,10 @@ patch-sync-failed = パッチフォルダの同期に失敗しました
patch-state-check-failed = パッチフォルダの状態を確認するのに失敗しました patch-state-check-failed = パッチフォルダの状態を確認するのに失敗しました
game-patching-error = ゲームのパッチに失敗しました。 game-patching-error = ゲームのパッチに失敗しました。
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = ドキュメントページを開けませんでした。 documentation-url-open-failed = ドキュメントページを開けませんでした。

View file

@ -37,9 +37,6 @@ game-outdated = ゲームが非常に古いためアップデートできませ
player-patch-version = プレイヤーのパッチバージョン player-patch-version = プレイヤーのパッチバージョン
player-patch-version-description = Linuxでプレイするためのメインのパッチです。 player-patch-version-description = Linuxでプレイするためのメインのパッチです。
xlua-patch-version = Xlua のパッチバージョン
xlua-patch-version-description = これは追加のパッチで、低スペックなPCのパフォーマンスの改善や、いくつかの細かい問題点を修正できます。
patch-not-available = ありません。 patch-not-available = ありません。
patch-not-available-tooltip = パッチサーバーに接続できませんでした。 patch-not-available-tooltip = パッチサーバーに接続できませんでした。
@ -55,7 +52,8 @@ patch-not-applied-tooltip = パッチが適用されませんでした。
apply-main-patch = メインパッチを適用 apply-main-patch = メインパッチを適用
apply-main-patch-description = 実験的です。これを無効にするとパッチ無しでゲームを起動することができます。これが機能しない場合、手動でパッチを適用する必要があります。これが何を意味するのかを理解できない人は無効にするべきではないでしょう。 apply-main-patch-description = 実験的です。これを無効にするとパッチ無しでゲームを起動することができます。これが機能しない場合、手動でパッチを適用する必要があります。これが何を意味するのかを理解できない人は無効にするべきではないでしょう。
apply-xlua-patch = xluaパッチを適用する disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = スーパーユーザーを尋ねる。 ask-superuser-permissions = スーパーユーザーを尋ねる。
ask-superuser-permissions-description = あなたのホストのファイルを自動更新するために、 これらを利用します。flatpak版では必要ありません。 ask-superuser-permissions-description = あなたのホストのファイルを自動更新するために、 これらを利用します。flatpak版では必要ありません。

View file

@ -55,6 +55,7 @@ launch = 起動
migrate-folders = 移行ファイル migrate-folders = 移行ファイル
migrate-folders-tooltip = ゲームフォルダ構成を更新 migrate-folders-tooltip = ゲームフォルダ構成を更新
apply-patch = パッチを適用する apply-patch = パッチを適用する
disable-telemetry = Disable telemetry
download-wine = ワインをダウンロード download-wine = ワインをダウンロード
create-prefix = プレフィックスを作成 create-prefix = プレフィックスを作成
update = 更新 update = 更新

View file

@ -42,6 +42,10 @@ patch-sync-failed = Ошибка синхронизации папки патч
patch-state-check-failed = Ошибка проверки статуса папки патча patch-state-check-failed = Ошибка проверки статуса папки патча
game-patching-error = Не удалось установить патч игры game-patching-error = Не удалось установить патч игры
# Disable telemetry
telemetry-servers-disabling-error = Не удалось отключить серверы телеметрии
# Sandbox # Sandbox
documentation-url-open-failed = Не удалось открыть ссылку с документацией documentation-url-open-failed = Не удалось открыть ссылку с документацией

View file

@ -37,9 +37,6 @@ game-outdated = Версия игры слишком устаревшая и н
player-patch-version = Версия основного патча player-patch-version = Версия основного патча
player-patch-version-description = Основной патч, позволяющий вам играть в игру на линуксе player-patch-version-description = Основной патч, позволяющий вам играть в игру на линуксе
xlua-patch-version = Версия патча xlua
xlua-patch-version-description = Дополнительный патч, устраняющий некоторые проблемы и улучшающий производительность на слабых ПК
patch-not-available = недоступен patch-not-available = недоступен
patch-not-available-tooltip = Серверы патча недоступны patch-not-available-tooltip = Серверы патча недоступны
@ -55,10 +52,11 @@ patch-not-applied-tooltip = Патч не применен
apply-main-patch = Применять основной патч apply-main-patch = Применять основной патч
apply-main-patch-description = Экспериментально. Отключение опции позволяет запускать игру без применения патча. Это может не работать или требовать ручного изменения файлов. Используйте если знаете что делаете apply-main-patch-description = Экспериментально. Отключение опции позволяет запускать игру без применения патча. Это может не работать или требовать ручного изменения файлов. Используйте если знаете что делаете
apply-xlua-patch = Применять патч xlua disable-mhypbase = Отключать mhypbase
disable-mhypbase-description = Экспериментально. Когда включено, лаунчер будет отключать mhypbase.dll во время применения основного патча, что сейчас является эквивалентом патча xlua. Улучшает производительность и снижает нагрузку на процессор
ask-superuser-permissions = Запрашивать права суперпользователя ask-superuser-permissions = Запрашивать права суперпользователя
ask-superuser-permissions-description = Лаунчер будет использовать их чтобы автоматически обновлять ваш hosts файл. Это не требуется при использовании flatpak ask-superuser-permissions-description = Лаунчер будет использовать их чтобы автоматически обновлять ваш hosts файл для отключения телеметрии игры. Не требуется при использовании flatpak
wine-tools = Инструменты Wine wine-tools = Инструменты Wine
command-line = Коммандная строка command-line = Коммандная строка

View file

@ -61,6 +61,7 @@ launch = Запустить
migrate-folders = Переместить папки migrate-folders = Переместить папки
migrate-folders-tooltip = Обновить структуру файлов игры migrate-folders-tooltip = Обновить структуру файлов игры
apply-patch = Применить патч apply-patch = Применить патч
disable-telemetry = Отключить телеметрию
download-wine = Установить Wine download-wine = Установить Wine
create-prefix = Создать префикс create-prefix = Создать префикс
update = Обновить update = Обновить

View file

@ -4,7 +4,7 @@ sandbox-description = Запускать игру в изолированном
enable-sandboxing = Использовать песочницу enable-sandboxing = Использовать песочницу
enable-sandboxing-description = Запускать игру в копии корневой файловой системы компьютера без прав на изменение файлов enable-sandboxing-description = Запускать игру в копии корневой файловой системы компьютера без прав на изменение файлов
hide-home-directory = Скрыть домашнюю директорию hide-home-directory = Скрывать домашнюю директорию
hide-home-directory-description = Изолировать ваши директории /home, /var/home/$USER, и $HOME от игры hide-home-directory-description = Изолировать ваши директории /home, /var/home/$USER, и $HOME от игры
hostname = Имя хоста hostname = Имя хоста

View file

@ -42,6 +42,10 @@ patch-sync-failed = Yama dosyalarını senkronize etme başarısız oldu
patch-state-check-failed = Yama dosyalarının durumunu kontrol etme başarısız oldu patch-state-check-failed = Yama dosyalarının durumunu kontrol etme başarısız oldu
game-patching-error = Yamayı uygulamada sorun çıktı game-patching-error = Yamayı uygulamada sorun çıktı
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Belgelemenin URL'si açılamadı documentation-url-open-failed = Belgelemenin URL'si açılamadı

View file

@ -37,9 +37,6 @@ game-outdated = Oyun çok eski, bu yüzden güncellenemez. En son sürüm: {$lat
player-patch-version = Ana yama versiyonu player-patch-version = Ana yama versiyonu
player-patch-version-description = Oyunu Linux'ta oynamanıza izin veren ana yama player-patch-version-description = Oyunu Linux'ta oynamanıza izin veren ana yama
xlua-patch-version = Xlua yama versiyonu
xlua-patch-version-description = Eski bilgisayarlarda performansı arttıran ve birkaç sorunu düzelten ekstra yama
patch-not-available = Mevcut değil patch-not-available = Mevcut değil
patch-not-available-tooltip = Yama sunucularına erişilemiyor patch-not-available-tooltip = Yama sunucularına erişilemiyor
@ -55,7 +52,8 @@ patch-not-applied-tooltip = Yama uygulanmamış
apply-main-patch = Ana yamayı uygula apply-main-patch = Ana yamayı uygula
apply-main-patch-description = Deneysel. Bunu devre dışı bırakmak yamayı uygulamadan oyunu çalıştırmanızı sağlar. Bu çalışmayabilir, ya da elle dosyaları değiştirmeyi gerektirebilir. Ne yaptığınızı biliyorsanız kullanın. apply-main-patch-description = Deneysel. Bunu devre dışı bırakmak yamayı uygulamadan oyunu çalıştırmanızı sağlar. Bu çalışmayabilir, ya da elle dosyaları değiştirmeyi gerektirebilir. Ne yaptığınızı biliyorsanız kullanın.
apply-xlua-patch = Xlua yamasını uygula disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = Yönetici izinlerini sor ask-superuser-permissions = Yönetici izinlerini sor
ask-superuser-permissions-description = İstemci yönetici iznini hostunuzun dosyalarını güncellemek için otomatik olarak kullanacaktır. Buna flatpak versiyonunda gerek yoktur ask-superuser-permissions-description = İstemci yönetici iznini hostunuzun dosyalarını güncellemek için otomatik olarak kullanacaktır. Buna flatpak versiyonunda gerek yoktur

View file

@ -55,6 +55,7 @@ launch = Çalıştır
migrate-folders = Dosyaları aktar migrate-folders = Dosyaları aktar
migrate-folders-tooltip = Oyun dosyaları yapısını güncelle migrate-folders-tooltip = Oyun dosyaları yapısını güncelle
apply-patch = Yamayı uygula apply-patch = Yamayı uygula
disable-telemetry = Disable telemetry
download-wine = Wine indir download-wine = Wine indir
create-prefix = Prefix oluştur create-prefix = Prefix oluştur
update = Güncelle update = Güncelle

View file

@ -42,6 +42,10 @@ patch-sync-failed = 同步补丁文件夹失败
patch-state-check-failed = 检查补丁文件夹失败 patch-state-check-failed = 检查补丁文件夹失败
game-patching-error = 应用游戏补丁失败 game-patching-error = 应用游戏补丁失败
# Disable telemetry
telemetry-servers-disabling-error = Failed to disable telemetry servers
# Sandbox # Sandbox
documentation-url-open-failed = Failed to open documentation URL documentation-url-open-failed = Failed to open documentation URL

View file

@ -37,9 +37,6 @@ game-outdated = 游戏版本过旧,无法更新。最新版本: {$latest}
player-patch-version = 主补丁版本 player-patch-version = 主补丁版本
player-patch-version-description = UnitPlayer.dll 的补丁,在 Linux 上运行游戏必备 player-patch-version-description = UnitPlayer.dll 的补丁,在 Linux 上运行游戏必备
xlua-patch-version = xLua 补丁版本
xlua-patch-version-description = 额外的补丁,用于修复某些问题以及改善低端 PC 的游戏性能
patch-not-available = 不可用 patch-not-available = 不可用
patch-not-available-tooltip = 无法连接补丁服务器 patch-not-available-tooltip = 无法连接补丁服务器
@ -55,7 +52,8 @@ patch-not-applied-tooltip = 补丁未应用
apply-main-patch = Apply main patch apply-main-patch = Apply main patch
apply-main-patch-description = Experimental. Disabling this allows you to run the game without applying the patch. This may not work, or require manual files modifications. Use if you know what you're doing apply-main-patch-description = Experimental. Disabling this allows you to run the game without applying the patch. This may not work, or require manual files modifications. Use if you know what you're doing
apply-xlua-patch = 应用 xLua 补丁 disable-mhypbase = Disable mhypbase
disable-mhypbase-description = Experimental. If enabled, launcher will disable mhypbase.dll during the main patch applying, which is currently an equivalent to the xlua patch. Improves performance and reduces CPU usage
ask-superuser-permissions = 请求超级用户权限 ask-superuser-permissions = 请求超级用户权限
ask-superuser-permissions-description = 启动器需要超级用户权限来修改 hosts 文件。flatpak 版无需此权限 ask-superuser-permissions-description = 启动器需要超级用户权限来修改 hosts 文件。flatpak 版无需此权限

View file

@ -55,6 +55,7 @@ launch = 启动
migrate-folders = 迁移目录 migrate-folders = 迁移目录
migrate-folders-tooltip = 更新游戏目录结构 migrate-folders-tooltip = 更新游戏目录结构
apply-patch = 安装补丁 apply-patch = 安装补丁
disable-telemetry = Disable telemetry
download-wine = 下载 Wine download-wine = 下载 Wine
create-prefix = 创建 Wine prefix create-prefix = 创建 Wine prefix
update = 更新 update = 更新

View file

@ -53,7 +53,7 @@ lazy_static::lazy_static! {
pub static ref DEBUG_FILE: PathBuf = LAUNCHER_FOLDER.join("debug.log"); pub static ref DEBUG_FILE: PathBuf = LAUNCHER_FOLDER.join("debug.log");
/// Path to `background` file. Standard is `$HOME/.cache/anime-game-launcher/background` /// Path to `background` file. Standard is `$HOME/.cache/anime-game-launcher/background`
pub static ref BACKGROUND_FILE: PathBuf = CACHE_FOLDER.join("background"); pub static ref BACKGROUND_FILE: PathBuf = LAUNCHER_FOLDER.join("background");
/// Path to `.keep-background` file. Used to mark launcher that it shouldn't update background picture /// Path to `.keep-background` file. Used to mark launcher that it shouldn't update background picture
/// ///
@ -197,8 +197,7 @@ fn main() {
} }
LauncherState::PredownloadAvailable { .. } | LauncherState::PredownloadAvailable { .. } |
LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status: PatchStatus::NotAvailable, .. }) | LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status: PatchStatus::NotAvailable, .. }, .. } => {
LauncherState::XluaPatchAvailable(XluaPatch { status: PatchStatus::NotAvailable, .. }) => {
if just_run_game { if just_run_game {
anime_launcher_sdk::genshin::game::run().expect("Failed to run the game"); anime_launcher_sdk::genshin::game::run().expect("Failed to run the game");

View file

@ -104,19 +104,18 @@ impl SimpleComponent for AboutDialog {
set_release_notes_version: &APP_VERSION, set_release_notes_version: &APP_VERSION,
set_release_notes: &[ set_release_notes: &[
"<p>Fixed</p>", "<p>Added</p>",
"<ul>", "<ul>",
"<li>Fixed check button style for newly made sessions</li>", "<li>Added telemetry disabling state support</li>",
"<li>Fixed repairer's NaN progress</li>", "<li>Added Discord RPC icons updating</li>",
"<li>Fixed game session selection when current one is removed</li>",
"</ul>", "</ul>",
"<p>Changed</p>", "<p>Changed</p>",
"<ul>", "<ul>",
"<li>Updated Spanish</li>", "<li>Replaced xlua patch by \"disable mhypbase\" option</li>",
"<li>Updated Hungarian</li>", "<li>Returned back old background file path</li>",
"</ul>", "</ul>",
].join("\n"), ].join("\n"),

View file

@ -5,7 +5,7 @@ use crate::i18n::*;
use super::{App, AppMsg}; use super::{App, AppMsg};
pub fn apply_patch<T: PatchExt + Send + Sync + 'static>(sender: ComponentSender<App>, patch: T) { pub fn apply_patch(sender: ComponentSender<App>, patch: PlayerPatch, rename_mhypbase: bool) {
match patch.status() { match patch.status() {
PatchStatus::NotAvailable | PatchStatus::NotAvailable |
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
@ -18,8 +18,6 @@ pub fn apply_patch<T: PatchExt + Send + Sync + 'static>(sender: ComponentSender<
let config = Config::get().unwrap(); let config = Config::get().unwrap();
std::thread::spawn(move || { std::thread::spawn(move || {
let mut apply_patch_if_needed = true;
if let Err(err) = patch.apply(config.game.path.for_edition(config.launcher.edition), config.patch.root) { if let Err(err) = patch.apply(config.game.path.for_edition(config.launcher.edition), config.patch.root) {
tracing::error!("Failed to patch the game"); tracing::error!("Failed to patch the game");
@ -27,16 +25,29 @@ pub fn apply_patch<T: PatchExt + Send + Sync + 'static>(sender: ComponentSender<
title: tr("game-patching-error"), title: tr("game-patching-error"),
description: Some(err.to_string()) description: Some(err.to_string())
}); });
}
// Don't try to apply the patch after state updating else if rename_mhypbase {
// because we just failed to do it let game_folder = config.game.path.for_edition(patch.edition);
apply_patch_if_needed = false;
let mhypbase = game_folder.join("mhypbase.dll");
let mhypbase_bak = game_folder.join("mhypbase.dll.bak");
if mhypbase.exists() {
if let Err(err) = std::fs::rename(mhypbase, mhypbase_bak) {
tracing::error!("Failed to rename mhypbase file");
sender.input(AppMsg::Toast {
title: tr("game-patching-error"),
description: Some(err.to_string())
});
}
}
} }
sender.input(AppMsg::DisableButtons(false)); sender.input(AppMsg::DisableButtons(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed,
show_status_page: true show_status_page: true
}); });
}); });

View file

@ -35,7 +35,6 @@ pub fn create_prefix(sender: ComponentSender<App>) {
sender.input(AppMsg::DisableButtons(false)); sender.input(AppMsg::DisableButtons(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
}); });

View file

@ -0,0 +1,68 @@
use std::process::Command;
use relm4::prelude::*;
use crate::*;
use crate::i18n::*;
use super::{App, AppMsg};
pub fn disable_telemetry(sender: ComponentSender<App>) {
sender.input(AppMsg::DisableButtons(true));
let config = Config::get().unwrap();
std::thread::spawn(move || {
let telemetry = config.launcher.edition
.telemetry_servers()
.iter()
.map(|server| format!("0.0.0.0 {server}"))
.collect::<Vec<String>>()
.join("\\n");
let output = if config.patch.root {
Command::new("pkexec")
.arg("echo")
.arg("-e")
.arg(format!("\\n{telemetry}\\n"))
.arg(">>")
.arg("/etc/hosts")
.spawn()
}
else {
Command::new("echo")
.arg("-e")
.arg(format!("\\n{telemetry}\\n"))
.arg(">>")
.arg("/etc/hosts")
.spawn()
};
match output.and_then(|child| child.wait_with_output()) {
Ok(output) => if !output.status.success() {
tracing::error!("Failed to update /etc/hosts file");
sender.input(AppMsg::Toast {
title: tr("telemetry-servers-disabling-error"),
description: None // stdout/err is empty
});
}
Err(err) => {
tracing::error!("Failed to update /etc/hosts file");
sender.input(AppMsg::Toast {
title: tr("telemetry-servers-disabling-error"),
description: Some(err.to_string())
});
}
}
sender.input(AppMsg::DisableButtons(false));
sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false,
show_status_page: true
});
});
}

View file

@ -68,7 +68,6 @@ pub fn download_diff(sender: ComponentSender<App>, progress_bar_input: Sender<Pr
sender.input(AppMsg::SetDownloading(false)); sender.input(AppMsg::SetDownloading(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed, perform_on_download_needed,
apply_patch_if_needed: false,
show_status_page: false show_status_page: false
}); });
}); });

View file

@ -26,7 +26,6 @@ pub fn download_wine(sender: ComponentSender<App>, progress_bar_input: Sender<Pr
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
} }
@ -90,7 +89,6 @@ pub fn download_wine(sender: ComponentSender<App>, progress_bar_input: Sender<Pr
sender.input(AppMsg::SetDownloading(false)); sender.input(AppMsg::SetDownloading(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
})); }));

View file

@ -19,7 +19,6 @@ pub fn migrate_folder(sender: ComponentSender<App>, from: PathBuf, to: PathBuf,
sender.input(AppMsg::DisableButtons(false)); sender.input(AppMsg::DisableButtons(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
}); });

View file

@ -16,6 +16,7 @@ mod download_wine;
mod create_prefix; mod create_prefix;
mod download_diff; mod download_diff;
mod migrate_folder; mod migrate_folder;
mod disable_telemetry;
mod launch; mod launch;
use anime_launcher_sdk::components::loader::ComponentsLoader; use anime_launcher_sdk::components::loader::ComponentsLoader;
@ -69,9 +70,6 @@ pub enum AppMsg {
/// Needed for chained executions (e.g. update one voice after another) /// Needed for chained executions (e.g. update one voice after another)
perform_on_download_needed: bool, perform_on_download_needed: bool,
/// Automatically start patch applying if possible and needed
apply_patch_if_needed: bool,
/// Show status gathering progress page /// Show status gathering progress page
show_status_page: bool show_status_page: bool
}, },
@ -82,11 +80,7 @@ pub enum AppMsg {
/// Supposed to be called automatically on app's run when the latest UnityPlayer patch version /// Supposed to be called automatically on app's run when the latest UnityPlayer patch version
/// was retrieved from remote repos /// was retrieved from remote repos
SetUnityPlayerPatch(Option<UnityPlayerPatch>), SetPlayerPatch(Option<PlayerPatch>),
/// Supposed to be called automatically on app's run when the latest xlua patch version
/// was retrieved from remote repos
SetXluaPatch(Option<XluaPatch>),
/// Supposed to be called automatically on app's run when the launcher state was chosen /// Supposed to be called automatically on app's run when the launcher state was chosen
SetLauncherState(Option<LauncherState>), SetLauncherState(Option<LauncherState>),
@ -392,8 +386,7 @@ impl SimpleComponent for App {
Some(LauncherState::VoiceUpdateAvailable(_)) | Some(LauncherState::VoiceUpdateAvailable(_)) |
Some(LauncherState::VoiceNotInstalled(_)) => "document-save-symbolic", Some(LauncherState::VoiceNotInstalled(_)) => "document-save-symbolic",
Some(LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status, .. })) | Some(LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status, .. }, .. }) => match status {
Some(LauncherState::XluaPatchAvailable(XluaPatch { status, .. })) => match status {
PatchStatus::NotAvailable | PatchStatus::NotAvailable |
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
PatchStatus::Preparation { .. } => "window-close-symbolic", PatchStatus::Preparation { .. } => "window-close-symbolic",
@ -402,6 +395,8 @@ impl SimpleComponent for App {
PatchStatus::Available { .. } => "document-save-symbolic" PatchStatus::Available { .. } => "document-save-symbolic"
} }
Some(LauncherState::TelemetryNotDisabled) => "security-high-symbolic",
Some(LauncherState::VoiceOutdated(_)) | Some(LauncherState::VoiceOutdated(_)) |
Some(LauncherState::GameOutdated(_)) | Some(LauncherState::GameOutdated(_)) |
None => "window-close-symbolic" None => "window-close-symbolic"
@ -413,9 +408,9 @@ impl SimpleComponent for App {
Some(LauncherState::PredownloadAvailable { .. }) => tr("launch"), Some(LauncherState::PredownloadAvailable { .. }) => tr("launch"),
Some(LauncherState::FolderMigrationRequired { .. }) => tr("migrate-folders"), Some(LauncherState::FolderMigrationRequired { .. }) => tr("migrate-folders"),
Some(LauncherState::PlayerPatchAvailable { .. }) => tr("apply-patch"),
Some(LauncherState::UnityPlayerPatchAvailable(_)) | Some(LauncherState::TelemetryNotDisabled) => tr("disable-telemetry"),
Some(LauncherState::XluaPatchAvailable(_)) => tr("apply-patch"),
Some(LauncherState::WineNotInstalled) => tr("download-wine"), Some(LauncherState::WineNotInstalled) => tr("download-wine"),
Some(LauncherState::PrefixNotExists) => tr("create-prefix"), Some(LauncherState::PrefixNotExists) => tr("create-prefix"),
@ -453,8 +448,7 @@ impl SimpleComponent for App {
Some(LauncherState::GameOutdated { .. }) | Some(LauncherState::GameOutdated { .. }) |
Some(LauncherState::VoiceOutdated(_)) => false, Some(LauncherState::VoiceOutdated(_)) => false,
Some(LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status, .. })) | Some(LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status, .. }, .. }) => match status {
Some(LauncherState::XluaPatchAvailable(XluaPatch { status, .. })) => match status {
PatchStatus::NotAvailable | PatchStatus::NotAvailable |
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
PatchStatus::Preparation { .. } => false, PatchStatus::Preparation { .. } => false,
@ -473,8 +467,7 @@ impl SimpleComponent for App {
Some(LauncherState::GameOutdated { .. }) | Some(LauncherState::GameOutdated { .. }) |
Some(LauncherState::VoiceOutdated(_)) => &["warning", "pill"], Some(LauncherState::VoiceOutdated(_)) => &["warning", "pill"],
Some(LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status, .. })) | Some(LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status, .. }, .. }) => match status {
Some(LauncherState::XluaPatchAvailable(XluaPatch { status, .. })) => match status {
PatchStatus::NotAvailable | PatchStatus::NotAvailable |
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
PatchStatus::Preparation { .. } => &["error", "pill"], PatchStatus::Preparation { .. } => &["error", "pill"],
@ -495,8 +488,7 @@ impl SimpleComponent for App {
Some(LauncherState::FolderMigrationRequired { .. }) => tr("migrate-folders-tooltip"), Some(LauncherState::FolderMigrationRequired { .. }) => tr("migrate-folders-tooltip"),
Some(LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status, .. })) | Some(LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status, .. }, .. }) => match status {
Some(LauncherState::XluaPatchAvailable(XluaPatch { status, .. })) => match status {
PatchStatus::NotAvailable => tr("main-window--patch-unavailable-tooltip"), PatchStatus::NotAvailable => tr("main-window--patch-unavailable-tooltip"),
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
@ -831,27 +823,11 @@ impl SimpleComponent for App {
} }
// Get main UnityPlayer patch status // Get main UnityPlayer patch status
sender.input(AppMsg::SetUnityPlayerPatch(match patch.unity_player_patch() { sender.input(AppMsg::SetPlayerPatch(match patch.player_patch() {
Ok(patch) => Some(patch), Ok(patch) => Some(patch),
Err(err) => { Err(err) => {
tracing::error!("Failed to fetch unity player patch info: {err}"); tracing::error!("Failed to fetch player patch info: {err}");
sender.input(AppMsg::Toast {
title: tr("patch-info-fetching-error"),
description: Some(err.to_string())
});
None
}
}));
// Get additional xlua patch status
sender.input(AppMsg::SetXluaPatch(match patch.xlua_patch() {
Ok(patch) => Some(patch),
Err(err) => {
tracing::error!("Failed to fetch xlua patch info: {err}");
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {
title: tr("patch-info-fetching-error"), title: tr("patch-info-fetching-error"),
@ -893,7 +869,6 @@ impl SimpleComponent for App {
// Update launcher state // Update launcher state
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
@ -913,7 +888,7 @@ impl SimpleComponent for App {
match msg { match msg {
// TODO: make function from this message like with toast // TODO: make function from this message like with toast
AppMsg::UpdateLauncherState { perform_on_download_needed, apply_patch_if_needed, show_status_page } => { AppMsg::UpdateLauncherState { perform_on_download_needed, show_status_page } => {
if show_status_page { if show_status_page {
sender.input(AppMsg::SetLoadingStatus(Some(Some(tr("loading-launcher-state"))))); sender.input(AppMsg::SetLoadingStatus(Some(Some(tr("loading-launcher-state")))));
} else { } else {
@ -968,11 +943,6 @@ impl SimpleComponent for App {
sender.input(AppMsg::PerformAction); sender.input(AppMsg::PerformAction);
} }
LauncherState::UnityPlayerPatchAvailable(_) |
LauncherState::XluaPatchAvailable(_) if apply_patch_if_needed => {
sender.input(AppMsg::PerformAction);
}
_ => () _ => ()
} }
} }
@ -984,13 +954,8 @@ impl SimpleComponent for App {
} }
#[allow(unused_must_use)] #[allow(unused_must_use)]
AppMsg::SetUnityPlayerPatch(patch) => unsafe { AppMsg::SetPlayerPatch(patch) => unsafe {
PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetUnityPlayerPatch(patch)); PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetPlayerPatch(patch));
}
#[allow(unused_must_use)]
AppMsg::SetXluaPatch(patch) => unsafe {
PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetXluaPatch(patch));
} }
AppMsg::SetLauncherState(state) => { AppMsg::SetLauncherState(state) => {
@ -1055,7 +1020,6 @@ impl SimpleComponent for App {
sender.input(AppMsg::SetDownloading(false)); sender.input(AppMsg::SetDownloading(false));
sender.input(AppMsg::UpdateLauncherState { sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: true show_status_page: true
}); });
}); });
@ -1064,19 +1028,19 @@ impl SimpleComponent for App {
AppMsg::PerformAction => unsafe { AppMsg::PerformAction => unsafe {
match self.state.as_ref().unwrap_unchecked() { match self.state.as_ref().unwrap_unchecked() {
LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status: PatchStatus::NotAvailable, .. }) | LauncherState::PlayerPatchAvailable { patch: PlayerPatch { status: PatchStatus::NotAvailable, .. }, .. } |
LauncherState::XluaPatchAvailable(XluaPatch { status: PatchStatus::NotAvailable, .. }) |
LauncherState::PredownloadAvailable { .. } | LauncherState::PredownloadAvailable { .. } |
LauncherState::Launch => launch::launch(sender), LauncherState::Launch => launch::launch(sender),
LauncherState::FolderMigrationRequired { from, to, cleanup_folder } => LauncherState::FolderMigrationRequired { from, to, cleanup_folder } =>
migrate_folder::migrate_folder(sender, from.to_owned(), to.to_owned(), cleanup_folder.to_owned()), migrate_folder::migrate_folder(sender, from.to_owned(), to.to_owned(), cleanup_folder.to_owned()),
LauncherState::UnityPlayerPatchAvailable(patch) => apply_patch::apply_patch(sender, patch.to_owned()), LauncherState::PlayerPatchAvailable { patch, disable_mhypbase } =>
LauncherState::XluaPatchAvailable(patch) => apply_patch::apply_patch(sender, patch.to_owned()), apply_patch::apply_patch(sender, patch.to_owned(), *disable_mhypbase),
LauncherState::TelemetryNotDisabled => disable_telemetry::disable_telemetry(sender),
LauncherState::WineNotInstalled => download_wine::download_wine(sender, self.progress_bar.sender().to_owned()), LauncherState::WineNotInstalled => download_wine::download_wine(sender, self.progress_bar.sender().to_owned()),
LauncherState::PrefixNotExists => create_prefix::create_prefix(sender), LauncherState::PrefixNotExists => create_prefix::create_prefix(sender),
LauncherState::VoiceUpdateAvailable(diff) | LauncherState::VoiceUpdateAvailable(diff) |

View file

@ -108,27 +108,17 @@ pub fn repair_game(sender: ComponentSender<App>, progress_bar_input: Sender<Prog
// Get main patch status // Get main patch status
let player_patch = UnityPlayerPatch::from_folder(&config.patch.path, config.launcher.edition) let player_patch = PlayerPatch::from_folder(&config.patch.path, config.launcher.edition)
.and_then(|patch| patch.is_applied(&game_path)) .and_then(|patch| patch.is_applied(&game_path))
.unwrap_or_else(|err| { .unwrap_or_else(|err| {
tracing::warn!("Failed to get player patch status: {err}. Used config value instead: {}", config.patch.apply_main); tracing::warn!("Failed to get player patch status: {err}. Used config value instead: {}", config.patch.apply);
config.patch.apply_main config.patch.apply
}); });
// Get xlua patch status tracing::debug!("Patch status: {player_patch}. Disable mhypbase: {}", config.patch.disable_mhypbase);
let xlua_patch = XluaPatch::from_folder(&config.patch.path, config.launcher.edition) fn should_ignore(path: &Path, player_patch: bool, disable_mhypbase: bool) -> bool {
.and_then(|patch| patch.is_applied(&game_path))
.unwrap_or_else(|err| {
tracing::warn!("Failed to get xlua patch status: {err}. Used config value instead: {}", config.patch.apply_xlua);
config.patch.apply_xlua
});
tracing::debug!("Patches status: player({player_patch}), xlua({xlua_patch})");
fn should_ignore(path: &Path, player_patch: bool, xlua_patch: bool) -> bool {
// Files managed by launch.bat file // Files managed by launch.bat file
for part in ["crashreport.exe", "upload_crash.exe"] { for part in ["crashreport.exe", "upload_crash.exe"] {
if path.ends_with(part) { if path.ends_with(part) {
@ -145,20 +135,16 @@ pub fn repair_game(sender: ComponentSender<App>, progress_bar_input: Sender<Prog
} }
} }
// Xlua patch related files // If mhypbase should be disabled
if xlua_patch { if disable_mhypbase && path.ends_with("mhypbase.dll") {
for part in ["xlua.dll", "mhypbase.dll"] {
if path.ends_with(part) {
return true; return true;
} }
}
}
false false
} }
for (i, file) in broken.into_iter().enumerate() { for (i, file) in broken.into_iter().enumerate() {
if !should_ignore(&file.path, player_patch, xlua_patch) { if !should_ignore(&file.path, player_patch, config.patch.disable_mhypbase) {
tracing::debug!("Repairing file: {}", file.path.to_string_lossy()); tracing::debug!("Repairing file: {}", file.path.to_string_lossy());
if let Err(err) = file.repair(&game_path) { if let Err(err) = file.repair(&game_path) {

View file

@ -670,9 +670,24 @@ impl SimpleAsyncComponent for EnhancementsApp {
match DiscordRpc::get_assets(CONFIG.launcher.discord_rpc.app_id) { match DiscordRpc::get_assets(CONFIG.launcher.discord_rpc.app_id) {
Ok(icons) => { Ok(icons) => {
for icon in icons { for icon in icons {
let cache_file = CACHE_FOLDER.join("discord-rpc").join(&icon.name); let cache_file = CACHE_FOLDER
.join("discord-rpc")
.join(&icon.name)
.join(&icon.id);
// let sender = sender.clone(); // let sender = sender.clone();
// Workaround for old folder structure (pre 3.7.3)
let old_path = CACHE_FOLDER.join("discord-rpc").join(&icon.name);
if old_path.exists() {
if let Ok(metadata) = old_path.metadata() {
if metadata.is_file() {
std::fs::remove_file(old_path).expect("Failed to delete old discord rpc icon");
}
}
}
if !cache_file.exists() { if !cache_file.exists() {
std::thread::spawn(move || { std::thread::spawn(move || {
Downloader::new(icon.get_uri()) Downloader::new(icon.get_uri())

View file

@ -111,8 +111,7 @@ pub struct GeneralApp {
components_page: AsyncController<ComponentsPage>, components_page: AsyncController<ComponentsPage>,
game_diff: Option<VersionDiff>, game_diff: Option<VersionDiff>,
unity_player_patch: Option<UnityPlayerPatch>, player_patch: Option<PlayerPatch>,
xlua_patch: Option<XluaPatch>,
style: LauncherStyle, style: LauncherStyle,
@ -127,11 +126,7 @@ pub enum GeneralAppMsg {
/// Supposed to be called automatically on app's run when the latest UnityPlayer patch version /// Supposed to be called automatically on app's run when the latest UnityPlayer patch version
/// was retrieved from remote repos /// was retrieved from remote repos
SetUnityPlayerPatch(Option<UnityPlayerPatch>), SetPlayerPatch(Option<PlayerPatch>),
/// Supposed to be called automatically on app's run when the latest xlua patch version
/// was retrieved from remote repos
SetXluaPatch(Option<XluaPatch>),
// If one ever wish to change it to accept VoiceLocale // If one ever wish to change it to accept VoiceLocale
// I'd recommend to use clone!(@strong self.locale as locale => move |_| { .. }) // I'd recommend to use clone!(@strong self.locale as locale => move |_| { .. })
@ -441,7 +436,7 @@ impl SimpleAsyncComponent for GeneralApp {
add_suffix = &gtk::Label { add_suffix = &gtk::Label {
#[watch] #[watch]
set_text: &match model.unity_player_patch.as_ref() { set_text: &match model.player_patch.as_ref() {
Some(patch) => match patch.status() { Some(patch) => match patch.status() {
PatchStatus::NotAvailable => tr("patch-not-available"), PatchStatus::NotAvailable => tr("patch-not-available"),
PatchStatus::Outdated { current, .. } => tr_args("patch-outdated", [("current", current.to_string().into())]), PatchStatus::Outdated { current, .. } => tr_args("patch-outdated", [("current", current.to_string().into())]),
@ -454,7 +449,7 @@ impl SimpleAsyncComponent for GeneralApp {
}, },
#[watch] #[watch]
set_css_classes: match model.unity_player_patch.as_ref() { set_css_classes: match model.player_patch.as_ref() {
Some(patch) => match patch.status() { Some(patch) => match patch.status() {
PatchStatus::NotAvailable => &["error"], PatchStatus::NotAvailable => &["error"],
PatchStatus::Outdated { .. } | PatchStatus::Outdated { .. } |
@ -466,7 +461,7 @@ impl SimpleAsyncComponent for GeneralApp {
Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(), Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(),
}; };
if let Ok(true) = model.unity_player_patch.as_ref().unwrap_unchecked().is_applied(path) { if let Ok(true) = model.player_patch.as_ref().unwrap_unchecked().is_applied(path) {
&["success"] &["success"]
} else { } else {
&["warning"] &["warning"]
@ -478,7 +473,7 @@ impl SimpleAsyncComponent for GeneralApp {
}, },
#[watch] #[watch]
set_tooltip_text: Some(&match model.unity_player_patch.as_ref() { set_tooltip_text: Some(&match model.player_patch.as_ref() {
Some(patch) => match patch.status() { Some(patch) => match patch.status() {
PatchStatus::NotAvailable => tr("patch-not-available-tooltip"), PatchStatus::NotAvailable => tr("patch-not-available-tooltip"),
PatchStatus::Outdated { current, latest, .. } => tr_args("patch-outdated-tooltip", [ PatchStatus::Outdated { current, latest, .. } => tr_args("patch-outdated-tooltip", [
@ -493,78 +488,7 @@ impl SimpleAsyncComponent for GeneralApp {
Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(), Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(),
}; };
if let Ok(true) = model.unity_player_patch.as_ref().unwrap_unchecked().is_applied(path) { if let Ok(true) = model.player_patch.as_ref().unwrap_unchecked().is_applied(path) {
String::new()
} else {
tr("patch-not-applied-tooltip")
}
}
}
None => String::new()
})
}
},
adw::ActionRow {
set_title: &tr("xlua-patch-version"),
set_subtitle: &tr("xlua-patch-version-description"),
add_suffix = &gtk::Label {
#[watch]
set_text: &match model.xlua_patch.as_ref() {
Some(patch) => match patch.status() {
PatchStatus::NotAvailable => tr("patch-not-available"),
PatchStatus::Outdated { current, .. } => tr_args("patch-outdated", [("current", current.to_string().into())]),
PatchStatus::Preparation { .. } => tr("patch-preparation"),
PatchStatus::Testing { version, .. } |
PatchStatus::Available { version, .. } => version.to_string()
}
None => String::from("?")
},
#[watch]
set_css_classes: match model.xlua_patch.as_ref() {
Some(patch) => match patch.status() {
PatchStatus::NotAvailable => &["error"],
PatchStatus::Outdated { .. } |
PatchStatus::Preparation { .. } |
PatchStatus::Testing { .. } => &["warning"],
PatchStatus::Available { .. } => unsafe {
let path = match Config::get() {
Ok(config) => config.game.path.for_edition(config.launcher.edition).to_path_buf(),
Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(),
};
if let Ok(true) = model.xlua_patch.as_ref().unwrap_unchecked().is_applied(path) {
&["success"]
} else {
&["warning"]
}
}
}
None => &[]
},
#[watch]
set_tooltip_text: Some(&match model.xlua_patch.as_ref() {
Some(patch) => match patch.status() {
PatchStatus::NotAvailable => tr("patch-not-available-tooltip"),
PatchStatus::Outdated { current, latest, .. } => tr_args("patch-outdated-tooltip", [
("current", current.to_string().into()),
("latest", latest.to_string().into())
]),
PatchStatus::Preparation { .. } => tr("patch-preparation-tooltip"),
PatchStatus::Testing { .. } => tr("patch-testing-tooltip"),
PatchStatus::Available { .. } => unsafe {
let path = match Config::get() {
Ok(config) => config.game.path.for_edition(config.launcher.edition).to_path_buf(),
Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(),
};
if let Ok(true) = model.xlua_patch.as_ref().unwrap_unchecked().is_applied(path) {
String::new() String::new()
} else { } else {
tr("patch-not-applied-tooltip") tr("patch-not-applied-tooltip")
@ -586,13 +510,13 @@ impl SimpleAsyncComponent for GeneralApp {
add_suffix = &gtk::Switch { add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center, set_valign: gtk::Align::Center,
set_state: CONFIG.patch.apply_main, set_state: CONFIG.patch.apply,
connect_state_notify[sender] => move |switch| { connect_state_notify[sender] => move |switch| {
if is_ready() { if is_ready() {
#[allow(unused_must_use)] #[allow(unused_must_use)]
if let Ok(mut config) = Config::get() { if let Ok(mut config) = Config::get() {
config.patch.apply_main = switch.state(); config.patch.apply = switch.state();
Config::update(config); Config::update(config);
@ -604,18 +528,19 @@ impl SimpleAsyncComponent for GeneralApp {
}, },
adw::ActionRow { adw::ActionRow {
set_title: &tr("apply-xlua-patch"), set_title: &tr("disable-mhypbase"),
set_subtitle: &tr("disable-mhypbase-description"),
add_suffix = &gtk::Switch { add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center, set_valign: gtk::Align::Center,
set_state: CONFIG.patch.apply_xlua, set_state: CONFIG.patch.disable_mhypbase,
connect_state_notify[sender] => move |switch| { connect_state_notify[sender] => move |switch| {
if is_ready() { if is_ready() {
#[allow(unused_must_use)] #[allow(unused_must_use)]
if let Ok(mut config) = Config::get() { if let Ok(mut config) = Config::get() {
config.patch.apply_xlua = switch.state(); config.patch.disable_mhypbase = switch.state();
Config::update(config); Config::update(config);
@ -747,8 +672,7 @@ impl SimpleAsyncComponent for GeneralApp {
.forward(sender.input_sender(), std::convert::identity), .forward(sender.input_sender(), std::convert::identity),
game_diff: None, game_diff: None,
unity_player_patch: None, player_patch: None,
xlua_patch: None,
style: CONFIG.launcher.style, style: CONFIG.launcher.style,
@ -778,12 +702,8 @@ impl SimpleAsyncComponent for GeneralApp {
self.game_diff = diff; self.game_diff = diff;
} }
GeneralAppMsg::SetUnityPlayerPatch(patch) => { GeneralAppMsg::SetPlayerPatch(patch) => {
self.unity_player_patch = patch; self.player_patch = patch;
}
GeneralAppMsg::SetXluaPatch(patch) => {
self.xlua_patch = patch;
} }
#[allow(unused_must_use)] #[allow(unused_must_use)]

View file

@ -31,11 +31,7 @@ pub enum PreferencesAppMsg {
/// Supposed to be called automatically on app's run when the latest UnityPlayer patch version /// Supposed to be called automatically on app's run when the latest UnityPlayer patch version
/// was retrieved from remote repos /// was retrieved from remote repos
SetUnityPlayerPatch(Option<UnityPlayerPatch>), SetPlayerPatch(Option<PlayerPatch>),
/// Supposed to be called automatically on app's run when the latest xlua patch version
/// was retrieved from remote repos
SetXluaPatch(Option<XluaPatch>),
SetLauncherStyle(LauncherStyle), SetLauncherStyle(LauncherStyle),
@ -124,13 +120,8 @@ impl SimpleAsyncComponent for PreferencesApp {
} }
#[allow(unused_must_use)] #[allow(unused_must_use)]
PreferencesAppMsg::SetUnityPlayerPatch(patch) => { PreferencesAppMsg::SetPlayerPatch(patch) => {
self.general.sender().send(GeneralAppMsg::SetUnityPlayerPatch(patch)); self.general.sender().send(GeneralAppMsg::SetPlayerPatch(patch));
}
#[allow(unused_must_use)]
PreferencesAppMsg::SetXluaPatch(patch) => {
self.general.sender().send(GeneralAppMsg::SetXluaPatch(patch));
} }
#[allow(unused_must_use)] #[allow(unused_must_use)]
@ -142,7 +133,6 @@ impl SimpleAsyncComponent for PreferencesApp {
PreferencesAppMsg::UpdateLauncherState => { PreferencesAppMsg::UpdateLauncherState => {
sender.output(Self::Output::UpdateLauncherState { sender.output(Self::Output::UpdateLauncherState {
perform_on_download_needed: false, perform_on_download_needed: false,
apply_patch_if_needed: false,
show_status_page: false show_status_page: false
}); });
} }