Building From Source

Building Contower from source is a straightforward process that can be done on Linux, macOS, and Windows. This guide will walk you through the steps required to build Contower from source.

Prerequisites

Before building Contower from source, ensure you have the following prerequisites installed on your system:

We will show you how to install these prerequisites on different operating systems.

Linux (ubuntu, debian)

To install the prerequisites on Linux, run the following commands:

sudo apt update && sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang

Linux (Fedora, RHEL, CentOS)

To install the prerequisites on Fedora, RHEL, or CentOS, run the following commands:

yum -y install git make perl clang cmake

macOS

To install the prerequisites on macOS, you can use Homebrew. Run the following commands:

brew install cmake

Windows

  1. Install Git.

  2. Install the Chocolatey package manager for Windows.

    Tips:

    • Use PowerShell to install. In Windows, search for PowerShell and run as administrator.
    • You must ensure Get-ExecutionPolicy is not Restricted. To test this, run Get-ExecutionPolicy in PowerShell. If it returns restricted, then run Set-ExecutionPolicy AllSigned, and then run
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    
    • To verify that Chocolatey is ready, run choco and it should return the version.
  3. Install Make, CMake and LLVM using Chocolatey:

    choco install make
    
    choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
    
    choco install llvm
    

Building Contower

Once you have installed the prerequisites, you can build Contower from source by following these steps:

  1. Clone the Contower repository:

    git clone https://github.com/nodura/contower.git
    
  2. Change to the Contower directory:

    cd contower
    
  3. Build Contower using Make:

    git checkout stable
    
    make
    

Update Contower

To update Contower to the latest version, run the following commands:

cd contower
git fetch
git checkout ${version}
make

Feature Flags