-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
73 lines (62 loc) · 1.49 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -------------
# | Variables |
# -------------
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
VC_BUILD_DIR="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
[env.development]
TARGET_PATH = "target/debug"
[env.production]
TARGET_PATH = "target/release"
BUILD_RELEASE = "--release"
# ------------
# | Wrappers |
# ------------
[tasks.fmt]
command = "cargo"
args = ["fmt"]
private = true
[tasks.check]
command = "cargo"
args = ["check"]
private = true
[tasks.clippy]
command = "cargo"
args = ["clippy"]
private = true
# -------------
# | Executors |
# -------------
[tasks.checkf]
workspace = false
dependencies = ["fmt", "check"]
[tasks.checkfc]
workspace = false
dependencies = ["fmt", "check", "clippy"]
[tasks.build-driver]
workspace = false
script = '''
cargo b %BUILD_FLAGS%
'''
[tasks.rename]
workspace = false
ignore_errors = true
script = '''
cd %TARGET_PATH%
rename driver.dll driver.sys
'''
[tasks.clean-cert]
workspace = false
script_runner = "@shell"
script = '''
if exist Fuwn.cer ( rm Fuwn.cer )
'''
[tasks.sign]
workspace = false
dependencies = ["build-driver", "rename", "clean-cert"]
script = '''
call "%VC_BUILD_DIR%"
if not exist Fuwn.cer ( makecert -r -pe -ss PrivateCertStore -n CN=Fuwn Fuwn.cer ) else ( echo Certificate already exists. )
# https://docs.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
signtool sign /a /v /s PrivateCertStore /n Fuwn /fd certHash /t http://timestamp.digicert.com %TARGET_PATH%/driver.sys
'''