[Linux] Compiling OTClient Redemption Sources
Supported OS
Debian
Ubuntu 20.04
Ubuntu 22.04
Ubuntu 24.04
1. Install the required software:
Debian
The following command will install Git, CMake, a compiler and the libraries used by OTClient Redemption.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update && sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build libglew-dev libx11-dev ccache linux-headers-$(uname -r)
Install vcpkg:
cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
Update vcpkg if you already have installed:
cd vcpkg
git pull
.\vcpkg upgrade
.\bootstrap-vcpkg.sh
.\vcpkg upgrade --no-dry-run
Ubuntu 20.04
The following command will install Git, CMake, a compiler and the libraries used by OTClient Redemption.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update && sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build libglew-dev libx11-dev ccache linux-headers-$(uname -r)
Update cmake:
sudo apt remove --purge cmake
hash -r
sudo apt install snapd
sudo snap install cmake --classic
cmake --version
Update gcc:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 --slave /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-11 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-11 /usr/bin/gcov-11
sudo update-alternatives --set gcc /usr/bin/gcc-11
gcc-11 --version
g++-11 --version
Install vcpkg:
cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
Update vcpkg if you already have installed:
cd vcpkg
git pull
.\vcpkg upgrade
.\bootstrap-vcpkg.sh
.\vcpkg upgrade --no-dry-run
Ubuntu 22.04
The following command will install Git, CMake, a compiler and the libraries used by OTClient Redemption.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update && sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build libglew-dev libx11-dev ccache linux-headers-$(uname -r)
Update cmake:
sudo apt remove --purge cmake
hash -r
sudo apt install snapd
sudo snap install cmake --classic
cmake --version
Update gcc:
sudo apt update
sudo apt install gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
sudo update-alternatives --set gcc /usr/bin/gcc-12
gcc-12 --version
g++-12 --version
Install vcpkg:
cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
Update vcpkg if you already have installed:
cd vcpkg
git pull
.\vcpkg upgrade
.\bootstrap-vcpkg.sh
.\vcpkg upgrade --no-dry-run
Ubuntu 24.04
The following command will install Git, CMake, a compiler and the libraries used by OTClient Redemption.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update && sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build libglew-dev libx11-dev ccache linux-headers-$(uname -r)
Update cmake:
sudo apt remove --purge cmake
hash -r
sudo apt install snapd
sudo snap install cmake --classic
cmake --version
Update gcc:
sudo apt update
sudo apt install gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
sudo update-alternatives --set gcc /usr/bin/gcc-12
gcc-12 --version
g++-12 --version
Install vcpkg:
cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
Update vcpkg if you already have installed:
cd vcpkg
git pull
.\vcpkg upgrade
.\bootstrap-vcpkg.sh
.\vcpkg upgrade --no-dry-run
2. Download the source code:
git clone --depth 1 https://github.com/mehah/otclient.git
cd otclient
3. Checkout nightly branch (optional):
git checkout main
4. Folder structure:
.
├── otclient
└── vcpkg
5. Configure and build:
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-release
cmake --build linux-release
-- Running vcpkg install
This step will take a long time on the first run, as it needs to download and install all the dependencies, so be patient!
Last updated