64-bit support for CSGO on Linux and macOS (#705)
This commit is contained in:
+26
-22
@@ -1,27 +1,31 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os.path
|
||||
|
||||
if builder.target.platform in ['windows', 'mac']:
|
||||
name = 'sourcemod_mm'
|
||||
extra_ldflags = []
|
||||
elif builder.target.platform == 'linux':
|
||||
name = 'sourcemod_mm_i486'
|
||||
extra_ldflags = ['-ldl']
|
||||
for arch in SM.archs:
|
||||
if builder.target.platform in ['windows', 'mac']:
|
||||
name = 'sourcemod_mm'
|
||||
extra_ldflags = []
|
||||
elif builder.target.platform == 'linux':
|
||||
name = 'sourcemod_mm_i486'
|
||||
extra_ldflags = ['-ldl']
|
||||
|
||||
binary = SM.Library(builder, name)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core'),
|
||||
os.path.join(SM.mms_root, 'sourcehook')
|
||||
]
|
||||
binary.compiler.defines += ['META_NO_HL2SDK']
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.linkflags += extra_ldflags
|
||||
binary.sources = [
|
||||
'loader.cpp'
|
||||
]
|
||||
if arch == 'x64':
|
||||
name = 'sourcemod_mm.x64'
|
||||
|
||||
nodes = builder.Add(binary)
|
||||
SM.binaries += [nodes]
|
||||
binary = SM.Library(builder, name, arch)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core'),
|
||||
os.path.join(SM.mms_root, 'sourcehook')
|
||||
]
|
||||
binary.compiler.defines += ['META_NO_HL2SDK']
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.linkflags += extra_ldflags
|
||||
binary.sources = [
|
||||
'loader.cpp'
|
||||
]
|
||||
|
||||
nodes = builder.Add(binary)
|
||||
SM.binaries += [nodes]
|
||||
|
||||
+27
-21
@@ -57,28 +57,34 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) || defined(__x86_64__)
|
||||
#define PLATFORM_ARCH_FOLDER "x64" PATH_SEP_CHAR
|
||||
#else
|
||||
#define PLATFORM_ARCH_FOLDER ""
|
||||
#endif
|
||||
|
||||
#define METAMOD_API_MAJOR 2
|
||||
#define FILENAME_1_6_EP2 "sourcemod.2.ep2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_EP1 "sourcemod.2.ep1" PLATFORM_EXT
|
||||
#define FILENAME_1_6_L4D "sourcemod.2.l4d" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DARKM "sourcemod.2.darkm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_L4D2 "sourcemod.2.l4d2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_SWARM "sourcemod.2.swarm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BGT "sourcemod.2.bgt" PLATFORM_EXT
|
||||
#define FILENAME_1_6_EYE "sourcemod.2.eye" PLATFORM_EXT
|
||||
#define FILENAME_1_6_PORTAL2 "sourcemod.2.portal2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CSGO "sourcemod.2.csgo" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CSS "sourcemod.2.css" PLATFORM_EXT
|
||||
#define FILENAME_1_6_HL2DM "sourcemod.2.hl2dm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DODS "sourcemod.2.dods" PLATFORM_EXT
|
||||
#define FILENAME_1_6_SDK2013 "sourcemod.2.sdk2013" PLATFORM_EXT
|
||||
#define FILENAME_1_6_TF2 "sourcemod.2.tf2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_ND "sourcemod.2.nd" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BLADE "sourcemod.2.blade" PLATFORM_EXT
|
||||
#define FILENAME_1_6_INSURGENCY "sourcemod.2.insurgency" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DOI "sourcemod.2.doi" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CONTAGION "sourcemod.2.contagion" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BMS "sourcemod.2.bms" PLATFORM_EXT
|
||||
#define FILENAME_1_6_EP2 PLATFORM_ARCH_FOLDER "sourcemod.2.ep2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_EP1 PLATFORM_ARCH_FOLDER "sourcemod.2.ep1" PLATFORM_EXT
|
||||
#define FILENAME_1_6_L4D PLATFORM_ARCH_FOLDER "sourcemod.2.l4d" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DARKM PLATFORM_ARCH_FOLDER "sourcemod.2.darkm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_L4D2 PLATFORM_ARCH_FOLDER "sourcemod.2.l4d2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_SWARM PLATFORM_ARCH_FOLDER "sourcemod.2.swarm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BGT PLATFORM_ARCH_FOLDER "sourcemod.2.bgt" PLATFORM_EXT
|
||||
#define FILENAME_1_6_EYE PLATFORM_ARCH_FOLDER "sourcemod.2.eye" PLATFORM_EXT
|
||||
#define FILENAME_1_6_PORTAL2 PLATFORM_ARCH_FOLDER "sourcemod.2.portal2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CSGO PLATFORM_ARCH_FOLDER "sourcemod.2.csgo" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CSS PLATFORM_ARCH_FOLDER "sourcemod.2.css" PLATFORM_EXT
|
||||
#define FILENAME_1_6_HL2DM PLATFORM_ARCH_FOLDER "sourcemod.2.hl2dm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DODS PLATFORM_ARCH_FOLDER "sourcemod.2.dods" PLATFORM_EXT
|
||||
#define FILENAME_1_6_SDK2013 PLATFORM_ARCH_FOLDER "sourcemod.2.sdk2013" PLATFORM_EXT
|
||||
#define FILENAME_1_6_TF2 PLATFORM_ARCH_FOLDER "sourcemod.2.tf2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_ND PLATFORM_ARCH_FOLDER "sourcemod.2.nd" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BLADE PLATFORM_ARCH_FOLDER "sourcemod.2.blade" PLATFORM_EXT
|
||||
#define FILENAME_1_6_INSURGENCY PLATFORM_ARCH_FOLDER "sourcemod.2.insurgency" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DOI PLATFORM_ARCH_FOLDER "sourcemod.2.doi" PLATFORM_EXT
|
||||
#define FILENAME_1_6_CONTAGION PLATFORM_ARCH_FOLDER "sourcemod.2.contagion" PLATFORM_EXT
|
||||
#define FILENAME_1_6_BMS PLATFORM_ARCH_FOLDER "sourcemod.2.bms" PLATFORM_EXT
|
||||
|
||||
HINSTANCE g_hCore = NULL;
|
||||
bool load_attempted = false;
|
||||
|
||||
Reference in New Issue
Block a user