* Build sdktools for hl2sdk-mock The test_format script requires it. * Fix test_format %T translation test %T expects a client index and translation phrase as arguments, the test was passing a language id and a phrase. It never ran due to sdktools missing on the mock srcds before. * mocktest: Check for passing tests or exceptions too When sourcemod wouldn't even load the tests were still green since there was no "FAIL" in the output :D * Test 32bit x86 srcds too * Build against MMS 1.12-dev
65 lines
1.7 KiB
Python
65 lines
1.7 KiB
Python
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
import os
|
|
|
|
project = builder.LibraryProject('sdktools.ext')
|
|
project.sources += [
|
|
'extension.cpp',
|
|
'variant-t.cpp',
|
|
'inputnatives.cpp',
|
|
'output.cpp',
|
|
'outputnatives.cpp',
|
|
'tempents.cpp',
|
|
'tenatives.cpp',
|
|
'teamnatives.cpp',
|
|
'trnatives.cpp',
|
|
'vcaller.cpp',
|
|
'vcallbuilder.cpp',
|
|
'vdecoder.cpp',
|
|
'vglobals.cpp',
|
|
'vhelpers.cpp',
|
|
'vnatives.cpp',
|
|
'voice.cpp',
|
|
'vsound.cpp',
|
|
'clientnatives.cpp',
|
|
'hooks.cpp',
|
|
'gamerulesnatives.cpp',
|
|
'vstringtable.cpp',
|
|
'../../public/smsdk_ext.cpp'
|
|
]
|
|
|
|
for sdk_name in SM.sdks:
|
|
sdk = SM.sdks[sdk_name]
|
|
|
|
for cxx in builder.targets:
|
|
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
|
|
continue
|
|
|
|
binary = SM.HL2ExtConfig(project, builder, cxx, 'sdktools.ext.' + sdk['extension'], sdk)
|
|
SM.AddCDetour(binary)
|
|
|
|
binary.compiler.cxxincludes += [
|
|
os.path.join(builder.sourcePath, 'public', 'jit'),
|
|
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
|
|
]
|
|
|
|
if sdk['name'] in ('episode1', 'darkm'):
|
|
binary.compiler.cxxincludes += [os.path.join(sdk['path'], 'game_shared')]
|
|
binary.compiler.cxxincludes += [os.path.join(sdk['path'], 'dlls')]
|
|
else:
|
|
binary.compiler.cxxincludes += [
|
|
os.path.join(sdk['path'], 'game', 'shared'),
|
|
os.path.join(sdk['path'], 'game', 'server'),
|
|
]
|
|
|
|
#binary.sources += [os.path.join(builder.options.hl2sdk_root, sdk['path'], 'game', 'server', 'variant_t.cpp')]
|
|
|
|
binary.compiler.defines += ['HAVE_STRING_H']
|
|
|
|
if sdk['name'] != 'episode1':
|
|
binary.compiler.defines += ['HOOKING_ENABLED']
|
|
|
|
if binary.compiler.behavior == 'gcc':
|
|
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
|
|
|
SM.extensions += builder.Add(project)
|