mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 21:15:57 +00:00
The installer's host check survives a crashing Vulkan layer and names an App Control block
hostcheck flushes what it found before each Vulkan call, so a probe killed inside Vulkan still shows how far it got. Check.probe_host logs the exit code as Windows reports crashes (0xC0000005), runs a probe that died inside Vulkan once more with the implicit layers off (VK_LOADER_LAYERS_DISABLE=~implicit~) and, when that passes, goes on with a warning that lists the installed implicit layers; when it crashes again it stops with check.vulkan_crash. A probe Windows refuses to start (Smart App Control and other App Control policies, group policy, an antivirus) now stops with check.host_blocked instead of an uncaught OSError. Issues #1345 and #875. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
afae80c908
commit
d240181005
14 files changed
+211
-6
No files matched your search
@@ -57,9 +57,12 @@ static int x86_64_v3(void) {
|
||||
return (c & (1u << 5)) != 0; // LZCNT (ABM)
|
||||
}
|
||||
|
||||
// stdout is a pipe, so it is fully buffered: each part is flushed before the next call that can crash, and a probe
|
||||
// that a Vulkan layer or driver kills still hands the installer what it found (installer/steps.py Check.probe_host).
|
||||
int main(void) {
|
||||
printf("{\"x86_64_v2\": %s, \"x86_64_v3\": %s, ", x86_64_v2() ? "true" : "false",
|
||||
x86_64_v3() ? "true" : "false");
|
||||
fflush(stdout);
|
||||
void *lib = open_lib();
|
||||
PFN_vkGetInstanceProcAddr gipa = lib ? (PFN_vkGetInstanceProcAddr)lib_sym(lib, "vkGetInstanceProcAddr") : NULL;
|
||||
if (!gipa) {
|
||||
@@ -67,6 +70,7 @@ int main(void) {
|
||||
return 0;
|
||||
}
|
||||
printf("\"loader\": true, ");
|
||||
fflush(stdout);
|
||||
PFN_vkCreateInstance create = (PFN_vkCreateInstance)gipa(NULL, "vkCreateInstance");
|
||||
VkApplicationInfo app = {.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pApplicationName = "totk-install",
|
||||
.apiVersion = VK_API_VERSION_1_3};
|
||||
|
||||
+84
-6
@@ -124,6 +124,48 @@ def kill_tree(proc):
|
||||
proc.kill()
|
||||
|
||||
|
||||
def parse_host(text):
|
||||
"""The host check's JSON object, or None when it did not finish (a crash leaves the parts it flushed)."""
|
||||
try:
|
||||
host = json.loads(text)
|
||||
except ValueError:
|
||||
return None
|
||||
return host if isinstance(host, dict) and 'devices' in host else None
|
||||
|
||||
|
||||
def exit_code(code):
|
||||
"""A process exit code as Windows reports crashes (0xC0000005 for an access violation), else as a number."""
|
||||
if os.name == 'nt' and code is not None and (code < 0 or code >= 0xC0000000):
|
||||
return f'0x{code & 0xFFFFFFFF:08X}'
|
||||
return str(code)
|
||||
|
||||
|
||||
def implicit_vulkan_layers():
|
||||
"""Names of the enabled implicit Vulkan layer manifests the Windows registry lists (machine, then user), for the
|
||||
warning that names the program to update; empty elsewhere or when the registry cannot be read."""
|
||||
if os.name != 'nt':
|
||||
return []
|
||||
import winreg
|
||||
found = []
|
||||
for root in (winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER):
|
||||
try:
|
||||
key = winreg.OpenKey(root, r'SOFTWARE\Khronos\Vulkan\ImplicitLayers')
|
||||
except OSError:
|
||||
continue
|
||||
with key:
|
||||
i = 0
|
||||
while True:
|
||||
try:
|
||||
path, enabled, _ = winreg.EnumValue(key, i)
|
||||
except OSError:
|
||||
break
|
||||
i += 1
|
||||
name = Path(path).name
|
||||
if enabled == 0 and name not in found: # a DWORD 0 enables the manifest, anything else skips it
|
||||
found.append(name)
|
||||
return found
|
||||
|
||||
|
||||
def linux_glibc():
|
||||
"""(major, minor) of the C library this Linux process runs on, None elsewhere or when it is not glibc."""
|
||||
try:
|
||||
@@ -443,12 +485,7 @@ class Check(Step):
|
||||
if r.returncode:
|
||||
ctx.reporter.log(r.stdout + r.stderr)
|
||||
raise InstallError('check.toolchain_broken', detail=(r.stderr or r.stdout).strip()[-400:])
|
||||
r = subprocess.run([str(exe)], capture_output=True, text=True, errors='replace')
|
||||
try:
|
||||
host = json.loads(r.stdout)
|
||||
except ValueError:
|
||||
raise InstallError('check.host_probe_failed', code=r.returncode) from None
|
||||
ctx.reporter.log(f'host: {r.stdout.strip()}')
|
||||
host = self.probe_host(ctx, exe)
|
||||
if not host['x86_64_v2']:
|
||||
raise InstallError('check.cpu_too_old')
|
||||
# v3 is the faster build; v2 runs on CPUs without AVX2/FMA (runtime/fma.c supplies the fused multiply-add).
|
||||
@@ -468,6 +505,47 @@ class Check(Step):
|
||||
ctx.reporter.warning('warn.kernel_old', version='.'.join(map(str, kernel)))
|
||||
ctx.host = host
|
||||
|
||||
# Windows refuses to start a program a policy does not trust: Smart App Control and other App Control policies
|
||||
# (4551 "An Application Control policy has blocked this file", 4556 and 4580 the same for a bad reputation, issue
|
||||
# #875), group policy (1260) and an antivirus that flags the file (225, 226). hostcheck is the first program the
|
||||
# setup builds on this PC; totk.exe is built the same way and unsigned too, so the install cannot go on.
|
||||
BLOCKED_WINERRORS = {225, 226, 1260, 4551, 4556, 4580}
|
||||
|
||||
def probe_host(self, ctx, exe):
|
||||
"""Runs the host check built by host() and returns its JSON. A probe that crashes inside Vulkan is run again
|
||||
with the implicit Vulkan layers off (VK_LOADER_LAYERS_DISABLE, Vulkan loader 1.3.234 or later): overlays,
|
||||
recorders and tuning tools install such layers, and a broken one kills every Vulkan program at
|
||||
vkCreateInstance (issue #1345, exit code 0xC0000005 after "Checking the processor and the graphics card")."""
|
||||
rep = ctx.reporter
|
||||
r = self.run_probe(exe)
|
||||
host = parse_host(r.stdout)
|
||||
if host is not None:
|
||||
rep.log(f'host: {r.stdout.strip()}')
|
||||
return host
|
||||
code = exit_code(r.returncode)
|
||||
rep.log(f'host: the check stopped with exit code {code}; it printed {r.stdout.strip()!r}')
|
||||
if '"loader": true' not in r.stdout:
|
||||
raise InstallError('check.host_probe_failed', code=code)
|
||||
env = dict(os.environ, VK_LOADER_LAYERS_DISABLE='~implicit~')
|
||||
retry = self.run_probe(exe, env)
|
||||
host = parse_host(retry.stdout)
|
||||
if host is None:
|
||||
rep.log(f'host: without implicit Vulkan layers too: exit code {exit_code(retry.returncode)}, '
|
||||
f'{retry.stdout.strip()!r}')
|
||||
raise InstallError('check.vulkan_crash', code=code)
|
||||
layers = ', '.join(implicit_vulkan_layers()) or '?'
|
||||
rep.log(f'host: {retry.stdout.strip()} (implicit Vulkan layers off; installed: {layers})')
|
||||
rep.warning('warn.vulkan_layer_crash', code=code, layers=layers)
|
||||
return host
|
||||
|
||||
def run_probe(self, exe, env=None):
|
||||
try:
|
||||
return subprocess.run([str(exe)], capture_output=True, text=True, errors='replace', env=env)
|
||||
except OSError as e:
|
||||
if getattr(e, 'winerror', None) in self.BLOCKED_WINERRORS:
|
||||
raise InstallError('check.host_blocked', path=str(exe), detail=e.strerror or str(e)) from None
|
||||
raise InstallError('check.host_probe_failed', code=f'{getattr(e, "winerror", None) or e.errno}: {e.strerror or e}') from None
|
||||
|
||||
def inputs(self, ctx):
|
||||
"""Open both files with the keys as the extraction will. Returns the bytes of both Program NCAs."""
|
||||
o = ctx.options
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "Der mitgelieferte Compiler funktioniert nicht: {detail}",
|
||||
"check.glibc_old": "Die C-Bibliothek dieses Systems ist glibc {version}; der Compiler des Setups braucht {need} oder neuer (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 und neuer haben sie). Ein Systemupdate behebt das.",
|
||||
"check.host_probe_failed": "Die Computerprüfung ist nicht gelaufen (Exit-Code {code}).",
|
||||
"check.host_blocked": "Windows hat ein Programm blockiert, das das Setup auf diesem PC erstellt hat ({path}): {detail}. Smart App Control, eine App-Control-Richtlinie oder ein Virenscanner blockiert unsignierte Programme; das Spiel selbst wird genauso auf diesem PC erstellt und würde ebenfalls blockiert. Erlaube den Setup-Ordner in deinem Virenscanner oder schalte Smart App Control in der Windows-Sicherheit (App- und Browsersteuerung) aus und starte das Setup erneut.",
|
||||
"check.vulkan_crash": "Der Grafiktreiber ist abgestürzt, als das Setup nach den Grafikkarten gefragt hat (Exit-Code {code}), auch mit ausgeschalteten Vulkan-Layern anderer Programme. Installiere den neuesten Treiber für deine Grafikkarte.",
|
||||
"check.cpu_too_old": "Diesem Prozessor fehlt x86-64-v2 (SSE4.2, POPCNT und CMPXCHG16B), die älteste Stufe, für die das Spiel gebaut wird. Intel Nehalem (2008) oder AMD Bulldozer (2011) und neuer haben sie.",
|
||||
"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.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "Die Xbox-, PlayStation- oder PC-Tastensymbole konnten nicht vorbereitet werden (Exit-Code {code}); das Spiel behält die Switch-Symbole. Details: {log}",
|
||||
"warn.shaders_skipped": "Der Grafiktreiber ist beim Erstellen einiger Shader abgestürzt, daher wurden {count} bei der Vorbereitung ausgelassen. Das Spiel erstellt sie, wenn es sie zum ersten Mal braucht, und der Treiber kann dort ebenfalls abstürzen; ein Treiberupdate kann das beheben. Details: {log}",
|
||||
"warn.kernel_old": "Linux {version} fehlt das Schreib-Tracking, auf das das Spiel angewiesen ist (6.7 oder neuer); das Spiel kann sehr langsam laufen. Ein Systemupdate behebt das.",
|
||||
"warn.vulkan_layer_crash": "Ein Vulkan-Layer eines anderen Programms hat die Computerprüfung abstürzen lassen (Exit-Code {code}); ohne ihn lief die Prüfung durch. Installierte Layer: {layers}. Das Spiel lädt dieselben Layer und kann beim Start abstürzen: Aktualisiere oder deinstalliere das Overlay-, Aufnahme- oder Tuning-Programm, das den fehlerhaften Layer installiert hat.",
|
||||
"warn.dlss_kept": "Im Installationsordner liegt bereits eine DLSS-Bibliothek ({path}); das Setup behält sie.",
|
||||
"warn.dlss_download_failed": "NVIDIA DLSS konnte nicht von {url} heruntergeladen werden: {detail}. Das Spiel läuft ohne; der nächste Setup-Lauf versucht es erneut.",
|
||||
"ui.title": "TotK-Setup",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"check.toolchain_broken": "The bundled compiler does not work: {detail}",
|
||||
"check.glibc_old": "This system's C library is glibc {version}; the setup's compiler needs {need} or later (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 and newer have it). Updating the system fixes this.",
|
||||
"check.host_probe_failed": "The computer check did not run (exit code {code}).",
|
||||
"check.host_blocked": "Windows blocked a program the setup built on this PC ({path}): {detail}. Smart App Control, an App Control policy or an antivirus blocks unsigned programs; the game itself is built on this PC the same way, so it would be blocked too. Allow the setup folder in your antivirus, or turn off Smart App Control in Windows Security (App & browser control), then run the setup again.",
|
||||
"check.vulkan_crash": "The graphics driver crashed while the setup asked it for the graphics cards (exit code {code}), also with the Vulkan layers of other programs turned off. Install the latest driver for your graphics card.",
|
||||
"check.cpu_too_old": "This processor lacks x86-64-v2 (SSE4.2, POPCNT and CMPXCHG16B), the oldest level the game is built for. Intel Nehalem (2008) or AMD Bulldozer (2011) and newer have it.",
|
||||
"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.",
|
||||
@@ -116,6 +118,7 @@
|
||||
"warn.xbox_prompts_failed": "The Xbox, PlayStation or PC button prompts could not be prepared (exit code {code}); the game keeps the Switch prompts. Details: {log}",
|
||||
"warn.shaders_skipped": "The graphics driver crashed while building some shaders, so {count} were left out of the preparation. The game builds them when it first needs them, and the driver may crash there too; a driver update may fix it. Details: {log}",
|
||||
"warn.kernel_old": "Linux {version} lacks the write tracking the game relies on (6.7 or later); the game may run very slowly. Updating the system fixes this.",
|
||||
"warn.vulkan_layer_crash": "A Vulkan layer of another program crashed the computer check (exit code {code}); without it the check passed. Installed layers: {layers}. The game loads the same layers and may crash at start: update or uninstall the overlay, recorder or tuning program that installed the failing one.",
|
||||
"warn.dlss_kept": "A DLSS library is already in the install folder ({path}); the setup keeps it.",
|
||||
"warn.dlss_download_failed": "NVIDIA DLSS could not be downloaded from {url}: {detail}. The game runs without it; the next setup run tries again.",
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "El compilador incluido no funciona: {detail}",
|
||||
"check.glibc_old": "La biblioteca C de este sistema es glibc {version}; el compilador del instalador necesita {need} o posterior (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 y posteriores la tienen). Actualizar el sistema lo soluciona.",
|
||||
"check.host_probe_failed": "La comprobación del equipo no se ejecutó (código de salida {code}).",
|
||||
"check.host_blocked": "Windows bloqueó un programa que el instalador creó en este PC ({path}): {detail}. Smart App Control, una directiva de App Control o un antivirus bloquean los programas sin firmar; el propio juego se crea igual en este PC, así que también se bloquearía. Permite la carpeta del instalador en tu antivirus o desactiva Smart App Control en Seguridad de Windows (Control de aplicaciones y navegador) y vuelve a ejecutar el instalador.",
|
||||
"check.vulkan_crash": "El controlador gráfico falló cuando el instalador le pidió las tarjetas gráficas (código de salida {code}), también con las capas Vulkan de otros programas desactivadas. Instala el controlador más reciente de tu tarjeta gráfica.",
|
||||
"check.cpu_too_old": "Este procesador no tiene x86-64-v2 (SSE4.2, POPCNT y CMPXCHG16B), el nivel más antiguo para el que se compila el juego. Intel Nehalem (2008) o AMD Bulldozer (2011) y posteriores lo tienen.",
|
||||
"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.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "No se pudieron preparar los iconos de botones de Xbox, PlayStation o PC (código de salida {code}); el juego mantiene los iconos de Switch. Detalles: {log}",
|
||||
"warn.shaders_skipped": "El controlador gráfico falló al crear algunos shaders, así que {count} quedaron fuera de la preparación. El juego los crea cuando los necesita por primera vez, y el controlador también puede fallar ahí; una actualización del controlador puede solucionarlo. Detalles: {log}",
|
||||
"warn.kernel_old": "Linux {version} no tiene el seguimiento de escrituras del que depende el juego (6.7 o posterior); el juego puede ir muy lento. Actualizar el sistema lo soluciona.",
|
||||
"warn.vulkan_layer_crash": "Una capa Vulkan de otro programa hizo fallar la comprobación del equipo (código de salida {code}); sin ella la comprobación pasó. Capas instaladas: {layers}. El juego carga las mismas capas y puede fallar al iniciar: actualiza o desinstala el programa de superposición, grabación o ajuste que instaló la capa que falla.",
|
||||
"warn.dlss_kept": "Ya hay una biblioteca DLSS en la carpeta de instalación ({path}); el instalador la conserva.",
|
||||
"warn.dlss_download_failed": "No se pudo descargar NVIDIA DLSS desde {url}: {detail}. El juego funciona sin él; la próxima ejecución del instalador lo intentará de nuevo.",
|
||||
"ui.title": "Instalador de TotK",
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "Le compilateur fourni ne fonctionne pas : {detail}",
|
||||
"check.glibc_old": "La bibliothèque C de ce système est glibc {version} ; le compilateur de l'installation demande {need} ou plus récent (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 et plus récents l'ont). Mettre à jour le système corrige cela.",
|
||||
"check.host_probe_failed": "La vérification de l'ordinateur ne s'est pas exécutée (code de sortie {code}).",
|
||||
"check.host_blocked": "Windows a bloqué un programme que l'installateur a compilé sur ce PC ({path}) : {detail}. Smart App Control, une stratégie App Control ou un antivirus bloque les programmes non signés ; le jeu lui-même est compilé de la même façon sur ce PC et serait bloqué aussi. Autorisez le dossier de l'installateur dans votre antivirus, ou désactivez Smart App Control dans Sécurité Windows (Contrôle des applications et du navigateur), puis relancez l'installateur.",
|
||||
"check.vulkan_crash": "Le pilote graphique a planté quand l'installateur lui a demandé les cartes graphiques (code de sortie {code}), même avec les couches Vulkan des autres programmes désactivées. Installez le dernier pilote de votre carte graphique.",
|
||||
"check.cpu_too_old": "Ce processeur ne prend pas en charge x86-64-v2 (SSE4.2, POPCNT et CMPXCHG16B), le niveau le plus ancien pour lequel le jeu est compilé. Intel Nehalem (2008) ou AMD Bulldozer (2011) et plus récents l'ont.",
|
||||
"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.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "Les icônes de boutons Xbox, PlayStation ou PC n'ont pas pu être préparées (code de sortie {code}) ; le jeu garde les icônes Switch. Détails : {log}",
|
||||
"warn.shaders_skipped": "Le pilote graphique a planté pendant la construction de certains shaders ; {count} ont donc été exclus de la préparation. Le jeu les construit quand il en a besoin pour la première fois, et le pilote peut y planter aussi ; une mise à jour du pilote peut corriger cela. Détails : {log}",
|
||||
"warn.kernel_old": "Linux {version} ne dispose pas du suivi des écritures dont le jeu dépend (6.7 ou plus récent) ; le jeu peut être très lent. Mettre à jour le système corrige cela.",
|
||||
"warn.vulkan_layer_crash": "Une couche Vulkan d'un autre programme a fait planter la vérification de l'ordinateur (code de sortie {code}) ; sans elle, la vérification a réussi. Couches installées : {layers}. Le jeu charge les mêmes couches et peut planter au démarrage : mettez à jour ou désinstallez le programme d'overlay, d'enregistrement ou de réglage qui a installé la couche fautive.",
|
||||
"warn.dlss_kept": "Une bibliothèque DLSS se trouve déjà dans le dossier d'installation ({path}) ; l'installation la conserve.",
|
||||
"warn.dlss_download_failed": "NVIDIA DLSS n'a pas pu être téléchargé depuis {url} : {detail}. Le jeu fonctionne sans ; la prochaine installation réessaiera.",
|
||||
"ui.title": "Installation de TotK",
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "Il compilatore incluso non funziona: {detail}",
|
||||
"check.glibc_old": "La libreria C di questo sistema è glibc {version}; il compilatore dell'installazione richiede {need} o successiva (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 e successivi la hanno). Aggiornare il sistema risolve il problema.",
|
||||
"check.host_probe_failed": "Il controllo del computer non è stato eseguito (codice di uscita {code}).",
|
||||
"check.host_blocked": "Windows ha bloccato un programma che il programma di installazione ha compilato su questo PC ({path}): {detail}. Smart App Control, un criterio App Control o un antivirus bloccano i programmi non firmati; anche il gioco viene compilato così su questo PC e verrebbe bloccato. Consenti la cartella di installazione nell'antivirus oppure disattiva Smart App Control in Sicurezza di Windows (Controllo app e browser), poi esegui di nuovo l'installazione.",
|
||||
"check.vulkan_crash": "Il driver grafico si è bloccato quando l'installazione gli ha chiesto le schede grafiche (codice di uscita {code}), anche con i livelli Vulkan degli altri programmi disattivati. Installa il driver più recente della tua scheda grafica.",
|
||||
"check.cpu_too_old": "Questo processore non supporta x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), il livello più vecchio per cui il gioco viene compilato. Intel Nehalem (2008) o AMD Bulldozer (2011) e successivi lo supportano.",
|
||||
"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.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "Non è stato possibile preparare le icone dei pulsanti Xbox, PlayStation o PC (codice di uscita {code}); il gioco mantiene le icone di Switch. Dettagli: {log}",
|
||||
"warn.shaders_skipped": "Il driver grafico si è bloccato durante la creazione di alcuni shader, quindi {count} sono stati esclusi dalla preparazione. Il gioco li crea quando servono per la prima volta, e anche lì il driver potrebbe bloccarsi; un aggiornamento del driver potrebbe risolvere. Dettagli: {log}",
|
||||
"warn.kernel_old": "Linux {version} non ha il tracciamento delle scritture su cui si basa il gioco (6.7 o successivo); il gioco potrebbe essere molto lento. Aggiornare il sistema risolve il problema.",
|
||||
"warn.vulkan_layer_crash": "Un livello Vulkan di un altro programma ha fatto bloccare il controllo del computer (codice di uscita {code}); senza di esso il controllo è riuscito. Livelli installati: {layers}. Il gioco carica gli stessi livelli e potrebbe bloccarsi all'avvio: aggiorna o disinstalla il programma di overlay, registrazione o tuning che ha installato quello difettoso.",
|
||||
"warn.dlss_kept": "Nella cartella di installazione c'è già una libreria DLSS ({path}); l'installazione la mantiene.",
|
||||
"warn.dlss_download_failed": "Impossibile scaricare NVIDIA DLSS da {url}: {detail}. Il gioco funziona senza; la prossima esecuzione dell'installazione riproverà.",
|
||||
"ui.title": "Installazione di TotK",
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "同梱のコンパイラーが動作しません: {detail}",
|
||||
"check.glibc_old": "このシステムの C ライブラリは glibc {version} です。セットアップのコンパイラーには {need} 以降が必要です (Ubuntu 22.04、Debian 12、Fedora 35、SteamOS 3 以降にあります)。システムを更新すると解決します。",
|
||||
"check.host_probe_failed": "コンピューターの確認を実行できませんでした (終了コード {code})。",
|
||||
"check.host_blocked": "セットアップがこの PC でビルドしたプログラム ({path}) を Windows がブロックしました: {detail}。スマート アプリ コントロール、App Control ポリシー、またはウイルス対策ソフトが署名のないプログラムをブロックしています。ゲーム本体も同じ方法でこの PC でビルドされるため、同じくブロックされます。ウイルス対策ソフトでセットアップのフォルダーを許可するか、Windows セキュリティ (アプリとブラウザー コントロール) でスマート アプリ コントロールをオフにしてから、セットアップをもう一度実行してください。",
|
||||
"check.vulkan_crash": "セットアップがグラフィックカードを問い合わせたときにグラフィックドライバーがクラッシュしました (終了コード {code})。他のプログラムの Vulkan レイヤーをオフにしても同じでした。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.cpu_too_old": "このプロセッサーは、ゲームのビルド対象となる最も古いレベルである x86-64-v2 (SSE4.2、POPCNT、CMPXCHG16B) に対応していません。Intel Nehalem (2008 年) または AMD Bulldozer (2011 年) 以降が対応しています。",
|
||||
"check.vulkan_missing": "Vulkan ドライバーがインストールされていません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.vulkan_no_device": "Vulkan がグラフィックカードを見つけられません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "Xbox、PlayStation、PC のボタン表示を準備できませんでした (終了コード {code})。ゲームは Switch のボタン表示のままです。詳細: {log}",
|
||||
"warn.shaders_skipped": "一部のシェーダーのビルド中にグラフィックドライバーがクラッシュしたため、{count} 個を準備から除外しました。ゲームは初めて必要になったときにそれらをビルドしますが、そこでもドライバーがクラッシュする可能性があります。ドライバーを更新すると解決することがあります。詳細: {log}",
|
||||
"warn.kernel_old": "Linux {version} には、ゲームが必要とする書き込み追跡 (6.7 以降) がありません。ゲームが非常に遅くなることがあります。システムを更新すると解決します。",
|
||||
"warn.vulkan_layer_crash": "他のプログラムの Vulkan レイヤーがコンピューターの確認をクラッシュさせました (終了コード {code})。そのレイヤーなしでは確認は成功しました。インストール済みのレイヤー: {layers}。ゲームも同じレイヤーを読み込むため、起動時にクラッシュすることがあります。問題のレイヤーを入れたオーバーレイ、録画、チューニングのプログラムを更新するかアンインストールしてください。",
|
||||
"warn.dlss_kept": "インストール先フォルダーには既に DLSS ライブラリがあります ({path})。セットアップはそれを残します。",
|
||||
"warn.dlss_download_failed": "NVIDIA DLSS を {url} からダウンロードできませんでした: {detail}。ゲームはなしで動作します。次回のセットアップ実行時に再試行します。",
|
||||
"ui.title": "TotK セットアップ",
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "포함된 컴파일러가 작동하지 않습니다: {detail}",
|
||||
"check.glibc_old": "이 시스템의 C 라이브러리는 glibc {version}입니다. 설치 프로그램의 컴파일러에는 {need} 이상이 필요합니다(Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 이상에 있음). 시스템을 업데이트하면 해결됩니다.",
|
||||
"check.host_probe_failed": "컴퓨터 확인이 실행되지 않았습니다(종료 코드 {code}).",
|
||||
"check.host_blocked": "설치 프로그램이 이 PC에서 빌드한 프로그램({path})을 Windows가 차단했습니다: {detail}. 스마트 앱 컨트롤, App Control 정책 또는 백신이 서명되지 않은 프로그램을 차단합니다. 게임 자체도 이 PC에서 같은 방식으로 빌드되므로 마찬가지로 차단됩니다. 백신에서 설치 프로그램 폴더를 허용하거나 Windows 보안(앱 및 브라우저 컨트롤)에서 스마트 앱 컨트롤을 끈 다음 설치 프로그램을 다시 실행하세요.",
|
||||
"check.vulkan_crash": "설치 프로그램이 그래픽 카드를 조회하는 중에 그래픽 드라이버가 충돌했습니다(종료 코드 {code}). 다른 프로그램의 Vulkan 레이어를 끈 상태에서도 마찬가지였습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.cpu_too_old": "이 프로세서에는 게임이 빌드되는 가장 오래된 수준인 x86-64-v2(SSE4.2, POPCNT, CMPXCHG16B)가 없습니다. Intel Nehalem(2008) 또는 AMD Bulldozer(2011) 이후 프로세서에 있습니다.",
|
||||
"check.vulkan_missing": "Vulkan 드라이버가 설치되어 있지 않습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.vulkan_no_device": "Vulkan이 그래픽 카드를 찾지 못했습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "Xbox, PlayStation 또는 PC 버튼 표시를 준비할 수 없었습니다(종료 코드 {code}). 게임은 Switch 버튼 표시를 유지합니다. 자세히: {log}",
|
||||
"warn.shaders_skipped": "일부 셰이더를 빌드하는 동안 그래픽 드라이버가 충돌하여 {count}개를 준비에서 제외했습니다. 게임은 처음 필요할 때 이를 빌드하며, 그때도 드라이버가 충돌할 수 있습니다. 드라이버를 업데이트하면 해결될 수 있습니다. 자세히: {log}",
|
||||
"warn.kernel_old": "Linux {version}에는 게임이 사용하는 쓰기 추적(6.7 이상)이 없습니다. 게임이 매우 느릴 수 있습니다. 시스템을 업데이트하면 해결됩니다.",
|
||||
"warn.vulkan_layer_crash": "다른 프로그램의 Vulkan 레이어 때문에 컴퓨터 확인이 충돌했습니다(종료 코드 {code}). 그 레이어 없이는 확인을 통과했습니다. 설치된 레이어: {layers}. 게임도 같은 레이어를 불러오므로 시작할 때 충돌할 수 있습니다. 문제의 레이어를 설치한 오버레이, 녹화 또는 튜닝 프로그램을 업데이트하거나 제거하세요.",
|
||||
"warn.dlss_kept": "설치 폴더에 이미 DLSS 라이브러리가 있습니다({path}). 설치 프로그램은 그대로 둡니다.",
|
||||
"warn.dlss_download_failed": "{url}에서 NVIDIA DLSS를 다운로드할 수 없습니다: {detail}. 게임은 없이도 실행되며, 다음 설치 실행 때 다시 시도합니다.",
|
||||
"ui.title": "TotK 설치",
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
"check.toolchain_broken": "De meegeleverde compiler werkt niet: {detail}",
|
||||
"check.glibc_old": "De C-bibliotheek van dit systeem is glibc {version}; de compiler van de installatie heeft {need} of nieuwer nodig (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 en nieuwer hebben die). Het systeem bijwerken lost dit op.",
|
||||
"check.host_probe_failed": "De computercontrole is niet uitgevoerd (afsluitcode {code}).",
|
||||
"check.host_blocked": "Windows heeft een programma geblokkeerd dat de installatie op deze pc heeft gebouwd ({path}): {detail}. Slim app-beheer, een App Control-beleid of een virusscanner blokkeert niet-ondertekende programma's; het spel zelf wordt op dezelfde manier op deze pc gebouwd en zou ook worden geblokkeerd. Sta de installatiemap toe in je virusscanner, of zet Slim app-beheer uit in Windows-beveiliging (App- en browserbeheer), en start de installatie opnieuw.",
|
||||
"check.vulkan_crash": "Het grafische stuurprogramma is gecrasht toen de installatie het om de videokaarten vroeg (afsluitcode {code}), ook met de Vulkan-lagen van andere programma's uitgeschakeld. Installeer het nieuwste stuurprogramma voor je videokaart.",
|
||||
"check.cpu_too_old": "Deze processor mist x86-64-v2 (SSE4.2, POPCNT en CMPXCHG16B), het oudste niveau waarvoor het spel wordt gebouwd. Intel Nehalem (2008) of AMD Bulldozer (2011) en nieuwer hebben het.",
|
||||
"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.",
|
||||
@@ -111,6 +113,7 @@
|
||||
"warn.xbox_prompts_failed": "De Xbox-, PlayStation- of pc-knoppictogrammen konden niet worden voorbereid (afsluitcode {code}); het spel houdt de Switch-pictogrammen. Details: {log}",
|
||||
"warn.shaders_skipped": "Het grafische stuurprogramma is gecrasht bij het bouwen van enkele shaders, dus {count} zijn uit de voorbereiding weggelaten. Het spel bouwt ze wanneer het ze voor het eerst nodig heeft, en het stuurprogramma kan daar ook crashen; een update van het stuurprogramma kan dit oplossen. Details: {log}",
|
||||
"warn.kernel_old": "Linux {version} mist de schrijftracering waar het spel op rekent (6.7 of nieuwer); het spel kan erg traag zijn. Het systeem bijwerken lost dit op.",
|
||||
"warn.vulkan_layer_crash": "Een Vulkan-laag van een ander programma liet de computercontrole crashen (afsluitcode {code}); zonder die laag slaagde de controle. Geïnstalleerde lagen: {layers}. Het spel laadt dezelfde lagen en kan bij het starten crashen: werk het overlay-, opname- of tuningprogramma dat de foute laag installeerde bij of verwijder het.",
|
||||
"warn.dlss_kept": "Er staat al een DLSS-bibliotheek in de installatiemap ({path}); de installatie laat die staan.",
|
||||
"warn.dlss_download_failed": "NVIDIA DLSS kon niet worden gedownload van {url}: {detail}. Het spel werkt zonder; de volgende installatieronde probeert het opnieuw.",
|
||||
"ui.title": "TotK-installatie",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"check.toolchain_broken": "O compilador incluído não funciona: {detail}",
|
||||
"check.glibc_old": "A biblioteca C deste sistema é a glibc {version}; o compilador da instalação precisa da {need} ou mais nova (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 e mais novos têm). Atualizar o sistema resolve.",
|
||||
"check.host_probe_failed": "A verificação do computador não rodou (código de saída {code}).",
|
||||
"check.host_blocked": "O Windows bloqueou um programa que o instalador compilou neste PC ({path}): {detail}. O Controle Inteligente de Aplicativos, uma política de App Control ou um antivírus bloqueia programas sem assinatura; o próprio jogo é compilado do mesmo jeito neste PC e também seria bloqueado. Libere a pasta do instalador no seu antivírus ou desative o Controle Inteligente de Aplicativos na Segurança do Windows (Controle de aplicativos e do navegador) e rode o instalador de novo.",
|
||||
"check.vulkan_crash": "O driver de vídeo travou quando o instalador pediu a lista de placas de vídeo (código de saída {code}), mesmo com as camadas Vulkan de outros programas desativadas. Instale o driver mais recente da sua placa de vídeo.",
|
||||
"check.cpu_too_old": "Este processador não tem x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), o nível mais antigo para o qual o jogo é compilado. Intel Nehalem (2008) ou AMD Bulldozer (2011) e mais novos têm.",
|
||||
"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.",
|
||||
@@ -116,6 +118,7 @@
|
||||
"warn.xbox_prompts_failed": "Não foi possível preparar os ícones de botão do Xbox, do PlayStation ou do PC (código de saída {code}); o jogo mantém os ícones do Switch. Detalhes: {log}",
|
||||
"warn.shaders_skipped": "O driver gráfico travou ao compilar alguns shaders, então {count} ficaram fora da preparação. O jogo os compila quando precisar deles pela primeira vez, e o driver pode travar ali também; uma atualização do driver pode resolver. Detalhes: {log}",
|
||||
"warn.kernel_old": "O Linux {version} não tem o rastreamento de escrita de que o jogo depende (6.7 ou mais novo); o jogo pode rodar muito devagar. Atualizar o sistema resolve.",
|
||||
"warn.vulkan_layer_crash": "Uma camada Vulkan de outro programa travou a verificação do computador (código de saída {code}); sem ela a verificação passou. Camadas instaladas: {layers}. O jogo carrega as mesmas camadas e pode travar ao iniciar: atualize ou desinstale o programa de overlay, gravação ou ajuste que instalou a camada com problema.",
|
||||
"warn.dlss_kept": "Já existe uma biblioteca DLSS na pasta de instalação ({path}); a instalação a mantém.",
|
||||
"warn.dlss_download_failed": "Não foi possível baixar o NVIDIA DLSS de {url}: {detail}. O jogo funciona sem ele; a próxima execução da instalação tenta de novo.",
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"check.toolchain_broken": "Встроенный компилятор не работает: {detail}",
|
||||
"check.glibc_old": "Библиотека C этой системы — glibc {version}; компилятору установщика нужна {need} или новее (она есть в Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 и новее). Обновление системы это исправит.",
|
||||
"check.host_probe_failed": "Проверка компьютера не выполнилась (код выхода {code}).",
|
||||
"check.host_blocked": "Windows заблокировала программу, которую установщик собрал на этом компьютере ({path}): {detail}. Интеллектуальное управление приложениями (Smart App Control), политика App Control или антивирус блокируют неподписанные программы; сама игра собирается на этом компьютере так же и тоже будет заблокирована. Разрешите папку установщика в антивирусе или отключите интеллектуальное управление приложениями в «Безопасности Windows» («Управление приложениями/браузером») и запустите установщик снова.",
|
||||
"check.vulkan_crash": "Видеодрайвер аварийно завершился, когда установщик запросил список видеокарт (код выхода {code}), в том числе с отключёнными слоями Vulkan других программ. Установите свежий драйвер видеокарты.",
|
||||
"check.cpu_too_old": "Этому процессору не хватает x86-64-v2 (SSE4.2, POPCNT и CMPXCHG16B) — минимального уровня, под который собрана игра. Он есть у Intel Nehalem (2008) и AMD Bulldozer (2011) и новее.",
|
||||
"check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.",
|
||||
"check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.",
|
||||
@@ -116,6 +118,7 @@
|
||||
"warn.xbox_prompts_failed": "Не удалось подготовить подсказки кнопок Xbox, PlayStation или PC (код выхода {code}); игра оставит подсказки Switch. Подробности: {log}",
|
||||
"warn.shaders_skipped": "Графический драйвер аварийно завершился при сборке части шейдеров, поэтому {count} из них пропущены при подготовке. Игра соберёт их, когда они впервые понадобятся, и драйвер может упасть и там; обновление драйвера может это исправить. Подробности: {log}",
|
||||
"warn.kernel_old": "В Linux {version} нет отслеживания записи, на которое опирается игра (нужна версия 6.7 или новее); игра может работать очень медленно. Обновление системы это исправит.",
|
||||
"warn.vulkan_layer_crash": "Слой Vulkan другой программы обрушил проверку компьютера (код выхода {code}); без него проверка прошла. Установленные слои: {layers}. Игра загружает те же слои и может упасть при запуске: обновите или удалите программу оверлея, записи или настройки, которая установила сбойный слой.",
|
||||
"warn.dlss_kept": "В папке установки уже есть библиотека DLSS ({path}); установка её оставляет.",
|
||||
"warn.dlss_download_failed": "Не удалось загрузить NVIDIA DLSS с {url}: {detail}. Игра работает и без него; при следующем запуске установка попробует снова.",
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"check.toolchain_broken": "自带的编译器无法工作:{detail}",
|
||||
"check.glibc_old": "此系统的 C 库为 glibc {version};安装程序的编译器需要 {need} 或更新版本(Ubuntu 22.04、Debian 12、Fedora 35、SteamOS 3 及更新版本都满足)。更新系统即可解决。",
|
||||
"check.host_probe_failed": "电脑检查未能运行(退出代码 {code})。",
|
||||
"check.host_blocked": "Windows 阻止了安装程序在这台电脑上编译的程序({path}):{detail}。智能应用控制、App Control 策略或杀毒软件会阻止未签名的程序;游戏本身也以同样方式在这台电脑上编译,同样会被阻止。请在杀毒软件中允许安装程序所在的文件夹,或在 Windows 安全中心(应用和浏览器控制)中关闭智能应用控制,然后重新运行安装程序。",
|
||||
"check.vulkan_crash": "安装程序向显卡驱动查询显卡时,驱动崩溃了(退出代码 {code}),关闭其他程序的 Vulkan 层后依然如此。请为你的显卡安装最新的驱动程序。",
|
||||
"check.cpu_too_old": "此处理器不支持 x86-64-v2(SSE4.2、POPCNT 和 CMPXCHG16B),这是游戏所需的最低指令集。Intel Nehalem(2008 年)或 AMD Bulldozer(2011 年)及更新的处理器都支持。",
|
||||
"check.vulkan_missing": "未安装 Vulkan 驱动。请为你的显卡安装最新的驱动程序。",
|
||||
"check.vulkan_no_device": "Vulkan 找不到显卡。请为你的显卡安装最新的驱动程序。",
|
||||
@@ -116,6 +118,7 @@
|
||||
"warn.xbox_prompts_failed": "无法准备 Xbox、PlayStation 或 PC 按键提示(退出代码 {code});游戏将继续使用 Switch 按键提示。详情:{log}",
|
||||
"warn.shaders_skipped": "显卡驱动在编译部分着色器时崩溃,因此有 {count} 个着色器未被预先准备。游戏会在首次需要时编译它们,驱动在那时也可能崩溃;更新驱动可能会解决。详情:{log}",
|
||||
"warn.kernel_old": "Linux {version} 缺少游戏依赖的写入跟踪功能(需要 6.7 或更新版本);游戏可能运行得很慢。更新系统即可解决。",
|
||||
"warn.vulkan_layer_crash": "另一个程序的 Vulkan 层导致电脑检查崩溃(退出代码 {code});去掉它后检查通过。已安装的层:{layers}。游戏会加载同样的层,启动时可能崩溃:请更新或卸载安装了出错层的叠加层、录制或调校程序。",
|
||||
"warn.dlss_kept": "安装文件夹中已有 DLSS 库({path});安装程序将保留它。",
|
||||
"warn.dlss_download_failed": "无法从 {url} 下载 NVIDIA DLSS:{detail}。游戏无需它也能运行;下次运行安装程序时会重试。",
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@ Run: python tests/installer_test.py
|
||||
import http.client
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
@@ -1256,5 +1258,93 @@ class DlssTest(unittest.TestCase):
|
||||
self.assertEqual(self.warnings(), [])
|
||||
|
||||
|
||||
class HostProbeTest(unittest.TestCase):
|
||||
"""Check.probe_host: the host check's crashes and refusals (issues #875, #1345)."""
|
||||
GOOD = '{"x86_64_v2": true, "x86_64_v3": true, "loader": true, "instance": 0, "devices": [' \
|
||||
'{"name": "Intel(R) UHD Graphics", "api": [1, 3, 215], "type": 1}]}\n'
|
||||
CRASHED_IN_VULKAN = '{"x86_64_v2": true, "x86_64_v3": true, "loader": true, '
|
||||
ACCESS_VIOLATION = 0xC0000005
|
||||
|
||||
def setUp(self):
|
||||
self.ctx = SimpleNamespace(reporter=Reporter(out=io.StringIO()))
|
||||
self.calls = []
|
||||
|
||||
def tearDown(self):
|
||||
self.ctx.reporter.close()
|
||||
|
||||
def probe(self, *results):
|
||||
"""Runs probe_host with subprocess.run answering each call with the next of results (an exception is raised)."""
|
||||
answers = iter(results)
|
||||
|
||||
def run(command, **kwargs):
|
||||
self.calls.append(kwargs.get('env'))
|
||||
r = next(answers)
|
||||
if isinstance(r, BaseException):
|
||||
raise r
|
||||
return subprocess.CompletedProcess(command, r[0], r[1], '')
|
||||
|
||||
with mock.patch.object(steps.subprocess, 'run', run), \
|
||||
mock.patch.object(steps, 'implicit_vulkan_layers', lambda: ['BadOverlay64.json']):
|
||||
return steps.Check().probe_host(self.ctx, Path('hostcheck.exe'))
|
||||
|
||||
def events(self, kind):
|
||||
return [e for e in map(json.loads, self.ctx.reporter.out.getvalue().splitlines()) if e['type'] == kind]
|
||||
|
||||
def test_a_good_probe_runs_once(self):
|
||||
host = self.probe((0, self.GOOD))
|
||||
self.assertEqual(host['devices'][0]['api'], [1, 3, 215])
|
||||
self.assertEqual(self.calls, [None])
|
||||
self.assertEqual(self.events('warning'), [])
|
||||
|
||||
def test_a_crash_in_a_vulkan_layer_is_run_again_without_the_implicit_layers(self):
|
||||
host = self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (0, self.GOOD))
|
||||
self.assertEqual(host['devices'][0]['name'], 'Intel(R) UHD Graphics')
|
||||
self.assertIsNone(self.calls[0])
|
||||
self.assertEqual(self.calls[1]['VK_LOADER_LAYERS_DISABLE'], '~implicit~')
|
||||
[w] = self.events('warning')
|
||||
self.assertEqual(w['id'], 'warn.vulkan_layer_crash')
|
||||
self.assertEqual(w['params']['layers'], 'BadOverlay64.json')
|
||||
if os.name == 'nt':
|
||||
self.assertEqual(w['params']['code'], '0xC0000005')
|
||||
|
||||
def test_a_driver_that_crashes_without_the_layers_too_stops_the_install(self):
|
||||
with self.assertRaises(steps.InstallError) as e:
|
||||
self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN))
|
||||
self.assertEqual(e.exception.id, 'check.vulkan_crash')
|
||||
self.assertEqual(len(self.calls), 2)
|
||||
|
||||
def test_a_crash_before_vulkan_is_not_run_again(self):
|
||||
with self.assertRaises(steps.InstallError) as e:
|
||||
self.probe((self.ACCESS_VIOLATION, ''))
|
||||
self.assertEqual(e.exception.id, 'check.host_probe_failed')
|
||||
self.assertEqual(len(self.calls), 1)
|
||||
if os.name == 'nt':
|
||||
self.assertEqual(e.exception.params['code'], '0xC0000005')
|
||||
|
||||
@unittest.skipUnless(os.name == 'nt', 'winerror is set on Windows only')
|
||||
def test_a_probe_blocked_by_smart_app_control_names_the_policy(self):
|
||||
blocked = OSError(None, 'An Application Control policy has blocked this file', None, 4551)
|
||||
with self.assertRaises(steps.InstallError) as e:
|
||||
self.probe(blocked)
|
||||
self.assertEqual(e.exception.id, 'check.host_blocked')
|
||||
self.assertIn('Application Control', e.exception.params['detail'])
|
||||
self.assertTrue(e.exception.params['path'].endswith('hostcheck.exe'))
|
||||
|
||||
def test_another_start_failure_is_reported_not_raised(self):
|
||||
with self.assertRaises(steps.InstallError) as e:
|
||||
self.probe(OSError(2, 'The system cannot find the file specified'))
|
||||
self.assertEqual(e.exception.id, 'check.host_probe_failed')
|
||||
self.assertIn('cannot find', e.exception.params['code'])
|
||||
|
||||
def test_messages_in_every_language(self):
|
||||
for path in sorted((ROOT / 'installer' / 'text').glob('*.json')):
|
||||
text = json.loads(path.read_text(encoding='utf-8'))
|
||||
self.assertIn('{path}', text['check.host_blocked'], path.name)
|
||||
self.assertIn('{detail}', text['check.host_blocked'], path.name)
|
||||
self.assertIn('{code}', text['check.vulkan_crash'], path.name)
|
||||
self.assertIn('{code}', text['warn.vulkan_layer_crash'], path.name)
|
||||
self.assertIn('{layers}', text['warn.vulkan_layer_crash'], path.name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user