Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
02551fb1
Commit
02551fb1
authored
Sep 04, 2019
by
Snawoot
Committed by
GitHub
Sep 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #153 from Snawoot/ap_batch_patch
ap: allow batch operation against multiple package files
parents
ed2642e8
aeeeaa2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
40 deletions
+42
-40
win/tools/autopatch/README.md
win/tools/autopatch/README.md
+2
-2
win/tools/autopatch/autopatch.py
win/tools/autopatch/autopatch.py
+40
-38
No files found.
win/tools/autopatch/README.md
View file @
02551fb1
...
@@ -16,12 +16,12 @@ This script accepts path to Nvidia Drivers installer, makes .1337 patch and save
...
@@ -16,12 +16,12 @@ This script accepts path to Nvidia Drivers installer, makes .1337 patch and save
$ ./autopatch.py --help
$ ./autopatch.py --help
usage: autopatch.py [-h] [-7 SEVENZIP] [-T TARGET] [-N TARGET_NAME]
usage: autopatch.py [-h] [-7 SEVENZIP] [-T TARGET] [-N TARGET_NAME]
[-S SEARCH] [-R REPLACEMENT] [-o]
[-S SEARCH] [-R REPLACEMENT] [-o]
installer_file
installer_file
[installer_file ...]
Generates .1337 patch for Nvidia drivers for Windows
Generates .1337 patch for Nvidia drivers for Windows
positional arguments:
positional arguments:
installer_file location of installer executable
installer_file location of installer executable
(s)
optional arguments:
optional arguments:
-h, --help show this help message and exit
-h, --help show this help message and exit
...
...
win/tools/autopatch/autopatch.py
View file @
02551fb1
...
@@ -22,7 +22,8 @@ def parse_args():
...
@@ -22,7 +22,8 @@ def parse_args():
description
=
"Generates .1337 patch for Nvidia drivers for Windows"
,
description
=
"Generates .1337 patch for Nvidia drivers for Windows"
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
parser
.
add_argument
(
"installer_file"
,
parser
.
add_argument
(
"installer_file"
,
help
=
"location of installer executable"
)
nargs
=
"+"
,
help
=
"location of installer executable(s)"
)
parser
.
add_argument
(
"-7"
,
"--7zip"
,
parser
.
add_argument
(
"-7"
,
"--7zip"
,
default
=
"7z"
,
default
=
"7z"
,
dest
=
"sevenzip"
,
dest
=
"sevenzip"
,
...
@@ -154,7 +155,8 @@ def main():
...
@@ -154,7 +155,8 @@ def main():
replacement
=
unhexlify
(
args
.
replacement
)
replacement
=
unhexlify
(
args
.
replacement
)
assert
len
(
search
)
==
len
(
replacement
),
"len() of search and replacement"
\
assert
len
(
search
)
==
len
(
replacement
),
"len() of search and replacement"
\
" is not equal"
" is not equal"
patch
=
make_patch
(
args
.
installer_file
,
for
installer_file
in
args
.
installer_file
:
patch
=
make_patch
(
installer_file
,
arch_tgt
=
args
.
target
,
arch_tgt
=
args
.
target
,
search
=
search
,
search
=
search
,
replacement
=
replacement
,
replacement
=
replacement
,
...
@@ -164,14 +166,14 @@ def main():
...
@@ -164,14 +166,14 @@ def main():
with
open
(
sys
.
stdout
.
fileno
(),
mode
=
'wb'
,
closefd
=
False
)
as
out
:
with
open
(
sys
.
stdout
.
fileno
(),
mode
=
'wb'
,
closefd
=
False
)
as
out
:
out
.
write
(
patch_content
)
out
.
write
(
patch_content
)
else
:
else
:
version
,
product_type
=
identify_driver
(
args
.
installer_file
,
version
,
product_type
=
identify_driver
(
installer_file
,
sevenzip
=
args
.
sevenzip
)
sevenzip
=
args
.
sevenzip
)
drv_prefix
=
{
drv_prefix
=
{
"100"
:
"quadro_"
,
"100"
:
"quadro_"
,
"300"
:
""
,
"300"
:
""
,
"301"
:
"nsd_"
,
"301"
:
"nsd_"
,
}
}
installer_name
=
os
.
path
.
basename
(
args
.
installer_file
)
.
lower
()
installer_name
=
os
.
path
.
basename
(
installer_file
)
.
lower
()
if
'winserv2008'
in
installer_name
:
if
'winserv2008'
in
installer_name
:
os_prefix
=
'ws2012_x64'
os_prefix
=
'ws2012_x64'
elif
'winserv-2016'
in
installer_name
:
elif
'winserv-2016'
in
installer_name
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment