-
Notifications
You must be signed in to change notification settings - Fork 16
/
PackageScript
39 lines (32 loc) · 1.52 KB
/
PackageScript
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
# vim: set ts=2 sw=2 tw=99 noet ft=python:
import os
builder.SetBuildFolder('package')
addons_folder = builder.AddFolder('addons')
metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod'))
stripper_folder = builder.AddFolder(os.path.join('addons', 'stripper'))
bin_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'bin'))
dumps_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'dumps'))
maps_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'maps'))
for cxx in MMS.all_targets:
if cxx.target.arch == 'x86_64':
if cxx.target.platform == 'windows':
bin64_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'bin', 'win64'))
elif cxx.target.platform == 'linux':
bin64_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'bin', 'linux64'))
elif cxx.target.platform == 'mac':
bin64_folder = builder.AddFolder(os.path.join('addons', 'stripper', 'bin', 'osx64'))
builder.AddCopy(os.path.join(builder.sourcePath, 'stripper.vdf'), metamod_folder)
builder.AddCopy(os.path.join(builder.sourcePath, 'global_filters.cfg'), stripper_folder)
builder.AddCopy(os.path.join(builder.sourcePath, 'de_dust.cfg'), maps_folder)
pdb_list = []
for task in MMS.binaries:
if task.target.arch == 'x86_64':
builder.AddCopy(task.binary, bin64_folder)
else:
builder.AddCopy(task.binary, bin_folder)
if task.debug:
pdb_list.append(task.debug)
# Generate PDB info.
with open(os.path.join(builder.buildPath, 'pdblog.txt'), 'wt') as fp:
for line in pdb_list:
fp.write(line.path + '\n')