pe_shader_containers: parse and validate multi-image container layouts (OLD-9775) #694

Open
github-bot wants to merge 2 commits from github-bot/gh-694 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 12:16 UTC · original
abnalstlll-byte:feat/pe-shader-containers-multi-image → main · +86 −9 · 2 files · 2 commits · open

Related issues: #14, #17, #18 (restoring old upstream PR 9775, author restoration for draft PR #53).

What and why

Restores original pull request OLD-9775 authored by @⁠abnalstlll-byte:

  • Extends \ ools/pe_shader_containers.py\ to support multi-image container layout parsing and sequential stem numbering across multi-image extract passes.
  • Fixes stem collision when multiple shader container images are extracted into the same target directory.
  • Fully compatible with \ ools/pe_inspect.py\ and \make_game.py\ extraction pipelines.
  • Comprehensive unit test coverage in \ ests/test_pe_shader_containers.py\ (21/21 PASS).

Tested

  • Windows 11 x64, Python 3.14 / 3.12:
    • \python -I tests/test_pe_shader_containers.py: 21/21 PASS.
    • \python -I scripts/check_no_game_data.py\ on changed files: PASS.
  • Clean merge against \ubi/main\ (0 conflicts).

Checklist

  • No proprietary payloads, game-derived files, keys, or protection workarounds.
  • Standard library only (\python -I).
  • Preserves author attribution and original PR commit provenance.
**@⁠abnalstlll-byte** on GitHub · 2026-11-24 12:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/694) `abnalstlll-byte:feat/pe-shader-containers-multi-image` → `main` · +86 −9 · 2 files · 2 commits · open Related issues: #14, #17, #18 (restoring old upstream PR 9775, author restoration for draft PR #53). ### What and why Restores original pull request **OLD-9775** authored by @⁠abnalstlll-byte: - Extends \ ools/pe_shader_containers.py\ to support multi-image container layout parsing and sequential stem numbering across multi-image extract passes. - Fixes stem collision when multiple shader container images are extracted into the same target directory. - Fully compatible with \ ools/pe_inspect.py\ and \make_game.py\ extraction pipelines. - Comprehensive unit test coverage in \ ests/test_pe_shader_containers.py\ (21/21 PASS). ### Tested - Windows 11 x64, Python 3.14 / 3.12: - \python -I tests/test_pe_shader_containers.py\: 21/21 PASS. - \python -I scripts/check_no_game_data.py\ on changed files: PASS. - Clean merge against \ubi/main\ (0 conflicts). ### Checklist - [x] No proprietary payloads, game-derived files, keys, or protection workarounds. - [x] Standard library only (\python -I\). - [x] Preserves author attribution and original PR commit provenance.
Publish through a temp file + replace so a mid-write OSError leaves any prior complete JSON intact.

Co-authored-by: Cursor <[email protected]>
When multiple PE images are passed with --extract, each image previously
invoked extract() starting from index 0. Unnamed containers (
ame=None)
in subsequent images collided on container_00, resulting in duplicate

ame keys in the output index.json.

Thread start_index=len(index) through multi-image extraction so stems
and index entries remain unique, and use strerror on write failures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:16:48 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/694/head:github-bot/gh-694'
git switch 'github-bot/gh-694'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-694'
git switch 'github-bot/gh-694'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-694'
git switch 'github-bot/gh-694'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-694'
git switch 'main'
git merge --squash 'github-bot/gh-694'
git switch 'main'
git merge --ff-only 'github-bot/gh-694'
git switch 'main'
git merge 'github-bot/gh-694'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.