Implement PE executable version parsing

Using only the standard library (i.e. without pelite).

This commit keeps the pelite dependency and uses it to check that the
new parser gives the same result. The next commit will remove pelite.

I've verified that both parsers give the same result for the following
files that are referenced in the masterlists' version conditions:

Starfield.exe
sfse_1_15_222.dll
SkyrimSE.exe
skse64_loader.exe
skseVR_loader.exe
ENBHelperSE.dll
d3d11.dll
EngineFixes.dll
QuickLootEE.dll
FalloutNV.exe
nvse_1_4.dll
nvse_1_4ng.dll
nvse_1_1.dll
Fallout3.exe
fose_1_7.dll
fose_1_7ng.dll
nvac.dll
Fallout4.exe
f4se_loader.exe
f4sevr_loader.exe
place.dll
obse_1_2_416.dll
TESV.exe
skse_loader.exe

The only referenced files that I couldn't test against were SkyrimVR.exe
and Fallout4VR.exe, because I don't own those games.
This commit is contained in:
Oliver Hamlet
2025-12-03 18:39:27 +00:00
parent 99f03bbade
commit daf229c1e9
3 changed files with 739 additions and 8 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ unsafe_code = "deny"
[workspace.lints.clippy]
pedantic = { level = "deny", priority = -1 }
allow_attributes = "deny"
as_conversions = "forbid"
as_conversions = "deny"
as_underscore = "forbid"
assertions_on_result_states = "deny"
big_endian_bytes = "forbid"