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.
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
|
import os
|
|
|
|
builder.SetBuildFolder('package')
|
|
|
|
# 64-bit extensions live under an x64/ subfolder; 32-bit sit directly in
|
|
# extensions/. Only one architecture is built per configure, so pick the
|
|
# matching destination here.
|
|
if builder.cxx.target.arch == 'x86_64':
|
|
ext_folder = 'addons/sourcemod/extensions/x64'
|
|
else:
|
|
ext_folder = 'addons/sourcemod/extensions'
|
|
|
|
folder_list = [
|
|
ext_folder,
|
|
'addons/sourcemod/scripting/include',
|
|
]
|
|
|
|
# Create the distribution folder hierarchy.
|
|
folder_map = {}
|
|
for folder in folder_list:
|
|
norm_folder = os.path.normpath(folder)
|
|
folder_map[folder] = builder.AddFolder(norm_folder)
|
|
|
|
for extension in SteamWorks.extensions:
|
|
builder.AddCopy(extension.binary, folder_map[ext_folder])
|
|
|
|
# Do all straight-up file copies from the source tree.
|
|
def CopyFiles(src, dest, files):
|
|
if not dest:
|
|
dest = src
|
|
dest_entry = folder_map[dest]
|
|
for source_file in files:
|
|
source_path = os.path.join(builder.sourcePath, src, source_file)
|
|
builder.AddCopy(source_path, dest_entry)
|
|
|
|
CopyFiles('Pawn/includes', 'addons/sourcemod/scripting/include', ['SteamWorks.inc'])
|