Compare commits

...

16 Commits

Author SHA1 Message Date
renovate[bot]
3982385e49
Merge ea5816b6ac into ca85c17c6c 2025-10-23 03:23:38 +00:00
renovate[bot]
ea5816b6ac
Update dependency python to 3.14 2025-10-23 03:23:34 +00:00
Ryan Stecker
ca85c17c6c
Merge pull request #22 from voided/feature/ci-fix
Some checks are pending
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (clang, clang++, ubuntu-latest) (push) Waiting to run
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (msvc, windows-latest) (push) Waiting to run
Fix CI builds
2025-10-22 22:22:50 -05:00
Ryan Stecker
fb958033fd Add some missing linux defines. 2025-10-22 22:14:30 -05:00
Ryan Stecker
48f70c50a7 Fix dods, css, and hl2dm builds. 2025-10-22 22:03:29 -05:00
Ryan Stecker
d7164c8b35 hl2sdk differences will be the death of me. 2025-10-22 21:58:07 -05:00
Ryan Stecker
88d154eec9 Hopefully fully fix tf2 lib paths. 2025-10-22 21:53:42 -05:00
Ryan Stecker
21618fc933 Correct linux tf2 32bit lib path. 2025-10-22 21:44:56 -05:00
Ryan Stecker
94f7a43065 Fix linux x64 lib path. 2025-10-22 21:29:15 -05:00
Ryan Stecker
7b71462be2 l4d/l4d2 builds should not use x84/x86 lib paths. 2025-10-22 21:28:58 -05:00
Ryan Stecker
8cb40450ea Remove unused makefile. 2025-10-22 21:20:20 -05:00
Ryan Stecker
c07e0835ea Fix path for hl2sdk libs on windows. 2025-10-22 21:20:13 -05:00
Ryan Stecker
65a56c601f Nevermind, not ready to tackle safetyhook. 2025-10-22 21:19:58 -05:00
Ryan Stecker
061d67337a Clean up artifacts condition. 2025-10-22 20:38:23 -05:00
Ryan Stecker
a227a9c534 Bump up to latest MM:S and SM stable versions. 2025-10-22 20:37:52 -05:00
Ryan Stecker
a0604a5670 Remove older CI runners. 2025-10-22 20:37:34 -05:00
3 changed files with 21 additions and 241 deletions

View File

@ -11,13 +11,8 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-20.04
cc: clang-10
cxx: clang++-10
- os: windows-2019
cc: msvc
- os: ubuntu-latest
cc: clang
cxx: clang++
@ -56,7 +51,7 @@ jobs:
- uses: actions/setup-python@v6
name: Setup Python 3.9
with:
python-version: 3.9
python-version: 3.14
- name: Install Python dependencies
run: |
@ -144,7 +139,7 @@ jobs:
- uses: actions/upload-artifact@v4
name: Upload artifacts
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (startsWith(matrix.os, 'windows-latest') || startsWith(matrix.os, 'ubuntu-latest'))
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "extension/build/package/"

View File

