fix(builder): Linux keeps NVIDIA's DLSS SDK in its cache folder, and the license accepted in its settings #2485

Merged
LNDF merged 1 commit from linux-ngx-sdk-cache into main 2026-11-11 21:28:03 +00:00
LNDF commented 2026-11-11 20:45:28 +00:00 (Migrated from github.com)

On Linux, an update can silently drop DLSS: the builder uses the DLSS SDK's LICENSE.txt as its record that you accepted NVIDIA's license, so when that downloaded file is gone, the next update builds without DLSS and deletes the game's runtime. The SDK (58 MB) also sits in the game's data folder rather than the builder's own.

Split out of #2317 at review.

What changed

  • The SDK goes to the builder's cache folder, ~/.cache/hookshot-builder/ngx-sdk, beside make_game.py's build files. Windows already keeps it in %LOCALAPPDATA%\HookshotBuilder.
  • License acceptance is recorded in ~/.config/hookshot/builder.ini (nvidia_license=1) when you tick DLSS. folder_has_dlss() reads that instead of the SDK's LICENSE.txt, so an emptied cache means the SDK is downloaded again, and DLSS is kept.
  • An SDK in the old place (~/.local/share/hookshot/builder/ngx-sdk) is moved once when the builder starts, and its license is recorded.
  • readme: the Linux DLSS paragraph names the new place.

Testing

  • tests/test_make_game_ngx.py: the new folder, the settings record, an emptied cache keeping DLSS, the one-time move, including an SDK in both places.
  • python -I -B tests/run_all.py on Linux: nothing new fails (the three failures there also fail on main).
  • Not run in the AppImage builder yet.

🤖 Generated with Claude Code

On Linux, an update can silently drop DLSS: the builder uses the DLSS SDK's `LICENSE.txt` as its record that you accepted NVIDIA's license, so when that downloaded file is gone, the next update builds without DLSS and deletes the game's runtime. The SDK (58 MB) also sits in the game's data folder rather than the builder's own. Split out of #2317 at review. ## What changed - The SDK goes to the builder's cache folder, `~/.cache/hookshot-builder/ngx-sdk`, beside `make_game.py`'s build files. Windows already keeps it in `%LOCALAPPDATA%\HookshotBuilder`. - License acceptance is recorded in `~/.config/hookshot/builder.ini` (`nvidia_license=1`) when you tick DLSS. `folder_has_dlss()` reads that instead of the SDK's `LICENSE.txt`, so an emptied cache means the SDK is downloaded again, and DLSS is kept. - An SDK in the old place (`~/.local/share/hookshot/builder/ngx-sdk`) is moved once when the builder starts, and its license is recorded. - readme: the Linux DLSS paragraph names the new place. ## Testing - `tests/test_make_game_ngx.py`: the new folder, the settings record, an emptied cache keeping DLSS, the one-time move, including an SDK in both places. - `python -I -B tests/run_all.py` on Linux: nothing new fails (the three failures there also fail on `main`). - Not run in the AppImage builder yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Joey-Magnus (Migrated from github.com) approved these changes 2026-11-11 21:22:50 +00:00
Joey-Magnus (Migrated from github.com) left a comment

folder_has_dlss checks nvidia_license=1 in builder.ini, and builds still pass --fetch-ngx-sdk --accept-nvidia-license, so an emptied cache re-downloads the SDK and DLSS stays on. The move from the old folder is tested, including the empty-cache case. The full suite passed locally merged into main (395 passed, 0 failed); CI hasn't run here yet.

The Windows builder has the same bug: it still uses LICENSE.txt as the licence record (builder/py/hookshot_builder/window.py:1756). That could be a follow-up.

`folder_has_dlss` checks `nvidia_license=1` in builder.ini, and builds still pass `--fetch-ngx-sdk --accept-nvidia-license`, so an emptied cache re-downloads the SDK and DLSS stays on. The move from the old folder is tested, including the empty-cache case. The full suite passed locally merged into main (395 passed, 0 failed); CI hasn't run here yet. The Windows builder has the same bug: it still uses `LICENSE.txt` as the licence record (`builder/py/hookshot_builder/window.py:1756`). That could be a follow-up.
Commenting is not possible because the repository is archived.
No description provided.