Building the Metamod Plugin

How to build the MM-Loader host, a Metamod:Source plugin that loads Plugify, from source.

MM-Loader is a Metamod:Source plugin that loads Plugify into Counter-Strike 2. Server owners do not need to build it: it comes ready-made in the build. This page is for those who want to change the host or build it themselves.

Prerequisites

The same as for the core: a C++23 compiler, CMake, Ninja and Git. The official Linux builds are made with GCC 14 in the Steam Runtime container registry.gitlab.steamos.cloud/steamrt/sniper/sdk, so that the result runs on the game server.

Building

Clone the repository with submodules

Metamod:Source, the core, the Source 2 SDK and other libraries are Git submodules:

git clone https://github.com/untrustedmodders/plugify-metamod-loader.git --recursive
cd plugify-metamod-loader

Configure and build

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --target plugify-metamod-loader

Result

The core is linked into the plugin itself. The build folder gets:

  • libplugify.so (Linux) or plugify.dll (Windows), the Metamod plugin;
  • micromamba, the package manager the host uses;
  • addons/metamod/plugify.vdf, the file that tells Metamod to load the plugin.

On the server the plugin and micromamba go into csgo/addons/plugify/bin/<platform>/ and the addons folder into csgo/, see Metamod plugin installation.