@ -392,7 +392,7 @@ class ExtensionConfig(object):
cxx.cflags += ["/Oy-"]
def configure_linux(self, cxx):
cxx.defines += ["_LINUX", "POSIX"]
cxx.defines += ["LINUX", "_LINUX", "POSIX", "_FILE_OFFSET_BITS=64"]
cxx.linkflags += ["-Wl,--exclude-libs,ALL", "-lm"]
if cxx.vendor == "gcc":
cxx.linkflags += ["-static-libgcc"]
@ -512,10 +512,13 @@ class ExtensionConfig(object):
if compiler.target.platform == "linux":
if sdk.name == "episode1":
lib_folder = os.path.join(sdk.path, "linux_sdk")
elif sdk.name in ["sdk2013", "bms"]:
lib_folder = os.path.join(sdk.path, "lib", "public", "linux32")
elif (
sdk.name in ["tf2", "dods", "css", "hl2dm", "sdk2013", "bms"]
and compiler.target.arch == "x86"
):
lib_folder = os.path.join(sdk.path, "lib", "public", "linux")
elif compiler.target.arch == "x86_64":
lib_folder = os.path.join(sdk.path, "lib", "linux64")
lib_folder = os.path.join(sdk.path, "lib", "public", "linux64")
else:
lib_folder = os.path.join(sdk.path, "lib", "linux")
elif compiler.target.platform == "mac":
@ -573,12 +576,18 @@ class ExtensionConfig(object):
if sdk.name in ["swarm", "blade", "insurgency", "doi", "csgo"]:
libs.append("interfaces")
for lib in libs:
if compiler.target.arch == "x86":
if sdk.name in ["l4d", "l4d2"]:
# l4d and l4d2 engines don't have 64-bit libs
lib_path = os.path.join(sdk.path, "lib", "public", lib) + ".lib"
elif compiler.target.arch == "x86_64":
lib_path = (
os.path.join(sdk.path, "lib", "public", "win64", lib) + ".lib"
)
else:
if compiler.target.arch == "x86":
lib_path = (
os.path.join(sdk.path, "lib", "public", "x86", lib) + ".lib"
)
elif compiler.target.arch == "x86_64":
lib_path = (
os.path.join(sdk.path, "lib", "public", "x64", lib) + ".lib"
)
compiler.linkflags.append(lib_path)
for library in dynamic_libs:

View File

