-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconan_build.py
38 lines (30 loc) · 1 KB
/
conan_build.py
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
import os, platform, sys
def execute(cmd):
print("CMD: " + cmd)
assert os.system(cmd) == 0
try:
bitness = sys.argv[1]
except:
bitness = os.environ['PLATFORM']
assert bitness in ['64', '32']
sysname = platform.system().lower()
if 'windows' in sysname:
osname = 'windows'
else:
osname = 'linux'
execute('conan config install global.conf')
os.chdir('../ThirdParty')
execute('python ./1_export_custom.py --unattended')
for config in ['release', 'debug']:
cmd = 'conan build .'
cmd += f' -pr:b profiles/base_{osname}'
cmd += f' -pr profiles/os_{osname}'
cmd += f' -pr profiles/arch_{bitness}'
cmd += f' -pr profiles/build_{config}' # note: third-party are built as full Debug
cmd += f' -of build_{osname}_{bitness}_{config}'
cmd += ' -b missing'
cmd += ' -o thedarkmod/*:build_game=True'
cmd += ' -o thedarkmod/*:build_installer=True'
cmd += ' -o thedarkmod/*:build_packager=True'
execute(cmd)
os.chdir('../CiScripts')