OpenTibiaBR
GithubDiscordSponsor
  • Home
    • 📖Welcome!
    • 💵Donate
  • OpenTibiaBR
    • 🖥️Projects
      • 🐦Canary
        • About
        • Getting Started
          • Compiling
            • Linux
              • [Linux] Compiling Canary Sources
            • Windows
              • Visual Studio
                • [Windows][VC2022][CMake] Compiling Canary Sources
                • [Windows][VC2022][Solution] Compiling Canary Sources
              • WSL
                • [WSL] Compiling Canary Sources
          • Installing
            • aaPanel
              • [Linux] Canary + aaPanel + MyAAC
            • Docker
              • [Docker] Canary + MariaDB + MyAAC
            • Linux
              • Nginx + MariaDB + MyAAC
            • Windows
              • Uniform Server
                • [Windows][Basic] Canary + Uniform Server + MyAAC
              • XAMPP
                • [Windows][Advanced] Canary + XAMPP + MyAAC
        • Tutorials
          • Basic
            • Auto Backup Server Database
            • Auto Restart and Linux Logs
            • Custom Bestiary / Prey with Canary Monster Editor
            • Event Schedule Canary / OTServBR-Global
            • How to make a custom server with Canary
            • How to reset players in your database
            • How to secure a Linux server
            • SSL Certificates
            • Webhook Discord
            • [Outdated] Custom Bestiary / Prey
            • [Linux] Backup + Upload - Google Drive
            • [Linux] How to install Linux headers
            • VPS Linux
            • [Windows] SSL/HTTPS Certificate with XAMPP
          • Mapping
            • [Windows] Remere's Map Editor - Opening Canary / OTServBR-Global Map
            • [Windows] Remere's Map Editor - Converting map server id to client id
          • Programming & Scripting
            • How to add a new vocation
            • Revscriptsys
            • Guide Lua Objects
            • How to get raceId for monsters
          • Websites
            • [Canary][OTServBR-Global][GesiorAAC][MyAAC] Set up Initial Character
          • Miscellaneous
            • Useful Tutorials
            • Video Tutorials
      • 🗺️Remere's Map Editor
        • About
        • Getting Started
          • Linux
            • [Linux] Compiling Remere's Map Editor Sources
          • Windows
            • WSL
              • [WSL] Compiling Remere's Map Editor Sources
            • Visual Studio
              • [Windows][VC2022][CMake] Compiling Remere's Map Editor Sources
              • [Windows][VC2022][Solution] Compiling Remere's Map Editor Sources
      • 🎮OTClient Redemption
        • About
        • Getting Started
          • Android
            • [Android] Compiling OTClient Redemption Sources
          • Linux
            • [Linux] Compiling OTClient Redemption Sources
          • Windows
            • WSL
              • [WSL] Compiling OTClient Redemption Sources
            • Visual Studio
              • [Windows][VC2022][CMake] Compiling OTClient Redemption Sources
              • [Windows][VC2022][Solution] Compiling OTClient Redemption Sources
          • Web
            • [Web] OTClient Redemption
        • Tutorials
          • Basic
            • Client Updater
    • 🔗Downloads
      • 🎮Clients
        • Client 11
        • Client 14
          • Tutorials
            • Client with HexEditorXVI32
            • Client with Notepad++
            • Client with config.ini
            • [Windows] How to change client background
        • OTClientV8
          • About
          • Getting Started
            • Android
              • [Android] Compiling OTClientV8 Sources
            • Linux
              • [Linux] Compiling OTClientV8 Sources
            • Windows
              • WSL
                • [WSL] Compiling OTClientV8 Sources
              • Visual Studio
                • [Windows][VC2022][CMake] Compiling OTClientV8 Sources
                • [Windows][VC2022][Solution] Compiling OTClientV8 Sources
          • Features
            • Health and Mana bar backgrounds
            • HTTP support
            • OTML Improvement
            • Simple cam recorder and player
            • Updater, encryption and compression
            • WebSockets
        • Minimap
      • 📑Codes
        • C++
        • Events
        • Functions
        • Libs
        • Modules
        • Others
      • 🖼️Images
        • PSDs
        • Others
      • 🗺️Maps
        • Custom
        • Global
      • 📑Revscripts
        • Actions
        • CreatureEvents
        • GlobalEvents
        • MoveEvents
        • NPCs
        • Spells
        • Systems
        • TalkActions
      • ⚔️Sprites
      • ⚙️Tools
        • Editors
        • Launchers
          • Canary Launcher
            • About
            • Getting Started
              • Windows
                • [Windows][VC2022][Solution] Compiling Canary Launcher Sources
          • Slender Launcher
            • About
            • Getting Started
              • Windows
                • [Windows][Go] Compiling Slender Launcher Sources
        • Login Server
          • About
          • Getting Started
        • Map Generators
      • 🌐Web Packages
        • Linux
        • Windows
      • 🌐Website Applications
        • Websites
          • CanaryAAC
            • About
            • Informations
              • Features
              • Functions
              • API
              • Routes
              • Middleware
            • CanaryAAC Bot
          • Gesior2012
            • About
          • GesiorAAC Global
            • About
          • MyAAC
            • About
          • MyAAC Global
            • About
          • SlenderAAC
            • About
          • ZnoteAAC
            • About
        • Applications
        • Layouts
        • APIs and SDKs