@ -1,224 +0,0 @@
# (C)2004-2010 SourceMod Development Team
# Makefile written by David "BAILOPAN" Anderson
SMSDK = ../sourcemod-1.4
HL2SDK_ORIG = ../hl2sdks/hl2sdk
HL2SDK_OB = ../hl2sdks/hl2sdk-ob
HL2SDK_OB_VALVE = ../hl2sdks/hl2sdk-ob-valve
HL2SDK_CSS = ../hl2sdks/hl2sdk-css
HL2SDK_L4D = .../hl2sdks/hl2sdk-l4d
HL2SDK_L4D2 = ../hl2sdks/hl2sdk-l4d2
HL2SDK_CSGO = ../hl2sdks/hl2sdk-csgo
MMSOURCE19 = ../mmsource-1.9
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
#####################################
PROJECT = collisionhook.ext
OBJECTS = extension.cpp sdk/smsdk_ext.cpp CDetour/detours.cpp asm/asm.c
##############################################
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
##############################################
C_OPT_FLAGS = -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
C_GCC4_FLAGS = -fvisibility=hidden
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
ifneq "$(CROSSTOOL)" ""
CPP = /opt/crosstool/gcc-3.4.1-glibc-2.3.2/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-gcc
else
CPP = gcc
endif
CPP_OSX = clang
##########################
### SDK CONFIGURATIONS ###
##########################
override ENGSET = false
# Check for valid list of engines
ifneq (,$(filter original orangebox css orangeboxvalve left4dead left4dead2 csgo,$(ENGINE)))
override ENGSET = true
endif
ifeq "$(ENGINE)" "original"
HL2SDK = $(HL2SDK_ORIG)
CFLAGS += -DSOURCE_ENGINE=1
endif
ifeq "$(ENGINE)" "orangebox"
HL2SDK = $(HL2SDK_OB)
CFLAGS += -DSOURCE_ENGINE=3
endif
ifeq "$(ENGINE)" "css"
HL2SDK = $(HL2SDK_CSS)
CFLAGS += -DSOURCE_ENGINE=6
endif
ifeq "$(ENGINE)" "orangeboxvalve"
HL2SDK = $(HL2SDK_OB_VALVE)
CFLAGS += -DSOURCE_ENGINE=7
endif
ifeq "$(ENGINE)" "left4dead"
HL2SDK = $(HL2SDK_L4D)
CFLAGS += -DSOURCE_ENGINE=8
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
CFLAGS += -DSOURCE_ENGINE=9
endif
ifeq "$(ENGINE)" "csgo"
HL2SDK = $(HL2SDK_CSGO)
CFLAGS += -DSOURCE_ENGINE=12
endif
HL2PUB = $(HL2SDK)/public
ifeq "$(ENGINE)" "original"
INCLUDE += -I$(HL2SDK)/public/dlls
METAMOD = $(MMSOURCE19)/core-legacy
else
INCLUDE += -I$(HL2SDK)/public/game/server
METAMOD = $(MMSOURCE19)/core
endif
OS := $(shell uname -s)
ifeq "$(OS)" "Darwin"
LIB_EXT = dylib
HL2LIB = $(HL2SDK)/lib/mac
else
LIB_EXT = so
ifeq "$(ENGINE)" "original"
HL2LIB = $(HL2SDK)/linux_sdk
else
HL2LIB = $(HL2SDK)/lib/linux
endif
endif
# if ENGINE is original or OB
ifneq (,$(filter original orangebox,$(ENGINE)))
LIB_SUFFIX = _i486.$(LIB_EXT)
else ifneq (,$(filter orangeboxvalve css,$(ENGINE)))
LIB_PREFIX = lib
ifneq "$(OS)" "Darwin"
LIB_SUFFIX = _srv.$(LIB_EXT)
else
LIB_SUFFIX = .$(LIB_EXT)
endif
else
LIB_PREFIX = lib
LIB_SUFFIX = .$(LIB_EXT)
endif
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \
-DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10
-DSE_PORTAL2=11 -DSE_CSGO=12
LINK = $(HL2LIB)/tier1_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX)
ifeq "$(ENGINE)" "csgo"
LINK += $(HL2LIB)/interfaces_i486.a
endif
LINK += -m32 -ldl -lm
INCLUDE += -I. -I.. -Isdk -ICDetour -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
CFLAGS += -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wall -Werror \
-Wno-overloaded-virtual -Wno-switch -Wno-unused -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32
CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
################################################
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
################################################
BINARY = $(PROJECT).$(LIB_EXT)
ifeq "$(DEBUG)" "true"
BIN_DIR = Debug.$(ENGINE)
CFLAGS += $(C_DEBUG_FLAGS)
else
BIN_DIR = Release.$(ENGINE)
CFLAGS += $(C_OPT_FLAGS)
endif
ifeq "$(OS)" "Darwin"
CPP = $(CPP_OSX)
LIB_EXT = dylib
CFLAGS += -DOSX -D_OSX
LINK += -dynamiclib -lstdc++ -mmacosx-version-min=10.5
else
LIB_EXT = so
CFLAGS += -D_LINUX
LINK += -shared
endif
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
ifeq "$(IS_CLANG)" "1"
CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/")
CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/")
else
CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1)
CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3)
endif
# If not clang
ifeq "$(IS_CLANG)" "0"
CFLAGS += -mfpmath=sse
endif
# Clang || GCC >= 4
ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1"
CFLAGS += $(C_GCC4_FLAGS)
CPPFLAGS += $(CPP_GCC4_FLAGS)
endif
# Clang >= 3 || GCC >= 4.7
ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1"
CFLAGS += -Wno-delete-non-virtual-dtor
endif
# OS is Linux and not using clang
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
LINK += -static-libgcc
endif
OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
# This will break if we include other Makefiles, but is fine for now. It allows
# us to make a copy of this file that uses altered paths (ie. Makefile.mine)
# or other changes without mucking up the original.
MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
$(BIN_DIR)/%.o: %.cpp
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
all: check
mkdir -p $(BIN_DIR)
mkdir -p $(BIN_DIR)/sdk
mkdir -p $(BIN_DIR)/CDetour
cp -f $(HL2LIB)/$(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)vstdlib$(LIB_SUFFIX)
cp -f $(HL2LIB)/$(LIB_PREFIX)tier0$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX)
$(MAKE) -f $(MAKEFILE_NAME) mms_ext
check:
if [ "$(ENGSET)" = "false" ]; then \
echo "You must supply one of the following values for ENGINE:"; \
echo "csgo, left4dead2, left4dead, orangeboxvalve, css, orangebox, or original"; \
exit 1; \
fi
mms_ext: check $(OBJ_BIN)
$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY)
debug:
$(MAKE) -f $(MAKEFILE_NAME) all DEBUG=true
default: all
clean: check
rm -rf $(BIN_DIR)/*.o
rm -rf $(BIN_DIR)/$(BINARY)