mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
Merge pull request #1467
This commit is contained in:
commit
ba6e22cf5c
14 files changed
+142
No files matched your search
@@ -218,6 +218,60 @@ def linux_glibc():
|
||||
# GLIBC_FLOOR); on an older one they cannot start
|
||||
GLIBC_NEEDED = (2, 34)
|
||||
|
||||
# The libraries the release puts next to the game (libSDL3.so.0 from the Steam Runtime sysroot) link system libraries
|
||||
# that a minimal system may lack: libXss.so.1 on AnataseOS (#1315, #1428), libdecor-0.so.0 on Batocera (#1419). The
|
||||
# loader then stops the game before it runs, after the half hour of lift and compile, as `totk --prepare-shaders`
|
||||
# with exit code 127. The package that provides a common one, by distribution family.
|
||||
LIBRARY_PACKAGES = {
|
||||
'libXss.so.1': ('libXScrnSaver', 'libxss1', 'libxss'),
|
||||
'libdecor-0.so.0': ('libdecor', 'libdecor-0-0', 'libdecor'),
|
||||
'libXi.so.6': ('libXi', 'libxi6', 'libxi'),
|
||||
'libXrandr.so.2': ('libXrandr', 'libxrandr2', 'libxrandr'),
|
||||
'libXcursor.so.1': ('libXcursor', 'libxcursor1', 'libxcursor'),
|
||||
'libXinerama.so.1': ('libXinerama', 'libxinerama1', 'libxinerama'),
|
||||
'libXext.so.6': ('libXext', 'libxext6', 'libxext'),
|
||||
'libXfixes.so.3': ('libXfixes', 'libxfixes3', 'libxfixes'),
|
||||
'libX11.so.6': ('libX11', 'libx11-6', 'libx11'),
|
||||
'libxkbcommon.so.0': ('libxkbcommon', 'libxkbcommon0', 'libxkbcommon'),
|
||||
'libwayland-client.so.0': ('libwayland-client', 'libwayland-client0', 'wayland'),
|
||||
'libasound.so.2': ('alsa-lib', 'libasound2', 'alsa-lib'),
|
||||
}
|
||||
LDD_NOT_FOUND = re.compile(r'^\s*(\S+) => not found', re.M)
|
||||
LOADER_NOT_FOUND = re.compile(r'error while loading shared libraries: (\S+?): cannot open shared object file')
|
||||
|
||||
|
||||
def library_packages(libraries):
|
||||
"""The packages that provide the known ones of libraries, as " (Fedora: ..., Debian/Ubuntu: ..., Arch: ...)" for
|
||||
the message; "" when none is known."""
|
||||
known = [LIBRARY_PACKAGES[n] for n in libraries if n in LIBRARY_PACKAGES]
|
||||
if not known:
|
||||
return ''
|
||||
return ' (' + ', '.join(f'{family}: {" ".join(p[i] for p in known)}'
|
||||
for i, family in enumerate(('Fedora', 'Debian/Ubuntu', 'Arch'))) + ')'
|
||||
|
||||
|
||||
def loader_missing(log):
|
||||
"""The libraries the system's loader could not find in a tool's log ("error while loading shared libraries"), in
|
||||
order, each once."""
|
||||
log = Path(log)
|
||||
text = log.read_text(encoding='utf-8', errors='replace') if log.is_file() else ''
|
||||
return list(dict.fromkeys(LOADER_NOT_FOUND.findall(text)))
|
||||
|
||||
|
||||
def missing_libraries(paths):
|
||||
"""Linux: the shared libraries `ldd` reports as not found for paths, in order, each once; [] elsewhere, when ldd
|
||||
cannot run, or when nothing is missing."""
|
||||
if not sys.platform.startswith('linux'):
|
||||
return []
|
||||
found = []
|
||||
for p in paths:
|
||||
try:
|
||||
r = subprocess.run(['ldd', str(p)], capture_output=True, text=True, errors='replace', timeout=60)
|
||||
except (OSError, subprocess.SubprocessError):
|
||||
return []
|
||||
found += [n for n in LDD_NOT_FOUND.findall(r.stdout) if n not in found]
|
||||
return found
|
||||
|
||||
|
||||
def linux_kernel():
|
||||
"""(major, minor) of the running Linux kernel, None elsewhere."""
|
||||
@@ -537,6 +591,12 @@ class Check(Step):
|
||||
host = self.probe_host(ctx, exe)
|
||||
if not host['x86_64_v2']:
|
||||
raise InstallError('check.cpu_too_old')
|
||||
# Before lift and compile: the game would not start without these (LIBRARY_PACKAGES); a repository build links
|
||||
# the system's own libraries
|
||||
missing = [] if layout.dev else missing_libraries(layout.dlls)
|
||||
if missing:
|
||||
raise InstallError('check.libraries_missing', libraries=', '.join(missing),
|
||||
packages=library_packages(missing))
|
||||
# v3 is the faster build; v2 runs on CPUs without AVX2/FMA (runtime/fma.c supplies the fused multiply-add).
|
||||
ctx.cpu = 'v3' if host['x86_64_v3'] else 'v2'
|
||||
if not host['loader']:
|
||||
@@ -1519,6 +1579,11 @@ class Prepare(Step):
|
||||
[dest, '--version', version_tag(game_version(ctx)), '--romfs', dest / 'romfs', '--exefs',
|
||||
dest / 'exefs', '--list', shader_list], parse)
|
||||
if code or not (dest / 'shader-prepared.bin').is_file():
|
||||
# The loader stopped the game before it ran: name the library rather than exit code 127
|
||||
missing = loader_missing(log)
|
||||
if missing:
|
||||
raise InstallError('prepare.libraries_missing', libraries=', '.join(missing),
|
||||
packages=library_packages(missing), log=str(log))
|
||||
raise InstallError('prepare.shaders_failed', code=code, log=str(log))
|
||||
if skipped[0]:
|
||||
rep.warning('warn.shaders_skipped', count=skipped[0], log=str(log))
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Es ist kein Vulkan-Treiber installiert. Installiere den neuesten Treiber für deine Grafikkarte.",
|
||||
"check.vulkan_no_device": "Vulkan findet keine Grafikkarte. Installiere den neuesten Treiber für deine Grafikkarte.",
|
||||
"check.vulkan_too_old": "Das Spiel braucht eine Grafikkarte mit Vulkan 1.3; gefunden: {devices}. Aktualisiere den Grafiktreiber.",
|
||||
"check.libraries_missing": "Das Spiel kann auf diesem System nicht starten: Es braucht {libraries}, das dem System fehlt. Installiere das Paket, das es bereitstellt, mit dem Paketmanager des Systems{packages} und starte das Setup dann erneut.",
|
||||
"check.no_display": "Zum Vorbereiten der Shader wird ein Bildschirm gebraucht. Starte das Setup aus der Desktop-Sitzung oder setze DISPLAY=:0 (auf einem Steam Deck im Spielmodus zusätzlich XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Die Spieldateien werden gebraucht: wähle das Hauptspiel, das Update 1.1.0, 1.2.1 oder 1.4.3 und prod.keys.",
|
||||
"check.input_missing": "Datei nicht gefunden ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Die Shader-Liste fehlt.",
|
||||
"prepare.romfs_patches_failed": "Das Schreiben der Spieldaten-Patches ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Das Vorbereiten der Shader ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "Das Spiel wurde gebaut, kann aber nicht starten: Dem System fehlt {libraries}. Installiere das Paket, das es bereitstellt, mit dem Paketmanager des Systems{packages} und starte das Setup dann erneut. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "Die Spieldaten in {path} fehlen nach der Installation oder können nicht gelesen werden. Starte Windows neu und führe das Installationsprogramm erneut auf demselben Ordner aus: Es entpackt die Spieldaten erneut und behält den Rest.",
|
||||
"prepare.pack_failed": "Das Packen des Shader-Caches ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini kann nicht geschrieben werden: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "No Vulkan driver is installed. Install the latest driver for your graphics card.",
|
||||
"check.vulkan_no_device": "Vulkan finds no graphics card. Install the latest driver for your graphics card.",
|
||||
"check.vulkan_too_old": "The game needs a graphics card with Vulkan 1.3; found: {devices}. Update the graphics driver.",
|
||||
"check.libraries_missing": "The game cannot start on this system: it needs {libraries}, which the system does not have. Install the package that provides it with the system's package manager{packages}, then run the setup again.",
|
||||
"check.no_display": "Preparing the shaders needs a display. Run the setup from the desktop session, or export DISPLAY=:0 (on a Steam Deck in Game Mode also XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "The game files are needed: choose the base game, the 1.1.0 or 1.2.1 or 1.4.3 update and prod.keys.",
|
||||
"check.input_missing": "File not found ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "The shader list is missing.",
|
||||
"prepare.romfs_patches_failed": "Writing the game data patches failed (exit code {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Preparing the shaders failed (exit code {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "The game was built but cannot start: the system does not have {libraries}. Install the package that provides it with the system's package manager{packages}, then run the setup again. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "The game data in {path} is missing or cannot be read after the install. Restart Windows, then run the installer again on the same folder: it extracts the game data again and keeps the rest.",
|
||||
"prepare.pack_failed": "Packing the shader cache failed (exit code {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini cannot be written: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "No hay ningún controlador Vulkan instalado. Instala el controlador más reciente de tu tarjeta gráfica.",
|
||||
"check.vulkan_no_device": "Vulkan no encuentra ninguna tarjeta gráfica. Instala el controlador más reciente de tu tarjeta gráfica.",
|
||||
"check.vulkan_too_old": "El juego necesita una tarjeta gráfica con Vulkan 1.3; encontrado: {devices}. Actualiza el controlador gráfico.",
|
||||
"check.libraries_missing": "El juego no puede iniciarse en este sistema: necesita {libraries}, que el sistema no tiene. Instala el paquete que lo proporciona con el gestor de paquetes del sistema{packages} y vuelve a ejecutar el instalador.",
|
||||
"check.no_display": "Preparar los shaders necesita una pantalla. Ejecuta el instalador desde la sesión de escritorio o exporta DISPLAY=:0 (en una Steam Deck en modo Juego, también XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Se necesitan los archivos del juego: elige el juego base, la actualización 1.1.0, 1.2.1 o 1.4.3 y prod.keys.",
|
||||
"check.input_missing": "Archivo no encontrado ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Falta la lista de shaders.",
|
||||
"prepare.romfs_patches_failed": "Falló la escritura de los parches de datos del juego (código de salida {code}). Detalles: {log}",
|
||||
"prepare.shaders_failed": "Falló la preparación de los shaders (código de salida {code}). Detalles: {log}",
|
||||
"prepare.libraries_missing": "El juego se compiló pero no puede iniciarse: el sistema no tiene {libraries}. Instala el paquete que lo proporciona con el gestor de paquetes del sistema{packages} y vuelve a ejecutar el instalador. Detalles: {log}",
|
||||
"cleanup.romfs_unreadable": "Los datos del juego en {path} faltan o no se pueden leer tras la instalación. Reinicia Windows y vuelve a ejecutar el instalador en la misma carpeta: extrae de nuevo los datos del juego y conserva el resto.",
|
||||
"prepare.pack_failed": "Falló el empaquetado de la caché de shaders (código de salida {code}). Detalles: {log}",
|
||||
"cleanup.ini_failed": "No se puede escribir totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Aucun pilote Vulkan n'est installé. Installez le dernier pilote de votre carte graphique.",
|
||||
"check.vulkan_no_device": "Vulkan ne trouve aucune carte graphique. Installez le dernier pilote de votre carte graphique.",
|
||||
"check.vulkan_too_old": "Le jeu demande une carte graphique avec Vulkan 1.3 ; trouvé : {devices}. Mettez à jour le pilote graphique.",
|
||||
"check.libraries_missing": "Le jeu ne peut pas démarrer sur ce système : il a besoin de {libraries}, absent du système. Installez le paquet qui le fournit avec le gestionnaire de paquets du système{packages}, puis relancez l'installation.",
|
||||
"check.no_display": "La préparation des shaders a besoin d'un écran. Lancez l'installation depuis la session de bureau, ou exportez DISPLAY=:0 (sur un Steam Deck en mode Jeu, aussi XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Les fichiers du jeu sont nécessaires : choisissez le jeu de base, la mise à jour 1.1.0, 1.2.1 ou 1.4.3 et prod.keys.",
|
||||
"check.input_missing": "Fichier introuvable ({input}) : {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "La liste des shaders est manquante.",
|
||||
"prepare.romfs_patches_failed": "L'écriture des correctifs de données du jeu a échoué (code de sortie {code}). Détails : {log}",
|
||||
"prepare.shaders_failed": "La préparation des shaders a échoué (code de sortie {code}). Détails : {log}",
|
||||
"prepare.libraries_missing": "Le jeu a été compilé mais ne peut pas démarrer : {libraries} est absent du système. Installez le paquet qui le fournit avec le gestionnaire de paquets du système{packages}, puis relancez l'installation. Détails : {log}",
|
||||
"cleanup.romfs_unreadable": "Les données du jeu dans {path} sont manquantes ou illisibles après l'installation. Redémarrez Windows, puis relancez l'installateur sur le même dossier : il extrait à nouveau les données du jeu et conserve le reste.",
|
||||
"prepare.pack_failed": "Le regroupement du cache de shaders a échoué (code de sortie {code}). Détails : {log}",
|
||||
"cleanup.ini_failed": "totk.ini ne peut pas être écrit : {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Non è installato alcun driver Vulkan. Installa il driver più recente della tua scheda grafica.",
|
||||
"check.vulkan_no_device": "Vulkan non trova alcuna scheda grafica. Installa il driver più recente della tua scheda grafica.",
|
||||
"check.vulkan_too_old": "Il gioco richiede una scheda grafica con Vulkan 1.3; trovato: {devices}. Aggiorna il driver grafico.",
|
||||
"check.libraries_missing": "Il gioco non può avviarsi su questo sistema: richiede {libraries}, che il sistema non ha. Installa il pacchetto che lo fornisce con il gestore di pacchetti del sistema{packages}, poi esegui di nuovo l'installazione.",
|
||||
"check.no_display": "La preparazione degli shader richiede uno schermo. Avvia l'installazione dalla sessione desktop oppure esporta DISPLAY=:0 (su uno Steam Deck in modalità Gioco anche XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Servono i file del gioco: scegli il gioco base, l'aggiornamento 1.1.0, 1.2.1 o 1.4.3 e prod.keys.",
|
||||
"check.input_missing": "File non trovato ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Manca l'elenco degli shader.",
|
||||
"prepare.romfs_patches_failed": "La scrittura delle patch dei dati di gioco non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"prepare.shaders_failed": "La preparazione degli shader non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"prepare.libraries_missing": "Il gioco è stato compilato ma non può avviarsi: il sistema non ha {libraries}. Installa il pacchetto che lo fornisce con il gestore di pacchetti del sistema{packages}, poi esegui di nuovo l'installazione. Dettagli: {log}",
|
||||
"cleanup.romfs_unreadable": "I dati di gioco in {path} mancano o non sono leggibili dopo l'installazione. Riavvia Windows, poi esegui di nuovo il programma di installazione sulla stessa cartella: estrae di nuovo i dati di gioco e mantiene il resto.",
|
||||
"prepare.pack_failed": "La raccolta della cache degli shader non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"cleanup.ini_failed": "Impossibile scrivere totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Vulkan ドライバーがインストールされていません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.vulkan_no_device": "Vulkan がグラフィックカードを見つけられません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.vulkan_too_old": "このゲームには Vulkan 1.3 対応のグラフィックカードが必要です。見つかったもの: {devices}。グラフィックドライバーを更新してください。",
|
||||
"check.libraries_missing": "このシステムではゲームを起動できません: {libraries} が必要ですが、システムにありません。システムのパッケージマネージャーでそれを含むパッケージをインストールし{packages}、セットアップをもう一度実行してください。",
|
||||
"check.no_display": "シェーダーの準備にはディスプレイが必要です。デスクトップのセッションからセットアップを実行するか、DISPLAY=:0 を export してください(Steam Deck のゲームモードでは XDG_RUNTIME_DIR=/run/user/1000 も)。",
|
||||
"check.inputs_needed": "ゲームファイルが必要です。本編、1.1.0・1.2.1・1.4.3 のいずれかのアップデート、prod.keys を選んでください。",
|
||||
"check.input_missing": "ファイルが見つかりません ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "シェーダーの一覧がありません。",
|
||||
"prepare.romfs_patches_failed": "ゲームデータパッチの書き出しに失敗しました (終了コード {code})。詳細: {log}",
|
||||
"prepare.shaders_failed": "シェーダーの準備に失敗しました (終了コード {code})。詳細: {log}",
|
||||
"prepare.libraries_missing": "ゲームはビルドされましたが起動できません: システムに {libraries} がありません。システムのパッケージマネージャーでそれを含むパッケージをインストールし{packages}、セットアップをもう一度実行してください。詳細: {log}",
|
||||
"cleanup.romfs_unreadable": "インストール後、{path} のゲームデータが見つからないか読み取れません。Windows を再起動し、同じフォルダーでインストーラーをもう一度実行してください。ゲームデータだけを再展開し、それ以外は保持します。",
|
||||
"prepare.pack_failed": "シェーダーキャッシュのまとめに失敗しました (終了コード {code})。詳細: {log}",
|
||||
"cleanup.ini_failed": "totk.ini を書き込めません: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Vulkan 드라이버가 설치되어 있지 않습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.vulkan_no_device": "Vulkan이 그래픽 카드를 찾지 못했습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.vulkan_too_old": "게임에는 Vulkan 1.3을 지원하는 그래픽 카드가 필요합니다. 발견된 장치: {devices}. 그래픽 드라이버를 업데이트하세요.",
|
||||
"check.libraries_missing": "이 시스템에서는 게임을 시작할 수 없습니다: {libraries}이(가) 필요하지만 시스템에 없습니다. 시스템의 패키지 관리자로 이를 제공하는 패키지를 설치한 뒤{packages} 설치 프로그램을 다시 실행하세요.",
|
||||
"check.no_display": "셰이더를 준비하려면 디스플레이가 필요합니다. 데스크톱 세션에서 설치 프로그램을 실행하거나 DISPLAY=:0 을 export 하세요(게임 모드의 Steam Deck에서는 XDG_RUNTIME_DIR=/run/user/1000 도).",
|
||||
"check.inputs_needed": "게임 파일이 필요합니다. 기본 게임, 1.1.0 또는 1.2.1 또는 1.4.3 업데이트, prod.keys를 선택하세요.",
|
||||
"check.input_missing": "파일을 찾을 수 없음({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "셰이더 목록이 없습니다.",
|
||||
"prepare.romfs_patches_failed": "게임 데이터 패치 작성에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"prepare.shaders_failed": "셰이더 준비에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"prepare.libraries_missing": "게임은 빌드되었지만 시작할 수 없습니다: 시스템에 {libraries}이(가) 없습니다. 시스템의 패키지 관리자로 이를 제공하는 패키지를 설치한 뒤{packages} 설치 프로그램을 다시 실행하세요. 자세히: {log}",
|
||||
"cleanup.romfs_unreadable": "설치 후 {path}의 게임 데이터가 없거나 읽을 수 없습니다. Windows를 다시 시작한 다음 같은 폴더로 설치 프로그램을 다시 실행하세요. 게임 데이터만 다시 추출하고 나머지는 유지합니다.",
|
||||
"prepare.pack_failed": "셰이더 캐시 묶기에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"cleanup.ini_failed": "totk.ini를 쓸 수 없습니다: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Er is geen Vulkan-stuurprogramma geïnstalleerd. Installeer het nieuwste stuurprogramma voor je videokaart.",
|
||||
"check.vulkan_no_device": "Vulkan vindt geen videokaart. Installeer het nieuwste stuurprogramma voor je videokaart.",
|
||||
"check.vulkan_too_old": "Het spel heeft een videokaart met Vulkan 1.3 nodig; gevonden: {devices}. Werk het grafische stuurprogramma bij.",
|
||||
"check.libraries_missing": "Het spel kan op dit systeem niet starten: het heeft {libraries} nodig, dat het systeem niet heeft. Installeer het pakket dat het levert met de pakketbeheerder van het systeem{packages} en voer de installatie daarna opnieuw uit.",
|
||||
"check.no_display": "Voor het voorbereiden van de shaders is een scherm nodig. Start de installatie vanuit de bureaubladsessie of exporteer DISPLAY=:0 (op een Steam Deck in de Gamemodus ook XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "De spelbestanden zijn nodig: kies het basisspel, de update 1.1.0, 1.2.1 of 1.4.3 en prod.keys.",
|
||||
"check.input_missing": "Bestand niet gevonden ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "De shaderlijst ontbreekt.",
|
||||
"prepare.romfs_patches_failed": "Het schrijven van de spelgegevenspatches is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Het voorbereiden van de shaders is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "Het spel is gebouwd maar kan niet starten: het systeem heeft {libraries} niet. Installeer het pakket dat het levert met de pakketbeheerder van het systeem{packages} en voer de installatie daarna opnieuw uit. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "De spelgegevens in {path} ontbreken of kunnen na de installatie niet worden gelezen. Start Windows opnieuw en voer het installatieprogramma opnieuw uit op dezelfde map: het pakt de spelgegevens opnieuw uit en behoudt de rest.",
|
||||
"prepare.pack_failed": "Het verpakken van de shadercache is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini kan niet worden geschreven: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "Nenhum driver Vulkan está instalado. Instale o driver mais recente da sua placa de vídeo.",
|
||||
"check.vulkan_no_device": "O Vulkan não encontra nenhuma placa de vídeo. Instale o driver mais recente da sua placa de vídeo.",
|
||||
"check.vulkan_too_old": "O jogo precisa de uma placa de vídeo com Vulkan 1.3; encontrado: {devices}. Atualize o driver de vídeo.",
|
||||
"check.libraries_missing": "O jogo não pode iniciar neste sistema: ele precisa de {libraries}, que o sistema não tem. Instale o pacote que o fornece com o gerenciador de pacotes do sistema{packages} e execute o instalador de novo.",
|
||||
"check.no_display": "Preparar os shaders exige uma tela. Execute a instalação na sessão da área de trabalho ou use export DISPLAY=:0 (no Steam Deck em Game Mode, também XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Os arquivos do jogo são necessários: escolha o jogo base, a atualização 1.1.0, 1.2.1 ou 1.4.3 e o prod.keys.",
|
||||
"check.input_missing": "Arquivo não encontrado ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "A lista de shaders está faltando.",
|
||||
"prepare.romfs_patches_failed": "Falha ao gravar os patches nos dados do jogo (código de saída {code}). Detalhes: {log}",
|
||||
"prepare.shaders_failed": "Falha ao preparar os shaders (código de saída {code}). Detalhes: {log}",
|
||||
"prepare.libraries_missing": "O jogo foi compilado, mas não pode iniciar: o sistema não tem {libraries}. Instale o pacote que o fornece com o gerenciador de pacotes do sistema{packages} e execute o instalador de novo. Detalhes: {log}",
|
||||
"cleanup.romfs_unreadable": "Os dados do jogo em {path} estão faltando ou não podem ser lidos depois da instalação. Reinicie o Windows e execute o instalador de novo na mesma pasta: ele extrai os dados do jogo outra vez e mantém o resto.",
|
||||
"prepare.pack_failed": "Falha ao juntar o cache de shaders (código de saída {code}). Detalhes: {log}",
|
||||
"cleanup.ini_failed": "Não foi possível gravar o totk.ini: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.",
|
||||
"check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.",
|
||||
"check.vulkan_too_old": "Игре нужна видеокарта с Vulkan 1.3; найдено: {devices}. Обновите драйвер видеокарты.",
|
||||
"check.libraries_missing": "Игра не может запуститься в этой системе: ей нужна библиотека {libraries}, которой в системе нет. Установите пакет с ней через менеджер пакетов системы{packages} и запустите установку снова.",
|
||||
"check.no_display": "Для подготовки шейдеров нужен дисплей. Запустите установку из сеанса рабочего стола или выполните export DISPLAY=:0 (на Steam Deck в игровом режиме ещё XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Нужны игровые файлы: выберите базовую игру, обновление 1.1.0 или 1.2.1 или 1.4.3 и prod.keys.",
|
||||
"check.input_missing": "Файл не найден ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "Нет списка шейдеров.",
|
||||
"prepare.romfs_patches_failed": "Не удалось записать патчи данных игры (код выхода {code}). Подробности: {log}",
|
||||
"prepare.shaders_failed": "Не удалось подготовить шейдеры (код выхода {code}). Подробности: {log}",
|
||||
"prepare.libraries_missing": "Игра собрана, но не может запуститься: в системе нет библиотеки {libraries}. Установите пакет с ней через менеджер пакетов системы{packages} и запустите установку снова. Подробности: {log}",
|
||||
"cleanup.romfs_unreadable": "Данные игры в {path} пропали или не читаются после установки. Перезагрузите Windows и запустите установщик снова на ту же папку: он заново распакует данные игры, остальное сохранится.",
|
||||
"prepare.pack_failed": "Не удалось упаковать кэш шейдеров (код выхода {code}). Подробности: {log}",
|
||||
"cleanup.ini_failed": "Не удаётся записать totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Chưa cài đặt trình điều khiển Vulkan nào. Hãy cài đặt trình điều khiển mới nhất cho card đồ họa của bạn.",
|
||||
"check.vulkan_no_device": "Vulkan không tìm thấy card đồ họa nào. Hãy cài đặt trình điều khiển mới nhất cho card đồ họa của bạn.",
|
||||
"check.vulkan_too_old": "Trò chơi cần card đồ họa hỗ trợ Vulkan 1.3; tìm thấy: {devices}. Hãy cập nhật trình điều khiển đồ họa.",
|
||||
"check.libraries_missing": "Trò chơi không thể khởi động trên hệ thống này: cần {libraries}, nhưng hệ thống không có. Hãy cài gói cung cấp thư viện đó bằng trình quản lý gói của hệ thống{packages}, rồi chạy lại trình cài đặt.",
|
||||
"check.no_display": "Cần có màn hình hiển thị để chuẩn bị shader. Hãy chạy trình cài đặt từ phiên làm việc trên màn hình nền (desktop), hoặc export DISPLAY=:0 (trên Steam Deck ở Game Mode thì thêm XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Cần có các tệp trò chơi: hãy chọn trò chơi gốc, bản cập nhật 1.1.0 hoặc 1.2.1 hoặc 1.4.3 và prod.keys.",
|
||||
"check.input_missing": "Không tìm thấy tệp ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Thiếu danh sách shader.",
|
||||
"prepare.romfs_patches_failed": "Ghi các bản vá dữ liệu trò chơi không thành công (mã thoát {code}). Chi tiết: {log}",
|
||||
"prepare.shaders_failed": "Chuẩn bị shader không thành công (mã thoát {code}). Chi tiết: {log}",
|
||||
"prepare.libraries_missing": "Trò chơi đã được biên dịch nhưng không thể khởi động: hệ thống không có {libraries}. Hãy cài gói cung cấp thư viện đó bằng trình quản lý gói của hệ thống{packages}, rồi chạy lại trình cài đặt. Chi tiết: {log}",
|
||||
"cleanup.romfs_unreadable": "Dữ liệu trò chơi trong {path} bị thiếu hoặc không đọc được sau khi cài đặt. Hãy khởi động lại Windows, rồi chạy lại trình cài đặt trên cùng thư mục đó: trình cài đặt sẽ trích xuất lại dữ liệu trò chơi và giữ nguyên phần còn lại.",
|
||||
"prepare.pack_failed": "Đóng gói bộ nhớ đệm shader không thành công (mã thoát {code}). Chi tiết: {log}",
|
||||
"cleanup.ini_failed": "Không thể ghi totk.ini: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "未安装 Vulkan 驱动。请为你的显卡安装最新的驱动程序。",
|
||||
"check.vulkan_no_device": "Vulkan 找不到显卡。请为你的显卡安装最新的驱动程序。",
|
||||
"check.vulkan_too_old": "游戏需要支持 Vulkan 1.3 的显卡;检测到:{devices}。请更新显卡驱动程序。",
|
||||
"check.libraries_missing": "游戏无法在此系统上启动:它需要 {libraries},但系统中没有。请用系统的软件包管理器安装提供它的软件包{packages},然后重新运行安装程序。",
|
||||
"check.no_display": "准备着色器需要显示器。请在桌面会话中运行安装程序,或执行 export DISPLAY=:0(Steam Deck 游戏模式下还需 XDG_RUNTIME_DIR=/run/user/1000)。",
|
||||
"check.inputs_needed": "需要游戏文件:请选择游戏本体、1.1.0、1.2.1 或 1.4.3 更新以及 prod.keys。",
|
||||
"check.input_missing": "找不到文件({input}):{path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "缺少着色器列表。",
|
||||
"prepare.romfs_patches_failed": "写入游戏数据补丁失败(退出代码 {code})。详情:{log}",
|
||||
"prepare.shaders_failed": "准备着色器失败(退出代码 {code})。详情:{log}",
|
||||
"prepare.libraries_missing": "游戏已编译,但无法启动:系统中没有 {libraries}。请用系统的软件包管理器安装提供它的软件包{packages},然后重新运行安装程序。详情:{log}",
|
||||
"cleanup.romfs_unreadable": "安装完成后,{path} 中的游戏数据缺失或无法读取。请重启 Windows,然后对同一文件夹再次运行安装程序:它会重新提取游戏数据,其余内容保留。",
|
||||
"prepare.pack_failed": "打包着色器缓存失败(退出代码 {code})。详情:{log}",
|
||||
"cleanup.ini_failed": "无法写入 totk.ini:{detail}",
|
||||
|
||||
@@ -1037,6 +1037,59 @@ class FreeSpaceTest(unittest.TestCase):
|
||||
usage.assert_called_once_with(root)
|
||||
|
||||
|
||||
class MissingLibraryTest(unittest.TestCase):
|
||||
"""#1428, #1315, #1419: a system library the release's libSDL3.so.0 links is missing; the setup names it (and the
|
||||
package that provides it) before the lift, and after a game start the loader stopped, instead of exit code 127."""
|
||||
|
||||
LDD = ('\tlinux-vdso.so.1 (0x00007ffd)\n\tlibXss.so.1 => not found\n'
|
||||
'\tlibX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f00)\n\tlibdecor-0.so.0 => not found\n')
|
||||
|
||||
def test_packages_of_known_libraries(self):
|
||||
self.assertEqual(steps.library_packages(['libXss.so.1']),
|
||||
' (Fedora: libXScrnSaver, Debian/Ubuntu: libxss1, Arch: libxss)')
|
||||
self.assertEqual(steps.library_packages(['libXss.so.1', 'libfoo.so.9', 'libdecor-0.so.0']),
|
||||
' (Fedora: libXScrnSaver libdecor, Debian/Ubuntu: libxss1 libdecor-0-0, '
|
||||
'Arch: libxss libdecor)')
|
||||
self.assertEqual(steps.library_packages(['libfoo.so.9']), '')
|
||||
|
||||
def test_ldd_not_found_lines(self):
|
||||
runs = []
|
||||
|
||||
def ldd(cmd, **kw):
|
||||
runs.append(cmd)
|
||||
return SimpleNamespace(returncode=1, stdout=self.LDD, stderr='')
|
||||
with mock.patch.object(steps.sys, 'platform', 'linux'), mock.patch.object(steps.subprocess, 'run', ldd):
|
||||
self.assertEqual(steps.missing_libraries([Path('a/libSDL3.so.0'), Path('b/libother.so')]),
|
||||
['libXss.so.1', 'libdecor-0.so.0'])
|
||||
self.assertEqual([c[0] for c in runs], ['ldd', 'ldd'])
|
||||
|
||||
def test_no_ldd_or_not_linux(self):
|
||||
def missing(cmd, **kw):
|
||||
raise FileNotFoundError('ldd')
|
||||
with mock.patch.object(steps.sys, 'platform', 'linux'), mock.patch.object(steps.subprocess, 'run', missing):
|
||||
self.assertEqual(steps.missing_libraries([Path('libSDL3.so.0')]), [])
|
||||
with mock.patch.object(steps.sys, 'platform', 'win32'):
|
||||
self.assertEqual(steps.missing_libraries([Path('SDL3.dll')]), [])
|
||||
|
||||
def test_loader_error_in_the_prepare_log(self):
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
log = Path(d) / 'prepare-prepare_shaders.log'
|
||||
log.write_text('/home/p/TotK/totk: error while loading shared libraries: libXss.so.1: cannot open shared '
|
||||
'object file: No such file or directory\ntotk.exe --prepare-shaders: rc=127\n'
|
||||
'/home/p/TotK/totk: error while loading shared libraries: libXss.so.1: cannot open shared '
|
||||
'object file: No such file or directory\n', encoding='utf-8')
|
||||
self.assertEqual(steps.loader_missing(log), ['libXss.so.1'])
|
||||
self.assertEqual(steps.loader_missing(Path(d) / 'none.log'), [])
|
||||
|
||||
def test_messages_take_the_parameters(self):
|
||||
for path in (ROOT / 'installer' / 'text').glob('*.json'):
|
||||
catalog = json.loads(path.read_text(encoding='utf-8'))
|
||||
for id in ('check.libraries_missing', 'prepare.libraries_missing'):
|
||||
text = catalog[id].format(libraries='libXss.so.1', packages=' (Fedora: libXScrnSaver)', log='x.log')
|
||||
self.assertIn('libXss.so.1', text, (path.name, id))
|
||||
self.assertIn('libXScrnSaver', text, (path.name, id))
|
||||
|
||||
|
||||
class BaseGameCheckTest(unittest.TestCase):
|
||||
"""Issue #261: an update NSP chosen as the base game was reported as "not Tears of the Kingdom"."""
|
||||
BASE, UPDATE = '0100F2C0115B6000', '0100F2C0115B6800'
|
||||
|
||||
Reference in new issue
Block a user