Powered by GitBook
On this page
  • 1 - Install WSL:
  • 2 - Install a Linux Distribution:
  • 3 - Install the required software:
  • 4 - Download the source code:
  • 5 - Checkout nightly branch (optional):
  • 6 - Folder structure:
  • 7 - Configure and build:
  1. OpenTibiaBR
  2. Projects
  3. OTClient Redemption
  4. Getting Started
  5. Windows
  6. WSL

[WSL] Compiling OTClient Redemption Sources

Last updated 4 months ago

1 - Install WSL:

2 - Install a Linux Distribution:

  • .

  • .

  • .

  • .

3 - 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 -y
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-generic xorg-dev -y

Update cmake:

sudo nano /etc/wsl.conf
- Append these lines:
[boot]
systemd=true
- Save the file.
- Close your WSL distro and run the command below from PowerShell to restart your WSL instances:
wsl.exe --shutdown
- After the restart, open WSL distro again.

sudo apt remove --purge cmake -y
hash -r
sudo apt install snapd -y
sudo snap install cmake --classic
- Close your WSL distro and run the command below from PowerShell to restart your WSL instances:
wsl.exe --shutdown
- After the restart, open WSL distro again.
cmake --version

Update gcc:

- Edit repository file: 
sudo nano /etc/apt/sources.list

- Append these lines to the end:
deb http://deb.debian.org/debian testing main contrib non-free
deb-src http://deb.debian.org/debian testing main contrib non-free
- Save the file.

sudo apt update
sudo apt install gcc-14 -t testing && sudo apt install g++-14 -t testing
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
gcc-14 --version
g++-14 --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 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 -y
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-generic xorg-dev -y

Update cmake:

sudo apt remove --purge cmake -y
hash -r
sudo apt install snapd -y
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-13 g++-13 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
sudo update-alternatives --set gcc /usr/bin/gcc-13
gcc-13 --version
g++-13 --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 -y
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-generic xorg-dev -y

Update cmake:

sudo apt remove --purge cmake -y
hash -r
sudo apt install snapd -y
sudo snap install cmake --classic
cmake --version

Update gcc:

ssudo apt update
sudo apt install gcc-13 g++-13 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
sudo update-alternatives --set gcc /usr/bin/gcc-13
gcc-13 --version
g++-13 --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 -y
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-generic xorg-dev -y

Update cmake:

sudo apt remove --purge cmake -y
hash -r
sudo apt install snapd -y
sudo snap install cmake --classic
cmake --version

Update gcc:

sudo apt update
sudo apt install gcc-14 g++-14 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 --slave /usr/bin/g++ g++ /usr/bin/g++-14 --slave /usr/bin/gcov gcov /usr/bin/gcov-14
sudo update-alternatives --set gcc /usr/bin/gcc-14
gcc-14 --version
g++-14 --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

4 - Download the source code:

git clone --depth 1 https://github.com/mehah/otclient.git
cd otclient

5 - Checkout nightly branch (optional):

git checkout main

6 - Folder structure:

.
├── otclient
└── vcpkg

7 - 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!

🖥️
🎮
https://learn.microsoft.com/en-us/windows/wsl/install
Debian
Ubuntu 20.04
Ubuntu 22.04
Ubuntu 24.04