From b245b07722e5c6fa7f892ee6fde71944116bc2b7 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 26 Oct 2026 18:18:20 +0300 Subject: [PATCH] Let the installer build from the 1.2.1 or the 1.4.3 update The check identifies the update by hash among layout.SUPPORTED and records it in totk-install.json; an install that records none is 1.2.1. Extraction, lifting, compiling and preparing take the version from there: the patch table and expected hashes per version, build_game.py --version (rt_game_version), make_romfs_patches.py and prepare_shaders.py --version. Step keys of a 1.2.1 install stay as they were, so updating such an install does not extract again. Another update file than the recorded one plans the extraction again (a copy of the same file is recognised by its hash), and an identified version change re-plans every step after the check. The disk space estimate takes the larger RomFS. Catalog strings name both versions and take the version as a parameter. Co-Authored-By: Claude Opus 5.5 --- docs/installer.md | 10 +++++-- installer/cli.py | 2 +- installer/layout.py | 29 ++++++++++++++------ installer/steps.py | 61 ++++++++++++++++++++++++++++------------- installer/text/en.json | 18 ++++++------ installer/text/ru.json | 18 ++++++------ tests/installer_test.py | 2 +- tools/build_game.py | 2 +- 8 files changed, 90 insertions(+), 52 deletions(-) diff --git a/docs/installer.md b/docs/installer.md index 4fb6fb05..b3e9ce2f 100644 --- a/docs/installer.md +++ b/docs/installer.md @@ -9,7 +9,7 @@ holds only the game; the installer and its tools stay outside it. 1. Downloads `TotK-Setup--windows.zip` from GitHub Releases (none is published yet), unpacks it anywhere and starts `TotK-Setup.exe`. 2. Picks: - - the base game (XCI or NSP) and the 1.2.1 update (NSP); + - the base game (XCI or NSP) and the 1.2.1 or 1.4.3 update (NSP); - their `prod.keys`; - the game language and the install folder. 3. Waits for the setup, one time. The window shows each step and its progress. @@ -33,14 +33,18 @@ The player runs a newer installer on the same folder. It reads `totk-install.jso `profile/` and `totk.ini` after checking their hashes, rebuilds `totk.exe` and re-prepares the shaders. A newer release that changes nothing game-derived skips the rebuild. +Given another update file than the recorded one (1.2.1, then 1.4.3), the installer extracts and builds again from it and +keeps `profile/`. Whether 1.2.1 loads the saves 1.4.3 wrote is not checked: back the profile up before switching. + ## Setup steps -1. **Check** before writing anything: the files open with the keys, the update is 1.2.1 (by hash, as +1. **Check** before writing anything: the files open with the keys, the update is 1.2.1 or 1.4.3 (by hash, as `tools/extract.py`), the keys are new enough for the update, enough space is free on the target disk (about 36 GiB at the peak of a first install, 20 GiB after it), the CPU has AVX2 (`-march=x86-64-v3`), a Vulkan 1.3 GPU exists. Each failure is one clear message. 2. **Extract** ExeFS and RomFS into the install folder and verify the hashes. -3. **Lift** the ExeFS to C (`recomp/gen.py`, `recomp/patches-v121.txt`) into a temp folder next to the installer. +3. **Lift** the ExeFS to C (`recomp/gen.py`, `recomp/patches-v121.txt` or `patches-v143.txt`) into a temp folder next + to the installer. 4. **Compile** the generated C, `modules.c` and `romfs.c` (they bake per-install layout and RomFS hashes) and link them with the prebuilt runtime library into `totk.exe` (`build_game.py --runtime-lib`; about 3 min on 24 cores). 5. **Prepare** the RomFS patches and the shaders (`tools/make_romfs_patches.py`, `tools/prepare_shaders.py`, diff --git a/installer/cli.py b/installer/cli.py index 8be9ce34..a754c427 100644 --- a/installer/cli.py +++ b/installer/cli.py @@ -41,7 +41,7 @@ def cancel(signum, frame): def main(argv=None): ap = Parser(prog='python -m installer', description=__doc__.splitlines()[0]) ap.add_argument('--base', type=Path, help='base game, XCI or NSP') - ap.add_argument('--update', type=Path, help='1.2.1 update NSP') + ap.add_argument('--update', type=Path, help='1.2.1 or 1.4.3 update NSP') ap.add_argument('--keys', type=Path, help='prod.keys') ap.add_argument('--lang', help='game language, a Switch language code (en-US, en-GB, ja, de, ru, ...)') ap.add_argument('--dest', type=Path, required=True, help='install folder') diff --git a/installer/layout.py b/installer/layout.py index 80a5877b..206041cc 100644 --- a/installer/layout.py +++ b/installer/layout.py @@ -4,7 +4,8 @@ Release (docs/installer.md "Release layout"), root = the unpacked folder: python/python.exe runs every tool (numpy, lz4, cryptography, compression.zstd); its ._pth puts .., ../tools and ../recomp on sys.path, so `python -m installer` imports from the release folder - recomp/, tools/ the lifter and the scripts; recomp/patches-v121.txt, tools/data/expected-v1.2.1.json + recomp/, tools/ the lifter and the scripts; recomp/patches-.txt, tools/data/expected-v.json for + each supported update (SUPPORTED) llvm/ llvm-mingw (bin/clang.exe) runtime/ libtotkrt.a, the headers, install-side sources (romfs.c) and totk.ico; runtime/deps/ holds include/ + lib/ of Vulkan, SDL3, Opus, libvpx and VMA (build_game.py --deps) @@ -29,6 +30,12 @@ from pathlib import Path EXE = '.exe' if os.name == 'nt' else '' UCRT = Path(r'C:\msys64\ucrt64\bin') SHADER_LIST_REF = 'origin/HEAD:games/totk/assets/shader_list.tsv' # dev: tools/prepare_shaders.py LIST_REF +SUPPORTED = ('1.2.1', '1.4.3') # updates the installer builds; the check identifies the player's by hash + + +def version_tag(version): + """'1.4.3' -> 'v143': the version name of build_game.py, make_romfs_patches.py and the patch tables.""" + return 'v' + version.replace('.', '') @dataclass(frozen=True) @@ -39,8 +46,6 @@ class Layout: python: Path # runs the tools tools: Path recomp: Path - patches: Path # code patch table for recomp/gen.py - expected: Path # expected hashes of the supported update llvm: Path # llvm-mingw tree deps: Path # include/ and lib/ for the link runtime: Path # runtime headers and install-side sources @@ -57,12 +62,20 @@ class Layout: def clang(self): return self.llvm / 'bin' / ('clang' + EXE) + def patches(self, version): + """The code patch table for recomp/gen.py.""" + return self.recomp / f'patches-{version_tag(version)}.txt' + + def expected(self, version): + """The expected hashes of the update.""" + return self.tools / 'data' / f'expected-v{version}.json' + def missing(self): """Paths the steps need that do not exist.""" need = [self.python, self.tools / 'extract.py', self.tools / 'build_game.py', self.tools / 'prepare_shaders.py', - self.tools / 'make_romfs_patches.py', self.recomp / 'gen.py', self.patches, self.expected, self.clang, + self.tools / 'make_romfs_patches.py', self.recomp / 'gen.py', self.clang, self.deps / 'include', self.deps / 'lib', self.runtime, self.runtime_lib, self.ninja, self.hactool, - self.xlate, *self.dlls] + self.xlate, *self.dlls, *(f(v) for v in SUPPORTED for f in (self.patches, self.expected))] if self.shader_list: need.append(self.shader_list) return [str(p) for p in need if not p.exists()] @@ -78,8 +91,7 @@ def release_layout(root): root=root, dev=False, release=version.read_text(encoding='utf-8').strip() if version.is_file() else 'unknown', python=root / 'python' / ('python' + EXE), - tools=root / 'tools', recomp=root / 'recomp', patches=root / 'recomp' / 'patches-v121.txt', - expected=root / 'tools' / 'data' / 'expected-v1.2.1.json', + tools=root / 'tools', recomp=root / 'recomp', llvm=root / 'llvm', deps=root / 'runtime' / 'deps', runtime=root / 'runtime', runtime_lib=root / 'runtime' / 'libtotkrt.a', ninja=root / 'bin' / ('ninja' + EXE), hactool=root / 'bin' / ('hactool' + EXE), @@ -97,8 +109,7 @@ def dev_layout(root): return Layout( root=root, dev=True, release=f'dev-{commit or "unknown"}', python=embed if embed.is_file() else Path(sys.executable), - tools=root / 'tools', recomp=root / 'recomp', patches=root / 'recomp' / 'patches-v121.txt', - expected=root / 'tools' / 'data' / 'expected-v1.2.1.json', + tools=root / 'tools', recomp=root / 'recomp', llvm=trees[-1] if trees else root / 'toolchain' / 'llvm-mingw-missing', deps=deps, runtime=root / 'runtime', runtime_lib=root / 'build' / 'install-rtlib' / 'libtotkrt.a', ninja=UCRT / ('ninja' + EXE), hactool=root / 'toolchain' / 'hactool' / ('hactool' + EXE), diff --git a/installer/steps.py b/installer/steps.py index 6ffedce0..630b9683 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -22,7 +22,7 @@ import time from pathlib import Path from . import ini -from .layout import EXE +from .layout import EXE, SUPPORTED, version_tag from .runner import InstallError, Step sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'tools')) @@ -33,7 +33,6 @@ from extract_exefs import (common_tickets, container_entries, load_keys, nca_ctr GiB = 1 << 30 DEST_EXTRA = 4 * GiB # beside the RomFS: shader and pipeline caches (about 2 GB), exefs, totk.exe, seed files TEMP_NEED = 3 * GiB # generated C (about 0.9 GB) and objects -UPDATE_VERSION = '1.2.1' HOSTCHECK = Path(__file__).resolve().parent / 'hostcheck.c' STAMP = '.install-key' @@ -138,8 +137,14 @@ def raise_if_damaged(error, name, path): raise InstallError('check.input_damaged', input=name, path=str(path), detail=str(error)) from None -def expected_update(): - return extract.load_expected()[UPDATE_VERSION] +def game_version(ctx): + """The update this install is built from: what the check identified, else the recorded one (an install made before + 1.4.3 support records none: 1.2.1).""" + return ctx.state.get('version', SUPPORTED[0]) + + +def expected_update(ctx): + return extract.load_expected()[game_version(ctx)] def shader_list_text(layout): @@ -316,7 +321,8 @@ class Check(Step): def space(self, ctx, ncas): dest_need = temp_need = 0 if ctx.will_run('extract'): - dest_need += expected_update()['romfs']['size'] + ncas + # the update is identified after this estimate: the larger RomFS of the supported ones + dest_need += max(extract.load_expected()[v]['romfs']['size'] for v in SUPPORTED) + ncas romfs = ctx.dest / 'romfs' / 'romfs.bin' if romfs.is_file(): # a resumed extraction replaces it dest_need -= romfs.stat().st_size @@ -361,8 +367,14 @@ class Check(Step): found = extract.identify_update(work / 'update' / 'exefs', versions)['display_version'] except ValueError: found = 'unknown' - if found != UPDATE_VERSION: - raise InstallError('check.update_wrong_version', found=found, wanted=UPDATE_VERSION) + if found not in SUPPORTED: + raise InstallError('check.update_wrong_version', found=found, wanted=' / '.join(SUPPORTED)) + if found != game_version(ctx): # another update than the recorded one: every step builds again from it + ctx.reporter.log(f'check: update {found} (recorded {game_version(ctx)})') + ctx.state['version'] = found + ctx.keys = {} + ctx.plan(ctx.forced | {'extract', 'lift', 'compile', 'prepare'}) + ctx.state['version'] = found # ---- 2. extract @@ -372,10 +384,17 @@ class Extract(Step): def key(self, ctx): # The output is whatever matches the expected hashes, whichever files and tools produced it. - return fingerprint('extract-1', ctx.layout.expected) + return fingerprint('extract-1', ctx.layout.expected(game_version(ctx))) def current(self, ctx, record): - expected = expected_update() + # Another update file than the recorded one (1.2.1 -> 1.4.3) extracts again; the check then identifies it. + update, known = getattr(ctx.options, 'update', None), ctx.state['inputs'].get('update') + if update and known and Path(update).is_file(): + st = Path(update).stat() + if (st.st_size, st.st_mtime_ns) != (known.get('size'), known.get('mtime_ns')) \ + and file_sha256(Path(update)) != known.get('sha256'): + return False + expected = expected_update(ctx) romfs = ctx.dest / 'romfs' if extract.exefs_problems(ctx.dest / 'exefs', expected) or not extract.romfs_verified(romfs, expected): return False @@ -386,11 +405,11 @@ class Extract(Step): image = ctx.dest / 'romfs' / 'romfs.bin' rep = ctx.reporter digest = file_sha256(image, lambda d, t: rep.progress('check', 'verify_romfs', d, t, 'bytes')) - return digest == expected_update()['romfs']['sha256'] + return digest == expected_update(ctx)['romfs']['sha256'] def run(self, ctx): o, dest, rep = ctx.options, ctx.dest, ctx.reporter - expected = expected_update() + expected = expected_update(ctx) base, update, keys = Path(o.base), Path(o.update), Path(o.keys) inputs = {} for name, path in (('base', base), ('update', update)): @@ -422,9 +441,9 @@ class Extract(Step): shutil.move(staged, dest / 'exefs') problems = extract.exefs_problems(dest / 'exefs', expected) if problems: - raise InstallError('extract.exefs_mismatch', modules=', '.join(problems)) + raise InstallError('extract.exefs_mismatch', version=game_version(ctx), modules=', '.join(problems)) if extract.sha256(dest / 'exefs' / 'main.npdm') != expected['exefs_sha256']['main.npdm']: - rep.warning('warn.npdm_differs') + rep.warning('warn.npdm_differs', version=game_version(ctx)) romfs = dest / 'romfs' if self.id in ctx.forced: @@ -433,7 +452,8 @@ class Extract(Step): self.merge(ctx, base, update, keys, romfs, expected) report = json.loads((romfs / 'index.json').read_text()) if report['romfs_size'] != expected['romfs']['size'] or report['romfs_sha256'] != expected['romfs']['sha256']: - raise InstallError('extract.romfs_mismatch', size=report['romfs_size'], sha256=report['romfs_sha256'][:16]) + raise InstallError('extract.romfs_mismatch', version=game_version(ctx), size=report['romfs_size'], + sha256=report['romfs_sha256'][:16]) (dest / 'profile').mkdir(exist_ok=True) st = (romfs / 'romfs.bin').stat() return {'romfs_size': st.st_size, 'romfs_mtime_ns': st.st_mtime_ns} @@ -476,7 +496,7 @@ class Lift(Step): transient = True def key(self, ctx): - return fingerprint('lift-1', ctx.keys['extract'], ctx.layout.recomp, ctx.layout.patches) + return fingerprint('lift-1', ctx.keys['extract'], ctx.layout.recomp, ctx.layout.patches(game_version(ctx))) def current(self, ctx, record): gen = ctx.temp / 'gen' @@ -494,7 +514,7 @@ class Lift(Step): rep.progress('lift', 'emit', int(m.group(1)), int(m.group(2)), 'chunks') code, log = run_tool(ctx, 'lift', layout.recomp / 'gen.py', - ['--exefs', ctx.dest / 'exefs', '--out', gen, '--patches', layout.patches], parse) + ['--exefs', ctx.dest / 'exefs', '--out', gen, '--patches', layout.patches(game_version(ctx))], parse) if code: raise InstallError('lift.failed', code=code, log=str(log)) (gen / STAMP).write_text(ctx.keys['lift'] + '\n') @@ -541,7 +561,8 @@ class Compile(Step): code, log = run_tool(ctx, 'compile', layout.tools / 'build_game.py', [ '--gen', ctx.temp / 'gen', '--out', build, '--toolchain', layout.llvm, '--deps', layout.deps, '--runtime', layout.runtime, '--runtime-lib', layout.runtime_lib, '--ninja', layout.ninja, - '--expected', layout.expected, '--exefs', dest / 'exefs', '--romfs', dest / 'romfs', + '--version', version_tag(game_version(ctx)), '--expected', layout.expected(game_version(ctx)), + '--exefs', dest / 'exefs', '--romfs', dest / 'romfs', '--profile', dest / 'profile'], parse) exe = build / ('totk' + EXE) if code or not exe.is_file(): @@ -593,7 +614,8 @@ class Prepare(Step): rep.progress('prepare', 'romfs_patches', force=True) remove(dest / 'romfs-patches') code, log = run_tool(ctx, 'prepare', layout.tools / 'make_romfs_patches.py', - ['--romfs', dest / 'romfs', '--out', dest / 'romfs-patches']) + ['--version', version_tag(game_version(ctx)), '--romfs', dest / 'romfs', '--out', + dest / 'romfs-patches']) if code: raise InstallError('prepare.romfs_patches_failed', code=code, log=str(log)) @@ -613,7 +635,8 @@ class Prepare(Step): rep.progress('prepare', 'seed', force=True) code, log = run_tool(ctx, 'prepare', layout.tools / 'prepare_shaders.py', - [dest, '--romfs', dest / 'romfs', '--exefs', dest / 'exefs', '--list', shader_list], parse) + [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(): raise InstallError('prepare.shaders_failed', code=code, log=str(log)) return {'xlate_sha256': file_sha256(xlate)} diff --git a/installer/text/en.json b/installer/text/en.json index 7b9abf49..d4a16971 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -46,7 +46,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.inputs_needed": "The game files are needed: choose the base game, the 1.2.1 update and prod.keys.", + "check.inputs_needed": "The game files are needed: choose the base game, the 1.2.1 or 1.4.3 update and prod.keys.", "check.input_missing": "File not found ({input}): {path}", "check.keys_unreadable": "The keys file cannot be read. Choose a prod.keys file.", "check.keys_no_header_key": "The keys file has no header_key. Dump prod.keys from your console again.", @@ -58,17 +58,17 @@ "check.ticket_missing": "The {input} file lacks the ticket its content needs.", "check.base_not_totk": "The base game file is not The Legend of Zelda: Tears of the Kingdom ({detail}).", "check.update_not_nsp": "The update must be an NSP file.", - "check.update_is_base": "The update file holds a base game. Choose the 1.2.1 update NSP.", + "check.update_is_base": "The update file holds a base game. Choose the 1.2.1 or 1.4.3 update NSP.", "check.update_not_totk": "The update file is not a Tears of the Kingdom update ({detail}).", "check.exefs_failed": "The game code of the {input} file failed its checks; see {log}.", "check.input_damaged": "The {input} file is damaged or incomplete: {path} ({detail}). Copy that file again from its source, or dump it again, then run the setup again.", "check.base_wrong_version": "The base game is not version 1.0.0 ({modules} differ).", - "check.update_wrong_version": "The update is version {found}; this release needs {wanted}.", + "check.update_wrong_version": "The update is version {found}; this release takes {wanted}.", "check.disk_space": "Not enough free space for {path}: {need_gb} GB needed, {free_gb} GB free.", - "extract.exefs_mismatch": "The extracted game code does not match version 1.2.1 ({modules}).", + "extract.exefs_mismatch": "The extracted game code does not match version {version} ({modules}).", "extract.romfs_merge_failed": "Applying the update to the game data failed: {detail}. Details: {log}", - "extract.romfs_mismatch": "The extracted game data does not match version 1.2.1 (size {size}, checksum {sha256}...).", + "extract.romfs_mismatch": "The extracted game data does not match version {version} (size {size}, checksum {sha256}...).", "lift.failed": "Translating the game code failed (exit code {code}). Details: {log}", "compile.failed": "Compiling totk.exe failed (exit code {code}). Details: {log}", "compile.exe_in_use": "{path} is in use. Close the game and run the installer again.", @@ -78,20 +78,20 @@ "cleanup.ini_failed": "totk.ini cannot be written: {detail}", "warn.lang_needs_fonts": "Text in {lang} needs the Switch system fonts, which the installer does not extract; some text may not show.", - "warn.npdm_differs": "main.npdm differs from the reference 1.2.1 dump; only the code modules are used.", + "warn.npdm_differs": "main.npdm differs from the reference {version} dump; only the code modules are used.", "ui.title": "TotK Setup", "ui.intro": "Builds a playable Tears of the Kingdom folder from your own game files. This takes a while and runs once.", "ui.notice": "The folder this setup builds contains the game. It is for your own use only; do not share or upload it.", "ui.keys_private": "The keys file is read in place. Its contents are never shown, copied or stored.", "ui.base": "Base game (NSP or XCI)", - "ui.update": "Update 1.2.1 (NSP)", + "ui.update": "Update 1.2.1 or 1.4.3 (NSP)", "ui.keys": "prod.keys", "ui.game_language": "Game language", "ui.dest": "Install folder", "ui.browse": "Browse...", "ui.pick_game": "Choose the base game file", - "ui.pick_update": "Choose the 1.2.1 update file", + "ui.pick_update": "Choose the 1.2.1 or 1.4.3 update file", "ui.pick_keys": "Choose prod.keys", "ui.pick_dest": "Choose the install folder", "ui.type_game": "Game files (NSP, XCI)", @@ -109,7 +109,7 @@ "ui.update_mode": "This folder holds an earlier installation. The setup continues or updates it; the game files are asked for only if they are needed again.", "ui.need_dest": "Choose the install folder.", "ui.need_base": "Choose the base game file.", - "ui.need_update": "Choose the 1.2.1 update file.", + "ui.need_update": "Choose the 1.2.1 or 1.4.3 update file.", "ui.need_keys": "Choose the prod.keys file.", "ui.need_lang": "Choose the game language.", "ui.missing_base": "The base game file does not exist.", diff --git a/installer/text/ru.json b/installer/text/ru.json index d3c3afb6..a1c5dee2 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -46,7 +46,7 @@ "check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.", "check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.", "check.vulkan_too_old": "Игре нужна видеокарта с Vulkan 1.3; найдено: {devices}. Обновите драйвер видеокарты.", - "check.inputs_needed": "Нужны игровые файлы: выберите базовую игру, обновление 1.2.1 и prod.keys.", + "check.inputs_needed": "Нужны игровые файлы: выберите базовую игру, обновление 1.2.1 или 1.4.3 и prod.keys.", "check.input_missing": "Файл не найден ({input}): {path}", "check.keys_unreadable": "Не удаётся прочитать файл ключей. Выберите файл prod.keys.", "check.keys_no_header_key": "В файле ключей нет header_key. Снова получите prod.keys со своей консоли.", @@ -58,17 +58,17 @@ "check.ticket_missing": "В файле «{input}» нет тикета, который нужен его содержимому.", "check.base_not_totk": "Файл базовой игры — не The Legend of Zelda: Tears of the Kingdom ({detail}).", "check.update_not_nsp": "Обновление должно быть файлом NSP.", - "check.update_is_base": "Файл обновления содержит базовую игру. Выберите NSP с обновлением 1.2.1.", + "check.update_is_base": "Файл обновления содержит базовую игру. Выберите NSP с обновлением 1.2.1 или 1.4.3.", "check.update_not_totk": "Файл обновления — не обновление Tears of the Kingdom ({detail}).", "check.exefs_failed": "Код игры из файла «{input}» не прошёл проверку; подробности в {log}.", "check.input_damaged": "Файл «{input}» повреждён или скопирован не полностью: {path} ({detail}). Скопируйте этот файл заново из источника или сделайте дамп ещё раз, затем снова запустите установку.", "check.base_wrong_version": "Базовая игра не версии 1.0.0 (отличаются модули: {modules}).", - "check.update_wrong_version": "Версия обновления {found}; этому выпуску нужна {wanted}.", + "check.update_wrong_version": "Версия обновления {found}; этот выпуск принимает {wanted}.", "check.disk_space": "Не хватает свободного места для {path}: нужно {need_gb} ГБ, свободно {free_gb} ГБ.", - "extract.exefs_mismatch": "Распакованный код игры не соответствует версии 1.2.1 ({modules}).", + "extract.exefs_mismatch": "Распакованный код игры не соответствует версии {version} ({modules}).", "extract.romfs_merge_failed": "Не удалось применить обновление к данным игры: {detail}. Подробности: {log}", - "extract.romfs_mismatch": "Распакованные данные игры не соответствуют версии 1.2.1 (размер {size}, контрольная сумма {sha256}...).", + "extract.romfs_mismatch": "Распакованные данные игры не соответствуют версии {version} (размер {size}, контрольная сумма {sha256}...).", "lift.failed": "Не удалось перевести код игры (код выхода {code}). Подробности: {log}", "compile.failed": "Не удалось собрать totk.exe (код выхода {code}). Подробности: {log}", "compile.exe_in_use": "Файл {path} занят. Закройте игру и запустите установку снова.", @@ -78,20 +78,20 @@ "cleanup.ini_failed": "Не удаётся записать totk.ini: {detail}", "warn.lang_needs_fonts": "Для языка «{lang}» нужны системные шрифты Switch, которые установка не извлекает; часть текста может не отображаться.", - "warn.npdm_differs": "main.npdm отличается от эталонного дампа 1.2.1; используются только модули с кодом.", + "warn.npdm_differs": "main.npdm отличается от эталонного дампа {version}; используются только модули с кодом.", "ui.title": "Установка TotK", "ui.intro": "Собирает готовую к запуску папку с Tears of the Kingdom из ваших игровых файлов. Занимает много времени и выполняется один раз.", "ui.notice": "Папка, которую создаёт установка, содержит игру. Она предназначена только для личного использования: не передавайте и не выкладывайте её.", "ui.keys_private": "Файл ключей читается на месте. Его содержимое не показывается, не копируется и не сохраняется.", "ui.base": "Базовая игра (NSP или XCI)", - "ui.update": "Обновление 1.2.1 (NSP)", + "ui.update": "Обновление 1.2.1 или 1.4.3 (NSP)", "ui.keys": "prod.keys", "ui.game_language": "Язык игры", "ui.dest": "Папка установки", "ui.browse": "Обзор...", "ui.pick_game": "Выберите файл базовой игры", - "ui.pick_update": "Выберите файл обновления 1.2.1", + "ui.pick_update": "Выберите файл обновления 1.2.1 или 1.4.3", "ui.pick_keys": "Выберите prod.keys", "ui.pick_dest": "Выберите папку установки", "ui.type_game": "Файлы игры (NSP, XCI)", @@ -109,7 +109,7 @@ "ui.update_mode": "В этой папке уже есть установка. Программа продолжит или обновит её; файлы игры понадобятся, только если их снова придётся читать.", "ui.need_dest": "Выберите папку установки.", "ui.need_base": "Выберите файл базовой игры.", - "ui.need_update": "Выберите файл обновления 1.2.1.", + "ui.need_update": "Выберите файл обновления 1.2.1 или 1.4.3.", "ui.need_keys": "Выберите файл prod.keys.", "ui.need_lang": "Выберите язык игры.", "ui.missing_base": "Файл базовой игры не найден.", diff --git a/tests/installer_test.py b/tests/installer_test.py index 5750faa9..d9d325e4 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -76,7 +76,7 @@ class Bed: def run(self, release='1.0', inputs=None, fail=None, verify_ok=None, verify=False): layout = Layout(root=Path('.'), dev=True, release=release, python=Path('python'), tools=Path('tools'), - recomp=Path('recomp'), patches=Path('p'), expected=Path('e'), llvm=Path('llvm'), + recomp=Path('recomp'), llvm=Path('llvm'), deps=Path('deps'), runtime=Path('rt'), runtime_lib=Path('lib'), ninja=Path('ninja'), hactool=Path('hactool'), xlate=Path('xlate')) options = SimpleNamespace(inputs=inputs or {}, fail=dict(fail or {}), verify_ok=verify_ok or {}, ran=[], diff --git a/tools/build_game.py b/tools/build_game.py index 3c0fbbc9..6c2af38c 100644 --- a/tools/build_game.py +++ b/tools/build_game.py @@ -587,7 +587,7 @@ def main(): '(default build/extracted//romfs)') ap.add_argument('--profile', type=Path, help="totk.exe's default profile directory (default build/profile for v121, " "build/profile- otherwise: a newer game version rewrites the " - "saves it loads, and an older one cannot read them back)") + "saves it loads, and whether an older one reads them is not checked)") ap.add_argument('--toolchain', type=Path, help='llvm-mingw directory (with bin/clang.exe) to build with instead of ' 'MSYS2 UCRT64 clang') ap.add_argument('--ninja', type=Path, help='ninja.exe to build with (default: MSYS2 UCRT64, else bin/ninja.exe of the '