feat(patcher): add executable patching and local archive support
Keep patch definitions and dependencies separate from the patch engine. Resolve all patches before writing, verify expected bytes, and refuse to overwrite the input executable. Include a read-only check command for comparing definitions with their assembly source. Allow locally rebuilt script archives to load in the offline client. Verify the patch against the 2.61.0.37 executable and confirm that the patched copy remains readable as PE.
This commit is contained in:
1 parent
8d26ad0fbd
commit
f014f327e5
12 files changed
+701
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Locate and apply the declared changes to aces.exe.
|
||||
|
||||
The patches themselves live as data under exe-patches/; this package is only the engine.
|
||||
Order of work, and the reason for it: find every site and verify every original byte first
|
||||
(plan), then write (apply). A site that is missing or ambiguous is reported, never guessed,
|
||||
so a game update produces a list of unavailable patches and the features they cover rather
|
||||
than a broken executable.
|
||||
|
||||
`authoring` and `assemble` are development-side only: they need a disassembler and an
|
||||
assembler, and are imported explicitly rather than from here.
|
||||
"""
|
||||
from .apply import apply_writes, changed_ranges
|
||||
from .definition import PatchDefinition, PatchEdit, load_patches
|
||||
from .errors import DefinitionError, LocateError, PatchError, VerifyError
|
||||
from .plan import PatchFailure, PatchPlan, PlannedWrite, plan_patches
|
||||
|
||||
__all__ = [
|
||||
"DefinitionError",
|
||||
"LocateError",
|
||||
"PatchDefinition",
|
||||
"PatchEdit",
|
||||
"PatchError",
|
||||
"PatchFailure",
|
||||
"PatchPlan",
|
||||
"PlannedWrite",
|
||||
"VerifyError",
|
||||
"apply_writes",
|
||||
"changed_ranges",
|
||||
"load_patches",
|
||||
"plan_patches",
|
||||
]
|
||||
Reference in new issue
Block a user