【CS2】源码编译metamod:source平台 科普

我不当学长 管理员组 2023-10-26 1254

Linux Compilation

A guide on how to compile Metamod:Source for Linux

NOTE

You can use the Windows Subsystem for Linux (WSL) to compile on Windows. Tested on Ubuntu 20.04

Prerequisites

File structure

For the sake of simplicity we will be doing everything in an alliedmodders folder

mkdir alliedmodders
cd alliedmodders

Ubuntu 20.04 setup

sudo apt update
sudo apt install python3-pip
sudo apt-get install clang

# make sure we can use pip installed packages anywhere
echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> ~/.bashrc
. ~/.bashrc

Download AMBuild

git clone https://github.com/alliedmodders/ambuild
pip install ./ambuild

# In case of an error try
# cd ambuild && python setup.py install && cd ..

Instructions

Double check you are still in the alliedmodders folder and run the following commands

mkdir hl2sdk-root
git clone https://github.com/alliedmodders/hl2sdk/ --branch cs2 hl2sdk-root/hl2sdk-cs2

git clone https://github.com/alliedmodders/metamod-source --recursive
cd metamod-source

echo "export HL2SDKCS2=/absolute/path/to/hl2sdk-root/hl2sdk-cs2" >> ~/.bashrc
echo "export MMSOURCE112=/absolute/path/to/metamod-source" >> ~/.bashrc
. ~/.bashrc

mkdir build && cd build
CC=clang CXX=clang++ python3 ../configure.py -s cs2
ambuild

参考:


CSGO插件分享-申明 1、本网站名称:CSGO插件分享-中文站  网址:https://bbs.csgocn.net
2、本站的宗旨在于为CSGO玩家提供一个插件分享的中文资源平台,多数插件来源于SourceMod论坛,并配以中文介绍和安装教程。
3、欢迎有能力的朋友共享有趣的CSGO插件资源。
4、本站资源大多为百度网盘,如发现链接失效,可以点: 这里进行反馈,我们会第一时间更新。
最新回复 (0)
返回