Files
SM-SteamWorks/configure.py
Nicholas Hastings 39fcfa564e Modernize build/CI, support SourceMod 1.13, deprecate ForceHeartbeat
Rework the build and CI: swap to SourceMod's safetyhook-based CDetour and
drop the vendored CDetour/asm sources, the old Makefile, Travis config, and
buildbot perl scripts. Add GitHub Actions building and releasing x86 and
x86_64 against SM 1.12 and 1.13, plus dependabot. Split the Windows and Linux
packages and tidy naming.

Gate IPluginManager::FindPluginByContext on the extension API version so the
extension builds against both SM 1.12 (API 8) and 1.13 (API 9), and shim
DETOUR_CREATE_STATIC_FIXED over the address overload safetyhook exposes.

Deprecate SteamWorks_ForceHeartbeat: newer Steamworks SDKs removed
ISteamGameServer::ForceHeartbeat, so make the native a no-op and mark it
deprecated in the include.
2026-07-12 10:56:36 -04:00

34 lines
1.5 KiB
Python

# vim: set ts=2 sw=2 tw=99 noet:
import sys
try:
from ambuild2 import run
except:
try:
import ambuild
sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
except:
sys.stderr.write('AMBuild must be installed to build this project.\n')
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
sys.exit(1)
# Hack to show a decent upgrade message, which wasn't done until 2.2.
ambuild_version = getattr(run, 'CURRENT_API', '2.1')
if ambuild_version.startswith('2.1'):
sys.stderr.write("AMBuild 2.2 or higher is required; please update\n")
sys.exit(1)
run = run.BuildParser(sourcePath=sys.path[0], api='2.2')
run.options.add_argument('--mms-path', type=str, dest='mms_path', default=None,
help='Path to Metamod:Source')
run.options.add_argument('--sm-path', type=str, dest='sm_path', default=None,
help='Path to Sourcemod')
run.options.add_argument('--steamworks-path', type=str, dest='steamworks_path', default=None,
help='Path to SteamWorks')
run.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug',
help='Enable debugging symbols')
run.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt',
help='Enable optimization')
run.options.add_argument('--target', default=None, help='Override the default build target')
run.Configure()