Skip to content

versiondiff ​

Tool tools/triage/versiondiff.py (program, Triage). Compare two editions of a game, folder against folder or disc image against disc image, and write the data delta for docs/versions.md: files added, removed and changed, by folder, with the executables' link dates and the languages each edition has.

Run it with ./gameframe run versiondiff ARGS or python3 tools/triage/versiondiff.py. Source on GitHub.

Its own help ​

This is the help text in the tool itself, as ./gameframe tool versiondiff prints it.

text
Compare two editions of a game, folder against folder or disc image against disc image, and
write the data delta for docs/versions.md: files added, removed and changed, by folder, with
the executables' link dates and the languages each edition has.

Usage: versiondiff.py OLD NEW [--depth N] [--list N] [--json]

  OLD, NEW   a folder (an install, an extracted disc) or a disc image (.cue, .bin, .iso),
             read in place with tools/disc: nothing is extracted
  --depth N  group the table by the first N folders of each path (default 2)
  --list N   list at most N files of each kind (added, removed, changed) (default 40)
  --json     everything as JSON

It prints Markdown, ready to paste into the project's docs/versions.md:

- a summary: files and bytes in each edition, and how many were added, removed, changed and
  kept;
- a table by folder: added, removed, changed and the same;
- the executables and DLLs of each edition with their PE link dates (the date the linker
  wrote, which dates a build better than file dates), and which changed;
- the languages each edition has, found from folder and file names (ENGLISH, FRANCAIS, DE, ...);
- the files added, removed and changed, with their sizes.

Files are matched by path, ignoring case, and compared by MD5 (shown in the JSON). A file
moved to another folder shows as removed and added: tools/triage/compare_trees.py --similar
pairs renamed files. Code changes need the Ghidra exports of both: match their functions
with tools/triage/match_functions.py (docs/working/versions.md).

It reads the editions only, and prints no file content: the table is safe to commit. Standard
library only.

Named by ​

Skills: re-inventory.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.