-
Notifications
You must be signed in to change notification settings - Fork 1
/
AMBuilder
64 lines (49 loc) · 2.03 KB
/
AMBuilder
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
# vim: set sts=4 ts=8 sw=4 tw=99 et ft=python:
import os
MMSPlugin.plugin_name = 'cs2rec'
MMSPlugin.plugin_alias = 'cs2rec'
builder.cxx = builder.DetectCxx()
cmdserver = builder.cxx.Program('cmdserver')
cmdserver.sources += [
os.path.join(builder.sourcePath, 'src', 'cmdserver', 'cmdserver.cpp'),
]
builder.Add(cmdserver)
for sdk_target in MMSPlugin.sdk_targets:
sdk = sdk_target.sdk
cxx = sdk_target.cxx
binary = MMSPlugin.HL2Library(builder, cxx, MMSPlugin.plugin_name, sdk)
arch = cxx.target.arch
binary.compiler.cxxincludes += [
os.path.join(builder.sourcePath, 'src'),
os.path.join(builder.sourcePath, 'deps'),
os.path.join(builder.sourcePath, 'deps', "cdl86"),
]
binary.sources += [
os.path.join('src', 'main.cpp'),
os.path.join('src', 'interfaces.cpp'),
os.path.join('src', 'util', 'ffmpipe.cpp'),
os.path.join('src', 'util', 'localsocket.cpp'),
os.path.join('src', 'util', 'log.cpp'),
os.path.join('src', 'module', 'recorder.cpp'),
os.path.join('src', 'mem', 'module.cpp'),
os.path.join('src', 'mem', 'vmem.cpp'),
os.path.join('src', 'hook', 'jmphook.cpp'),
os.path.join('src', 'hook', 'moviehook.cpp'),
os.path.join('src', 'hook', 'vmthook.cpp'),
# External deps
os.path.join('deps', 'cdl86', 'cdl.c')
]
protoc_builder = builder.tools.Protoc(protoc = sdk_target.protoc, sources = [
os.path.join(sdk['path'], 'common', 'network_connection.proto'),
os.path.join(sdk['path'], 'common', 'networkbasetypes.proto'),
os.path.join(sdk['path'], 'common', 'engine_gcmessages.proto'),
os.path.join(sdk['path'], 'gcsdk', 'steammessages.proto'),
os.path.join(sdk['path'], 'gcsdk', 'gcsdk_gcmessages.proto'),
])
protoc_builder.protoc.includes += [
os.path.join(sdk['path'], 'gcsdk'),
os.path.join(sdk['path'], 'common'),
]
binary.custom = [protoc_builder]
nodes = builder.Add(binary)
MMSPlugin.binaries += [nodes]