-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
30 lines (25 loc) · 846 Bytes
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[tasks.build-driver]
script = '''
cargo b %BUILD_FLAGS%
'''
[env.development]
TARGET_PATH = "target/x86_64-pc-windows-msvc/debug"
[env.production]
TARGET_PATH = "target/x86_64-pc-windows-msvc/release"
BUILD_RELEASE = "--release"
[tasks.rename]
ignore_errors = true
script = '''
cd %TARGET_PATH%
rename mydriver.dll mydriver.sys
'''
[env]
VC_BUILD_DIR="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
[tasks.sign]
dependencies = ["build-driver", "rename"]
script = '''
call "%VC_BUILD_DIR%"
if not exist DriverCertificate.cer ( makecert -r -pe -ss PrivateCertStore -n CN=DriverCertificate DriverCertificate.cer ) else ( echo Certificate already exi
sts. )
signtool sign /a /v /s PrivateCertStore /n DriverCertificate /fd certHash /t http://timestamp.digicert.com %TARGET_PATH%/mydriver.sys
'''