Title profile: a table file that is not beside it is named, and a folder installs #465

Closed
github-bot wants to merge 2 commits from github-bot/gh-465 into main AGit
Owner

@⁠erdemcisse on GitHub · 2026-12-02 14:25 UTC · original
erdemcisse:title-profile-table-files → main · +119 −12 · 4 files · 2 commits · closed without merging

A title profile is a folder, not a file: profile.toml names table files that have to sit beside it, and bcpack is the one that decides whether packed textures are decoded at all. Two things around that were wrong, and both of them show up as "the launcher says it is fine and nothing works".

title-profile status said loaded and stopped at profile.toml. The tables were only ever checked by install, so a profile whose table file was left behind — or was a different file of that name — reported loaded, the launcher lit the options that need a profile, and the run went on to say dstorage: BCPack requests fail: no BCPack table file: … in a log nobody reads. That is the state a player lands in after copying the two files they were given to the wrong folder, or under the wrong name; the last unanswered comment on #426 is this question. status now reads every table the profile names, with the check install already made, and names what is not as it says after loaded:

loaded C:\Users\…\foxhound\profiles\<hash>: bcpack: C:\Users\…\bcpack-tables.dat does not hash as the profile says

The profile still counts as loaded. Its patches and shaders are the reason the options turn on, and a table only decides textures, so nothing is greyed out that used to work; the launcher's profile row now shows the reason after loaded instead of a bare "loaded".

install refused a profile that was already installed. Each table was copied with std::fs::copy, and copying a file onto itself fails on Windows (ERROR_SHARING_VIOLATION, "being used by another process"). The launcher's file dialog opens in the folder it was last used in, so choosing the installed profile.toml again came back as refused … a title profile table was refused: …: The process cannot access the file. A table file already in place is now left alone.

install takes the folder. victory title-profile install <folder> <executable> reads <folder>/profile.toml, which is how the format doc describes a profile (a folder with profile.toml and its tables) and how the game folder and VICTORY_TITLE_PROFILE_DIR are already treated.

The shader tools were prepared as if there were no profile. The launcher stamps the shader preparation so it knows when to translate ahead, and it took the folder by dropping loaded from the status line. A line that now ends in an explanation turns into a path that cannot exist (…\profiles\<hash>: bcpack: … does not hash as the profile says\profile.toml), so with such a profile the tools were prepared without the profile the run was using. The folder is now split off once, in Settings.ProfileFolder, and both the profile row and the stamp take it from there.

Tests, in the crate's own style: a profile whose table is missing, and one whose table is another file of that name, come back as Incomplete with the table named; installing again from the folder it was installed to goes through; a folder stands for the profile file in it. cargo test -p victory-profile passes (19 tests), cargo check -p victory is clean, clippy with -D warnings on both crates is clean, and the launcher compiles.

Status gains one variant (Incomplete); install_file keeps its signature. The format, what a profile is for, and the places it is looked in are unchanged, and docs/title-profile-format.md says the new behaviour in its install paragraph.

**@⁠erdemcisse** on GitHub · 2026-12-02 14:25 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/465) `erdemcisse:title-profile-table-files` → `main` · +119 −12 · 4 files · 2 commits · closed without merging A title profile is a folder, not a file: `profile.toml` names table files that have to sit beside it, and `bcpack` is the one that decides whether packed textures are decoded at all. Two things around that were wrong, and both of them show up as "the launcher says it is fine and nothing works". **`title-profile status` said `loaded` and stopped at `profile.toml`.** The tables were only ever checked by `install`, so a profile whose table file was left behind — or was a different file of that name — reported `loaded`, the launcher lit the options that need a profile, and the run went on to say `dstorage: BCPack requests fail: no BCPack table file: …` in a log nobody reads. That is the state a player lands in after copying the two files they were given to the wrong folder, or under the wrong name; the last unanswered comment on #426 is this question. `status` now reads every table the profile names, with the check `install` already made, and names what is not as it says after `loaded`: loaded C:\Users\…\foxhound\profiles\<hash>: bcpack: C:\Users\…\bcpack-tables.dat does not hash as the profile says The profile still counts as loaded. Its patches and shaders are the reason the options turn on, and a table only decides textures, so nothing is greyed out that used to work; the launcher's profile row now shows the reason after `loaded` instead of a bare "loaded". **`install` refused a profile that was already installed.** Each table was copied with `std::fs::copy`, and copying a file onto itself fails on Windows (`ERROR_SHARING_VIOLATION`, "being used by another process"). The launcher's file dialog opens in the folder it was last used in, so choosing the installed `profile.toml` again came back as `refused … a title profile table was refused: …: The process cannot access the file`. A table file already in place is now left alone. **`install` takes the folder.** `victory title-profile install <folder> <executable>` reads `<folder>/profile.toml`, which is how the format doc describes a profile (a folder with `profile.toml` and its tables) and how the game folder and `VICTORY_TITLE_PROFILE_DIR` are already treated. **The shader tools were prepared as if there were no profile.** The launcher stamps the shader preparation so it knows when to translate ahead, and it took the folder by dropping `loaded ` from the status line. A line that now ends in an explanation turns into a path that cannot exist (`…\profiles\<hash>: bcpack: … does not hash as the profile says\profile.toml`), so with such a profile the tools were prepared without the profile the run was using. The folder is now split off once, in `Settings.ProfileFolder`, and both the profile row and the stamp take it from there. **Tests**, in the crate's own style: a profile whose table is missing, and one whose table is another file of that name, come back as `Incomplete` with the table named; installing again from the folder it was installed to goes through; a folder stands for the profile file in it. `cargo test -p victory-profile` passes (19 tests), `cargo check -p victory` is clean, clippy with `-D warnings` on both crates is clean, and the launcher compiles. `Status` gains one variant (`Incomplete`); `install_file` keeps its signature. The format, what a profile is for, and the places it is looked in are unchanged, and `docs/title-profile-format.md` says the new behaviour in its install paragraph.
`title-profile status` read `profile.toml` and stopped there. The table files a profile names
(`bcpack` today) were checked only by `install`, so a profile whose table was left behind, or was
another file of that name, said `loaded`: the launcher lit the options that need a profile and the
only sign of trouble was the run's own line, "dstorage: BCPack requests fail: ...". `status` now
reads every table the profile names, as `install` already did, and names what is not as it says
after `loaded`. The profile still counts as loaded — its patches and shaders are used, and only what
needs the table is not — so nothing it enables is taken away, and the launcher's row shows the reason.

`install` also copied each table onto itself when the chosen profile was already the installed one,
which fails on Windows (the file is in use), so pointing the dialog at the profile it installed last
time was refused with the file-in-use message. A table already in place is left alone, and the folder
that holds `profile.toml` is taken in place of the file, as the format doc describes a profile.

Three tests: a profile whose table is missing or is another file of that name is said as incomplete
with the table named, a profile installed again from where it was installed goes through, and a
folder stands for the file in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 14:29:57 +00:00
A profile that loads without one of its table files says so on the status line: the
folder after "loaded ", then why ("bcpack: ... does not hash as the profile says").
Two places in the launcher read everything after "loaded " as the folder itself. The
row in the title-profile section now shows the explanation, and the stamp the shader
tools are prepared with turned that explanation into part of a path: with such a
profile the tools were prepared as if no profile were loaded, and translated the
shaders the profile names by role without it.

The line is now split once, in Settings.ProfileFolder, and both places take the folder
from there. The row still says which table file is missing and why.
Author
Owner

@⁠erdemcisse on GitHub · 2026-12-02 15:54 UTC · original

Re-checked on a Windows 11 machine today, at d0f06d8, against upstream main 7dbcdcb (unchanged since the PR opened, so no rebase was needed):

check result
cargo test --locked -p victory-profile 19 passed, 0 failed (the three added tests included)
cargo check --locked -p victory finished, no warnings
cargo clippy --locked -p victory-profile -p victory --all-targets -- -D warnings clean
scripts/build-launcher.ps1 built ...\target\launcher\Foxhound.exe
cargo xtask policy asset policy: 329 files ok

Built with the toolchain the repository pins (1.98.1, msvc; rust-toolchain.toml names the channel, and a machine whose rustup default host is gnu needs RUSTUP_TOOLCHAIN=1.98.1-x86_64-pc-windows-msvc for the windows-* crates to link). The launcher file is built by the csc the script uses (C# 5), which CI does not run.

**@⁠erdemcisse** on GitHub · 2026-12-02 15:54 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/465#issuecomment-7351129542) Re-checked on a Windows 11 machine today, at d0f06d8, against upstream main `7dbcdcb` (unchanged since the PR opened, so no rebase was needed): | check | result | |---|---| | `cargo test --locked -p victory-profile` | 19 passed, 0 failed (the three added tests included) | | `cargo check --locked -p victory` | finished, no warnings | | `cargo clippy --locked -p victory-profile -p victory --all-targets -- -D warnings` | clean | | `scripts/build-launcher.ps1` | `built ...\target\launcher\Foxhound.exe` | | `cargo xtask policy` | `asset policy: 329 files ok` | Built with the toolchain the repository pins (`1.98.1`, msvc; `rust-toolchain.toml` names the channel, and a machine whose rustup default host is gnu needs `RUSTUP_TOOLCHAIN=1.98.1-x86_64-pc-windows-msvc` for the `windows-*` crates to link). The launcher file is built by the csc the script uses (C# 5), which CI does not run.
Author
Owner

@⁠erdemcisse on GitHub · 2026-12-03 15:14 UTC · original

Closing: superseded by 74941fc and a22cdef on main. status now reports missing table files (tables=missing:<name>), and install_file reads each table before writing it, so installing again from the installed folder no longer fails. The only part not carried over is a folder as the CLI argument to install, which the launcher's file dialog never passes. Rebasing would add nothing.

**@⁠erdemcisse** on GitHub · 2026-12-03 15:14 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/465#issuecomment-7382809907) Closing: superseded by 74941fc and a22cdef on main. `status` now reports missing table files (`tables=missing:<name>`), and `install_file` reads each table before writing it, so installing again from the installed folder no longer fails. The only part not carried over is a folder as the CLI argument to `install`, which the launcher's file dialog never passes. Rebasing would add nothing.
github-bot closed this pull request 2026-12-03 15:20:32 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.