Skip to content

make_game, find_hash_lookup, tests/glb: Windows path, joaat encoding, and test device fixes - #5913

Open
HalpDmaGetIommuInterface wants to merge 5 commits into
ItsNotRexed:mainfrom
HalpDmaGetIommuInterface:fix-windows-preflight-and-encoding
Open

HalpDmaGetIommuInterface wants to merge 5 commits into
ItsNotRexed:mainfrom
HalpDmaGetIommuInterface:fix-windows-preflight-and-encoding

Conversation

@HalpDmaGetIommuInterface

Copy link
Copy Markdown
Contributor

Item: Windows tool preflight path parsing, JOAAT latin-1 encoding agreement, and test GLB DOS device fix

Claimed in #5581.

Summary

  • make_game.py: tool_available now uses shlex.split so quoted executable paths containing spaces (e.g. "C:\Program Files\...") do not split into nonexistent paths like C:\Program. Fixes test_make_game_preflight.py on Windows.
  • tools/find_hash_lookup.py: aligned joaat hashing to .encode("latin-1", "replace") matching tools/hashdict.py and RAGE engine convention. Fixes test_joaat_agreement.py on non-ASCII characters.
  • tests/test_glb_inspect.py: renamed test fixture from nul.glb to nul_padded.glb to prevent Windows from treating it as the DOS NUL reserved device (which discards writes). Fixes test_glb_inspect.py on Windows.

Testing

  • python -m compileall -q make_game.py tools/find_hash_lookup.py tests/test_glb_inspect.py (clean)
  • python -I tests/test_make_game_preflight.py (81/81 OK)
  • python -I tests/test_joaat_agreement.py (2/2 OK)
  • python -I tests/test_glb_inspect.py (24/24 OK)
  • python -I tests/test_text_write_line_endings.py (3/3 OK)
  • Environment: Windows 11, Python 3.14 (no GPU or retail game files used)

AI-assisted: yes.

@thiefyzheng thiefyzheng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code read at 1646c4b5 (AI-assisted review, per AGENTS.md).

The find_hash_lookup hunk is correct and identical to #4753 and #4882: encode("latin-1", "replace") is the one-line fix that takes tests/test_joaat_agreement.py from 6 failures to OK at 561b65a832.

Two things before this can merge

  1. It does not apply to current main. git apply at 561b65a832 succeeds on make_game.py and tools/find_hash_lookup.py and fails on tests/test_glb_inspect.py (patch failed: tests/test_glb_inspect.py:300), so this needs a rebase regardless of what the API reports as the base.
  2. It bundles three unrelated items — a tool_available()/shlex change in make_game.py, the joaat encoding fix, and a glb test-device fix. One reviewable item per PR is what makes a fast merge here; split into three and the joaat one lands immediately (or drops in favour of #4753, which carries the regression pin).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants