Update: add CS# api

This commit is contained in:
SlynxCZ 2026-02-11 21:36:29 +04:00
parent cd1b5aabd7
commit 4104ff8de4
9 changed files with 164 additions and 103 deletions

View file

@ -16,7 +16,11 @@ RUN apt update && apt install -y \
pkg-config \
libcurl4-openssl-dev \
libmaxminddb-dev \
curl
curl \
&& curl -sSL https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt update && apt install -y dotnet-sdk-8.0
RUN git config --system --add safe.directory '*'

View file

@ -20,13 +20,13 @@ rm -rf "$SDK_DIR"
mkdir -p "$SDK_DIR"
echo "=== Downloading HL2SDK-CS2 ==="
git clone --depth=1 -b cs2 https://github.com/alliedmodders/hl2sdk "$HL2SDK_DIR"
git clone --recursive --branch SlynxCZ/cs2 --single-branch https://github.com/FUNPLAY-pro-CS2/hl2sdk.git "$HL2SDK_DIR"
echo "=== Downloading Metamod-Source ==="
git clone --depth=1 https://github.com/alliedmodders/metamod-source "$MMSOURCE_DIR"
git clone --recursive --branch master --single-branch https://github.com/alliedmodders/metamod-source.git "$MMSOURCE_DIR"
echo "=== Downloading Protobufs ==="
git clone --depth=1 https://github.com/SteamDatabase/Protobufs "$CSGO_PROTO_DIR"
git clone --recursive https://github.com/SteamDatabase/Protobufs "$CSGO_PROTO_DIR"
### --- Export env vars for CMake ------------------------------------------
export HL2SDKCS2="$HL2SDK_DIR"
@ -50,4 +50,22 @@ cmake .. \
-DCMAKE_CXX_COMPILER=g++
echo "=== Building with GCC | Release | All ==="
cmake --build . --config Release -j"$(nproc)"
cmake --build . --config Release -j"$(nproc)"
cd ../
mkdir -p build/addons/counterstrikesharp/plugins
mkdir -p build/addons/counterstrikesharp/shared/RayTraceApi
dotnet publish managed/RayTrace/RayTraceImpl/RayTraceImpl.csproj \
-c Release \
-o build/addons/counterstrikesharp/plugins/RayTraceImpl \
--no-self-contained \
/p:PublishSingleFile=false \
/p:CopyLocalLockFileAssemblies=false
dotnet publish managed/RayTrace/RayTraceApi/RayTraceApi.csproj \
-c Release \
-o build/addons/counterstrikesharp/shared/RayTraceApi \
--no-self-contained \
/p:PublishSingleFile=false \
/p:CopyLocalLockFileAssemblies=false