12 Compilation
UAVXP edited this page 2026-02-10 12:51:57 +02:00

Windows

In order to properly build shaders - you'll need a regular DirectX End-User Runtime installed.

  1. Go to DirectX End-User Runtime download page
  2. Select needed language and hit "Download"
  3. Run dxwebsetup.exe and install (don't forget to untick the Bing Bar checkbox)

Installing an IDE

Windows 10 is recommended.

You'll need Visual Studio Community Edition 2022 (it's free software). Download it here

Download the latest version of Visual Studio through the Visual Studio Installer:

  1. Open Available page image
  2. Click Install on Visual Studio Community 2022 image
  3. Choose "Desktop development with C++" package image
  4. Deselect unneeded packages in the right menu:
Test Adapters
Live Share
IntelliCode
C++ AddressSanitizer
C++ Build Insights
vcpkg package manager
  1. Select additional packages:
C++ MFC
C++ CMake tools
  1. Choose latest Windows SDK
  2. Click "Install" image

Wait until all the needed software are installed image

Compiling

To make the solution run:

  • .\createeverything.bat - to build all available projects
  • .\creategameprojects.bat - to build basic game without utils and tools
  1. Open Visual Studio. You can skip the Microsoft signing in section, but this will lead to 30 days trial.
  2. Press "Open a project or solution"
  3. Navigate to <your pulled repo folder>\src_main\build and open LeakNet.sln
  4. In Solution Explorer open the "CMakePredefinedTargets" folder, right-click on INSTALL project and hit "Build"

You also can use cmake from command line to build the solution, if you want:

cmake --build build --config "Debug"
cmake --install build --config "Debug"

for a debug build, or

cmake --build build --config "Release"
cmake --install build --config "Release"

for a release one.

  • Please note that the "build" command would take a long time, around 20 minutes, so prepare yourself a cup of tea while the project is building.

  • All of the project binaries will be stored in (srcrepo)/leaknet-install (can be changed through cmake's command-line argument -DGAMEDIR="<absolute_path>" applied at createeverything.bat stage).

  • If there are a few failed to build projects - open a build\LeakNet.sln and hit Build on INSTALL project, or TODO: cmake alternative?

Linux

  • To build dedicated server run:
./creatededicated.sh
cd build_dedicated
make -j$(nproc --all) install
  • All installed libs will be stored in (srcrepo)/leaknet-install (can be changed through command-line argument -DGAMEDIR="dir").