Skip to content

Build Information

FaithBeam edited this page Nov 5, 2026 · 2 revisions

How to build stalker-gamma (the CLI) and stalker-gamma-server from source.

Each platform has a build script in build/ that downloads the native dependencies, compiles the CLI and the server, and puts everything where the CLI expects it. Build on the OS you are building for. On Linux and macOS, ARCH must also match the machine's CPU, because the CLI is published for the machine it's built on.

Dependencies

All platforms

  • .NET 10 SDK, version 10.0.403 or newer (pinned in global.json)
  • A C/C++ toolchain for Native AOT. The CLI is compiled ahead of time to a native executable, which needs the platform's native compiler and linker (see below). The server is a regular self-contained .NET app.
  • Internet access. The scripts download these during the build:
Dependency Version Used for
curl-impersonate (libcurl-impersonate) v2.2.3 (v2.2.2 on Windows) HTTP requests that look like a browser's
cacert.pem latest CA certificates for curl-impersonate
7-Zip (7z.so / 7z.dll) 26.03 Extracting every archive. Built from source on Linux and macOS
appimagetool continuous Packaging AppImages (Linux make appimage only)

Windows

  • Windows with PowerShell
  • Visual Studio 2022 or newer, or Build Tools for Visual Studio, with the Desktop development with C++ workload (needed for Native AOT)
    • For arm64 builds, also install the MSVC ARM64 build tools component

The script downloads 7-Zip itself, so you don't need it installed.

Linux

  • curl, tar and xz to download and unpack dependencies
  • make, gcc and g++ to build 7-Zip
  • clang and the zlib development headers for Native AOT
  • Only for make appimage: FUSE 2 to run appimagetool, and optionally appstreamcli so appimagetool can check the AppStream metadata
Distro Command
Ubuntu / Debian sudo apt install curl tar xz-utils make gcc g++ clang zlib1g-dev
AppImage: sudo apt install libfuse2 appstream (libfuse2t64 on Ubuntu 24.04 and newer)
Fedora sudo dnf install curl tar xz make gcc gcc-c++ clang zlib-devel
AppImage: sudo dnf install fuse-libs appstream
Arch sudo pacman -S --needed curl tar xz make gcc clang zlib
AppImage: sudo pacman -S --needed fuse2 appstream

macOS

  • Xcode Command Line Tools: xcode-select --install. This provides clang and make, used for both 7-Zip and Native AOT. curl and tar come with macOS.

Build

Pass a version to stamp into the binaries (default 1.0.0) and the architecture to build for (x64 or arm64).

Windows

cd build\win
.\build.bat 1.41.0 x64

Or call the PowerShell script directly:

powershell -NoProfile -ExecutionPolicy Bypass -File build\win\build.ps1 -Version 1.41.0 -Arch x64

Each run deletes build\win\build and starts fresh.

Linux

cd build/linux
make build VERSION=1.41.0 ARCH=x64        # ARCH defaults to x64
make appimage VERSION=1.41.0 ARCH=x64     # optional: package the AppImages

macOS

cd build/mac
make build VERSION=1.41.0 ARCH=arm64      # ARCH defaults to arm64
make archive ARCH=arm64                   # optional: package the .tar.gz files

On Linux and macOS, make build does nothing if build/ already exists from an earlier build (make prints 'build' is up to date). Run make clean first to rebuild.

Output

Platform Command Output
Windows build.bat build/win/build/stalker-gamma-cli/, build/win/build/stalker-gamma-server/
stalker-gamma+win.{arch}.zip, stalker-gamma-server+win.{arch}.zip in the folder you ran it from
Linux make build build/linux/build/stalker-gamma-cli/, build/linux/build/stalker-gamma-server/
make appimage build/linux/stalker-gamma+linux.{arch}.AppImage, build/linux/stalker-gamma-server+linux.{arch}.AppImage
make archive build/linux/stalker-gamma-cli.tar.xz (CLI only)
macOS make build build/mac/build/stalker-gamma-cli/, build/mac/build/stalker-gamma-server/
make archive build/mac/stalker-gamma+mac.{arch}.tar.gz, build/mac/stalker-gamma-server+mac.{arch}.tar.gz

The CLI needs these files next to its executable:

stalker-gamma-cli/
├── stalker-gamma(.exe)
├── libcurl-impersonate.so / .dylib / .dll
├── cacert.pem
└── resources/
    └── 7z.so (7z.dll on Windows)

Developing

To run the CLI from your IDE or with dotnet run, copy the native files into the debug output folder stalker-gamma-cli/bin/Debug/net10.0/ with the same layout as above. The easiest way to get them is to run your platform's build once and copy them out of its stalker-gamma-cli/ folder.

The repo uses local .NET tools for formatting and API client generation:

dotnet tool restore
dotnet csharpier format .   # CI fails if `dotnet csharpier check .` finds unformatted files

Clone this wiki locally