2013-12-30 23:50:58 +01:00
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
2009-08-30 09:46:56 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
files = [
|
2013-12-30 23:50:58 +01:00
|
|
|
'adminhelp.sp',
|
|
|
|
'antiflood.sp',
|
|
|
|
'basecomm.sp',
|
|
|
|
'clientprefs.sp',
|
|
|
|
'nextmap.sp',
|
|
|
|
'reservedslots.sp',
|
|
|
|
'adminmenu.sp',
|
|
|
|
'basebans.sp',
|
|
|
|
'basetriggers.sp',
|
|
|
|
'funcommands.sp',
|
|
|
|
'nominations.sp',
|
|
|
|
'rockthevote.sp',
|
|
|
|
'admin-sql-prefetch.sp',
|
|
|
|
'basechat.sp',
|
|
|
|
'basevotes.sp',
|
|
|
|
'funvotes.sp',
|
|
|
|
'playercommands.sp',
|
|
|
|
'sounds.sp',
|
|
|
|
'admin-sql-threaded.sp',
|
|
|
|
'basecommands.sp',
|
|
|
|
'mapchooser.sp',
|
|
|
|
'randomcycle.sp',
|
|
|
|
'sql-admin-manager.sp'
|
|
|
|
]
|
|
|
|
|
|
|
|
spcomp_argv = [
|
|
|
|
os.path.join(builder.buildPath, SM.spcomp.binary.path),
|
|
|
|
'SM_GENERATED_BUILD=',
|
2013-12-30 23:50:59 +01:00
|
|
|
'-i' + os.path.relpath(os.path.join(builder.buildPath, 'includes'),
|
|
|
|
os.path.join(builder.buildPath, builder.buildFolder)),
|
2013-12-30 23:50:58 +01:00
|
|
|
'-i' + os.path.relpath(os.path.join(builder.sourcePath, 'plugins', 'include'),
|
|
|
|
os.path.join(builder.buildPath, builder.buildFolder)),
|
|
|
|
'-h',
|
|
|
|
]
|
|
|
|
|
|
|
|
def build_plugin(script_path, smx_file):
|
|
|
|
inputs = [
|
|
|
|
SM.spcomp.binary,
|
|
|
|
script_path,
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
smx_file
|
|
|
|
]
|
|
|
|
argv = spcomp_argv + [script_path]
|
2013-12-30 23:50:59 +01:00
|
|
|
cmd_entry, (smx_entry,) = builder.AddCommand(
|
2013-12-30 23:50:58 +01:00
|
|
|
inputs = inputs,
|
|
|
|
argv = argv,
|
|
|
|
outputs = outputs,
|
2013-12-30 23:50:59 +01:00
|
|
|
dep_type = 'msvc',
|
|
|
|
weak_inputs = SM.generated_headers
|
2013-12-30 23:50:58 +01:00
|
|
|
)
|
|
|
|
SM.smx_files[smx_file] = smx_entry
|
|
|
|
|
|
|
|
for script_file in files:
|
|
|
|
script_path = os.path.join(builder.currentSourcePath, script_file)
|
|
|
|
smx_file = os.path.splitext(script_file)[0] + '.smx'
|
|
|
|
build_plugin(script_path, smx_file)
|
|
|
|
|
|
|
|
# This one has to be special.
|
|
|
|
build_plugin(os.path.join(builder.currentSourcePath, 'admin-flatfile', 'admin-flatfile.sp'),
|
|
|
|
'admin-flatfile.smx')
|