2010-05-14 07:34:36 +02:00
|
|
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
|
|
|
import os
|
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
builder.SetBuildFolder('package')
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
addons_folder = builder.AddFolder('addons')
|
|
|
|
metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod'))
|
|
|
|
bin_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin'))
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2017-12-20 08:11:57 +01:00
|
|
|
for arch in MMS.archs:
|
|
|
|
if arch == 'x64':
|
|
|
|
if builder.target.platform == 'windows':
|
|
|
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'win64'))
|
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_win64.vdf'),
|
|
|
|
os.path.join('addons', 'metamod_x64.vdf'))
|
|
|
|
elif builder.target.platform == 'linux':
|
|
|
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'linux64'))
|
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_linux64.vdf'),
|
|
|
|
os.path.join('addons', 'metamod_x64.vdf'))
|
|
|
|
elif builder.target.platform == 'mac':
|
|
|
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'osx64'))
|
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_osx64.vdf'),
|
|
|
|
os.path.join('addons', 'metamod_x64.vdf'))
|
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod.vdf'), addons_folder)
|
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metaplugins.ini'), metamod_folder)
|
|
|
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'README.txt'), metamod_folder)
|
2010-05-14 07:34:36 +02:00
|
|
|
|
|
|
|
pdb_list = []
|
2013-11-18 18:46:46 +01:00
|
|
|
for task in MMS.binaries:
|
2017-12-20 08:11:57 +01:00
|
|
|
if '.x64' + os.sep in task.binary.path:
|
|
|
|
builder.AddCopy(task.binary, bin64_folder)
|
|
|
|
else:
|
|
|
|
builder.AddCopy(task.binary, bin_folder)
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
if task.debug:
|
2013-12-28 17:14:06 +01:00
|
|
|
pdb_list.append(task.debug)
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
# 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')
|
2010-05-14 07:34:36 +02:00
|
|
|
|