nvidia-patch/win/tools/autopatch/README.md

53 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2019-02-11 20:51:25 +00:00
autopatch
=========
This tool is intended for internal usage.
2019-10-24 10:07:13 +00:00
This script accepts path to Nvidia Drivers installer file(s), makes .1337 patch and saves it in appropriate location in your working copy of this repo. All you have to do then is to test patch, stage it for commit and push it. Optionally you can just save patch to stdout.
If you have already extracted binary files, you can supply them directly to autopatch running in direct mode `-D` option. In this case number of input files must match count of replacement patterns.
Note: when command line options with multiple possible arguments supplied (like patterns or targets), you must separate them from positional arguments (input files) with a double dash (`--`). Example: `./autopatch.py -P nvcuvid32.1337 nvcuvid64.1337 -T nvcuvid32.dll nvcuvid64.dll -- setup1.exe setup2.exe`.
2019-02-11 20:51:25 +00:00
## Requirements
* Python 3.2+
* 7zip CLI utility
* 7z.exe and 7z.dll are required, next to autopatch.py or set path with parameter
## Examples
```
python.exe autopatch.py temp/512.95-desktop-win10-win11-64bit-international-dch-whql.exe
python.exe autopatch.py https://international.download.nvidia.com/Windows/512.95/512.95-desktop-win10-win11-64bit-international-dch-whql.exe
python.exe autopatch.py 512.95
```
2019-02-11 20:51:25 +00:00
## Synopsys
```
2020-07-03 19:49:10 +00:00
usage: autopatch.py [-h] [-7 SEVENZIP] [-T TARGET [TARGET ...]] [-N TARGET_NAME [TARGET_NAME ...]] [-P PATCH_NAME [PATCH_NAME ...]] [-S SEARCH [SEARCH ...]] [-R REPLACEMENT [REPLACEMENT ...]] [-o] [-D]
2019-09-04 15:31:30 +00:00
installer_file [installer_file ...]
2019-02-11 20:51:25 +00:00
Generates .1337 patch for Nvidia drivers for Windows
positional arguments:
2019-09-04 15:31:30 +00:00
installer_file location of installer executable(s)
2019-02-11 20:51:25 +00:00
optional arguments:
-h, --help show this help message and exit
-7 SEVENZIP, --7zip SEVENZIP
location of 7-zip `7z` executable (default: 7z)
2019-10-24 10:07:13 +00:00
-T TARGET [TARGET ...], --target TARGET [TARGET ...]
2020-07-03 19:49:10 +00:00
target location(s) in archive (default: ['Display.Driver/nvencodeapi64.dl_', 'Display.Driver/nvencodeapi.dl_'])
2019-10-24 10:07:13 +00:00
-N TARGET_NAME [TARGET_NAME ...], --target-name TARGET_NAME [TARGET_NAME ...]
2020-07-03 19:49:10 +00:00
name(s) of installed target file. Used for patch header (default: ['nvencodeapi64.dll', 'nvencodeapi.dll'])
2019-10-24 10:07:13 +00:00
-P PATCH_NAME [PATCH_NAME ...], --patch-name PATCH_NAME [PATCH_NAME ...]
2020-07-03 19:49:10 +00:00
relative filename(s) of generated patch(es) (default: ['nvencodeapi64.1337', 'nvencodeapi.1337'])
2019-10-24 10:07:13 +00:00
-S SEARCH [SEARCH ...], --search SEARCH [SEARCH ...]
2020-07-03 19:49:10 +00:00
representation of search pattern(s) binary string (default: ['8BF085C0750549892FEB', '89450885C075048937EB'])
2019-10-24 10:07:13 +00:00
-R REPLACEMENT [REPLACEMENT ...], --replacement REPLACEMENT [REPLACEMENT ...]
2020-07-03 19:49:10 +00:00
representation of replacement(s) binary string (default: ['33C08BF0750549892FEB', '33C089450875048937EB'])
2019-02-11 20:51:25 +00:00
-o, --stdout output into stdout (default: False)
2020-07-03 19:49:10 +00:00
-D, --direct supply patched library directly instead of installer file (default: False)
2019-02-11 20:51:25 +00:00
```