Skip to content

Building the Application

This guide provides detailed instructions for building the Visual Aim Assist Tool from source on both Windows and Linux.

Table of Contents


Prerequisites

Common Dependencies (Both Platforms)

  • CMake 3.16 or higher
  • OpenCV 4.x
  • nlohmann/json library

Platform-Specific Requirements

Windows

  • Windows 10/11
  • Visual Studio 2019 or later (with C++ desktop development workload)
  • vcpkg (recommended for dependency management)

Linux

  • GCC 9+ or Clang 10+
  • X11 development libraries
  • XShm extension support

Windows Build Instructions

# Clone vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg

# Bootstrap vcpkg
.\bootstrap-vcpkg.bat

# Integrate with system
.\vcpkg integrate install

Step 2: Install Dependencies

# Install OpenCV and nlohmann-json via vcpkg
.\vcpkg install opencv:x64-windows nlohmann-json:x64-windows

Step 3: Clone the Repository

git clone <repository-url>
cd <repository-directory>

Step 4: Create Build Directory

mkdir build
cd build

Step 5: Configure with CMake

# Using vcpkg toolchain
cmake .. -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 16 2019" -A x64

Replace [path to vcpkg] with the actual path to your vcpkg installation.

Step 6: Build

# Build in Release mode
cmake --build . --config Release

The compiled executable will be located in build/Release/.

Alternative: Using Visual Studio IDE

  1. Open Visual Studio
  2. Select "Open a local folder" and choose the repository directory
  3. Visual Studio will automatically detect CMakeLists.txt
  4. Select "Release" configuration from the dropdown
  5. Build → Build All (or press Ctrl+Shift+B)

Linux Build Instructions

For Linux users, we provide a convenient build script called glue.sh that automates the build process:

# Make the script executable
chmod +x glue.sh

# View help and available options
./glue.sh --help

# Clean and build (most common usage)
./glue.sh clean build

# Build with Debug configuration
./glue.sh build -t Debug

# Build with custom parallel jobs
./glue.sh build -j 4

# Build and run tests
./glue.sh build test

# Verbose build output
./glue.sh build -v

# Build with additional CMake variables
./glue.sh build -D CUSTOM_VAR=value -D ANOTHER_VAR=123

Script Features: - Automatic dependency checking (CMake required) - Configurable build types (Release, Debug, RelWithDebInfo, MinSizeRel) - Parallel build support with -j option - Dry-run mode with --dry-run to preview commands - Integrated test running with ctest - Documentation building (if configured in CMakeLists.txt)

The script will automatically create the build directory, configure CMake, and compile the project. The compiled executable will be located in build/.

Option 2: Manual Build

If you prefer manual control over the build process, follow these steps:

Step 1: Install Dependencies

Ubuntu/Debian

sudo apt-get update
sudo apt-get install -y \
    cmake \
    g++ \
    libopencv-dev \
    nlohmann-json3-dev \
    libx11-dev \
    libxext-dev \
    libxtst-dev

Fedora

sudo dnf install -y \
    cmake \
    gcc-c++ \
    opencv-devel \
    nlohmann-json-devel \
    libX11-devel \
    libXext-devel \
    libXi-devel

Arch Linux

sudo pacman -S \
    cmake \
    gcc \
    opencv \
    nlohmann-json \
    libx11 \
    libxext \
    libxtst

Step 2: Clone the Repository

git clone <repository-url>
cd <repository-directory>

Step 3: Create Build Directory

mkdir build
cd build

Step 4: Configure with CMake

cmake .. -DCMAKE_BUILD_TYPE=Release

Step 5: Build

# Build using all available CPU cores
cmake --build . -j$(nproc)

The compiled executable will be located in build/.

Step 6: (Optional) Install System-Wide

sudo cmake --install .

Using Pre-built Binaries

Windows users: We strongly recommend using the pre-built binary instead of building from source:

  1. Download the latest release from the Releases page
  2. Extract the ZIP file to a folder of your choice
  3. Run the executable (aimbot.exe or similar)
  4. Configure using the configuration guide

Note: You may need to add an exception in your antivirus software. See Security Information for details.

Linux Users

Currently, pre-built Linux binaries are not provided due to distribution differences and library compatibility issues. Linux users have two options:

  1. Use the glue.sh script (recommended) - See Option 1 above
  2. Build manually from source - See Option 2 above

Troubleshooting Build Issues

Common Windows Issues

CMake cannot find vcpkg packages

Ensure you specified the correct toolchain file path:

cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake

OpenCV not found

Verify OpenCV is installed via vcpkg:

.\vcpkg list

Common Linux Issues

Missing X11 headers

Install the development packages:

# Ubuntu/Debian
sudo apt-get install libx11-dev libxext-dev

# Fedora
sudo dnf install libX11-devel libXext-devel

OpenCV version too old

If your distribution's OpenCV is outdated, consider: - Using a PPA (Ubuntu) - Building OpenCV from source - Using a container/flatpak

General Issues

CMake version too old

Download the latest CMake from cmake.org or use your package manager to install a newer version.


Next Steps

After successfully building the application, proceed to: