Files
dusklight/docs/building.md
Giorgio Mendieta 31dd069879 docs: Improve building.md file (#1530)
* docs: Improve building.md file

- Fix broken XCode link
- Add MacOS running instructions
- Alphabetize linux packages

* fix: collapse packages sections for readability

* fix: collapse packages sections for readability

* fix: add --dvd flag to specify iso path

* fix: Remove incorrect info about game.iso
2026-05-17 07:51:38 -06:00

4.6 KiB

Building Dusklight

Dependencies

The following dependencies are required:

Windows

  • Install CMake 3.25+ by searching CMake Tools in Visual Studio
  • Install Python 3 from the Microsoft Store and verify it's added to %PATH% by typing python in cmd.

Recommended IDEs:

  • Visual Studio 2026 Community. During installation:
    • Select C++ Development and verify the following packages are included:
      • Windows 11 SDK
      • CMake Tools
      • C++ Clang Compiler
      • C++ Clang-cl

macOS

brew install cmake
  • Install Python 3
brew install python@3

Recommended IDEs:

Linux

Actively tested on Ubuntu 24.04, Arch Linux & derivatives.

Ubuntu 24.04+ packages

Click to expand
  • Run the following command to install the required dependencies:
sudo apt update && sudo apt install -y \
    build-essential \
    clang \
    cmake \
    curl \
    git \
    libasound2-dev \
    libclang-dev \
    libcurl4-openssl-dev \
    libdbus-1-dev \
    libfreetype-dev \
    libglu1-mesa-dev \
    libgtk-3-dev \
    libncurses5-dev \
    libpng-dev \
    libpulse-dev \
    libudev-dev \
    libvulkan-dev \
    libx11-xcb-dev \
    libxcursor-dev \
    libxi-dev \
    libxinerama-dev \
    libxrandr-dev \
    libxss-dev \
    libxtst-dev \
    lld \
    ninja-build \
    python-is-python3 \
    python3 \
    python3-markupsafe \
    zlib1g-dev

Arch Linux packages

Click to expand
  • Run the following command to install the required dependencies:
sudo pacman -S --needed \
    alsa-lib \
    base-devel \
    clang \
    cmake \
    freetype2 \
    libpulse \
    libxrandr \
    lld \
    llvm \
    ninja \
    python \
    python-markupsafe \
    vulkan-headers

Fedora packages

Click to expand
  • Run the following command to install the required dependencies:
sudo dnf install -y \
    clang-devel \
    cmake \
    libpng-devel \
    llvm-devel \
    ninja-build \
    vulkan-headers
  • It's also important that you install the developer tools and libraries
sudo dnf groupinstall \
    "Development Libraries" "Development Tools"

Recommended IDEs:

Building

  • Clone and initialize the Dusklight repository:
git clone --recursive https://github.com/TwilitRealm/dusklight.git
git pull
cd dusklight
git submodule update --init --recursive

CLion (Windows / macOS / Linux)

Open the project directory in CLion. Enable the appropriate presets for your platform:

CLion

Visual Studio (Windows)

Open the project directory in Visual Studio. The CMake configuration will be loaded automatically.

ninja (macOS)

cmake --preset macos-default-relwithdebinfo
cmake --build --preset macos-default-relwithdebinfo

Alternate presets available:

  • macos-default-debug: Clang, Debug

ninja (Linux)

cmake --preset linux-default-relwithdebinfo
cmake --build --preset linux-default-relwithdebinfo

Alternate presets available:

  • linux-default-debug: GCC, Debug
  • linux-clang-relwithdebinfo: Clang, RelWithDebInfo
  • linux-clang-debug: Clang, Debug

ninja (Windows)

cmake --preset windows-msvc-relwithdebinfo
cmake --build --preset windows-msvc-relwithdebinfo

Alternate presets available:

  • windows-msvc-debug: MSVC, Debug
  • windows-clang-relwithdebinfo: Clang-cl, RelWithDebInfo
  • windows-clang-debug: Clang-cl, Debug

Running

Windows / Linux

  • Pass the disc image as a positional argument using the --dvd flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
build/{preset}/dusklight --dvd /path/to/game.iso

macOS

macOS builds an .app bundle which contains the executable and all necessary resources.

  • Pass the disc image as a positional argument using the --dvd flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
build/{preset}/Dusklight.app/Contents/MacOS/Dusklight --dvd /path/to/game.iso