mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-20 12:45:57 +00:00
Document the UTF-8 manifests of hactool and totk.exe and the damaged file message
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1820a83f30
commit
a4bb2d5355
3 files changed
+17
-1
No files matched your search
@@ -104,6 +104,13 @@ totk.ini.example, VERSION the default ini; the release string (git describe of
|
||||
- The keys file path is passed to the tools; key values never appear in the UI, logs or files.
|
||||
- The window is a front end over the CLI (`python -m installer --base ... --update ... --keys ... --lang ... --dest
|
||||
...`), which prints one JSON progress event per line. Tests and CI use the CLI.
|
||||
- Paths may hold any Unicode characters (a Cyrillic user name puts the temp and install folders under it). Every exe
|
||||
the setup runs or builds reads its arguments and paths as UTF-8 through an `activeCodePage` manifest: hactool
|
||||
(`toolchain/hactool/unicode-patches.diff`), totk.exe (`runtime/totk.rc`), ninja (upstream). The Python steps write
|
||||
their files and logs as UTF-8.
|
||||
- A game file whose data fails its hash checks or ends early stops the setup with `check.input_damaged`, which names
|
||||
the file and asks to copy it again (`extract.DamagedFile`). A failed merge checks the base Program NCA alone to tell
|
||||
which file is damaged.
|
||||
- Unsigned exe: SmartScreen warns on first start.
|
||||
|
||||
## Later
|
||||
|
||||
@@ -95,6 +95,15 @@ Applied the portable part of MacNativeGames `build_app.py:build_hactool()` (diff
|
||||
2. BKTR: allow 0x200-aligned padding after the subsection table (`nca.c`).
|
||||
3. BKTR: accept the subsection total-size layout of newer cumulative updates (`nca.c`).
|
||||
|
||||
Ours (`toolchain\hactool\unicode-patches.diff`): `hactool.manifest` with `<activeCodePage>UTF-8</activeCodePage>`,
|
||||
embedded through `hactool.rc` (Makefile rule `hactool.res.o`, `windres`). hactool converts argv, `HOME` and
|
||||
`USERPROFILE` from UTF-8 to UTF-16 (`filepath.c`); without the manifest they arrive in the ANSI code page, and a
|
||||
non-ASCII user profile or path stops it with `Failed to convert ... to UTF-16!`. Needs Windows 10 1903 or later.
|
||||
|
||||
Rebuild: in an MSYS2 UCRT64 shell (`MSYSTEM=UCRT64 C:\msys64\usr\bin\bash.exe -lc ...`) in `toolchain\src\hactool`,
|
||||
`make clean && make -j8`, then copy `hactool.exe` to `toolchain\hactool\`. gcc writes temporary files to `TMP`; where
|
||||
it cannot (sandboxed shells), point `TMP` and `TEMP` at a writable folder.
|
||||
|
||||
Not applied: the `MNG_BASE_RANGE_OFFSET/SIZE` base-file hook. It uses `funopen` (BSD/macOS only); on Windows the
|
||||
base NCA must be extracted to a file first.
|
||||
|
||||
|
||||
Reference in new issue
Block a user