fix for changed compression on nvenc dlls in installer archives

This commit is contained in:
Umgak 2023-06-15 01:17:14 -05:00
parent 699bbf408a
commit b368b4ea09

View File

@ -33,8 +33,8 @@ def parse_args():
parser.add_argument("-T", "--target",
nargs="+",
default=[
"Display.Driver/nvencodeapi64.dl_",
"Display.Driver/nvencodeapi.dl_",
"Display.Driver/nvencodeapi64.dll",
"Display.Driver/nvencodeapi.dll",
],
help="target location(s) in archive")
parser.add_argument("-N", "--target-name",
@ -156,7 +156,8 @@ def make_patch(archive, *,
tmpdir,
arch_tgt,
sevenzip=sevenzip) as tgt:
f = expand(tgt, sevenzip=sevenzip)
with open(tgt, 'rb') as fo:
f = fo.read()
offset = f.find(search)
if offset == -1:
raise PatternNotFoundException("Pattern not found.")