mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
docs: update README and add build guides (#1717)
Documentation: - Added comprehensive platform-specific compilation guides for Android, Debian, Ubuntu 24.04, Windows (CMake and Visual Studio Solution) and WSL (Debian and Ubuntu 24.04), covering prerequisites, environment setup, dependency management, build workflows and Android APK generation/asset steps. - Updated README: replaced previous build badges with a single CI badge and removed the legacy "Current compiling tutorials" subsection.
This commit is contained in:
parent
06e8d7856a
commit
e0a885c590
8 changed files with 537 additions and 5 deletions
|
|
@ -5,8 +5,7 @@
|
|||
</h1>
|
||||
|
||||
[](https://discord.gg/tUjTBZzMCy)
|
||||
[](https://github.com/mehah/otclient/actions/workflows/build-ubuntu.yml)
|
||||
[](https://github.com/mehah/otclient/actions/workflows/build-windows.yml)
|
||||
[](https://github.com/opentibiabr/otclient/actions/workflows/ci.yml)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
---
|
||||
|
|
@ -509,9 +508,6 @@ This is a fork of edubart's OTClient. The objective of this fork is to develop a
|
|||
- [ ] Compile on Apple devices
|
||||
- [ ] Adapt the UI reusing the existing LUA code
|
||||
|
||||
**Current compiling tutorials**
|
||||
- [Compiling for Android](https://github.com/mehah/otclient/wiki/Compiling-on-Android)
|
||||
|
||||
---
|
||||
|
||||
## <a id="compiling"></a>🔨 Compiling
|
||||
|
|
|
|||
58
docs/compiling/compiling-for-android.md
Normal file
58
docs/compiling/compiling-for-android.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Windows 11
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
To compile for Android, you will need to download and install:
|
||||
- [Git](https://git-scm.com/download/win)
|
||||
- [Android Studio](https://developer.android.com/studio) (compiler)
|
||||
- [vcpkg](https://github.com/Microsoft/vcpkg) (package manager)
|
||||
- [Android Library](https://drive.google.com/file/d/1Uk-EnQG9svz_5YfuiMAGIViJsnDFttRy/view) (dependency)
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
Make sure to follow full installation of `vcpkg`, per [Official Quickstart](https://github.com/Microsoft/vcpkg#quick-start) execute the following in _Powershell_:
|
||||
|
||||
```powershell
|
||||
git clone https://github.com/Microsoft/vcpkg
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
.\vcpkg integrate install
|
||||
```
|
||||
|
||||
## 3. Download the source code and install vcpkg dependencies
|
||||
|
||||
```powershell
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
vcpkg install
|
||||
```
|
||||
|
||||
## 4. Copy the Android Libraries
|
||||
Extract the android libraries inside `android/app/libs` folder.
|
||||
|
||||
## 5. Copy `data.zip` to Android assets
|
||||
Create a `data.zip` file containing the `init.lua`, `mods`, `modules`, `data` and add it to `android/app/src/main/assets`.
|
||||
|
||||
## 6. Create Environment Variables:
|
||||
- `ANDROID_NDK_HOME` pointing to the Android NDK root folder (Ex.: `C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\29.0.13599879`).
|
||||
- `VCPKG_ROOT` pointing to the vcpkg folder.
|
||||
|
||||
## 7. Build
|
||||
|
||||
- Open Android Studio, click to open project and select the `otclient/android` folder.
|
||||
|
||||
- Wait Android Studio synchronize the project and download dependencies.
|
||||
|
||||
- Navigate through the menu, find "Build" and then "Generate Signed App Bundle or APK...".
|
||||
|
||||
- Select "APK" and proceed, create a new key, select it and proceed again.
|
||||
|
||||
- Select "Release" and proceed (Create).
|
||||
|
||||
- Now, just wait for the compilation to complete and you will have the .apk file in otclient-main/android/app/release, ready to play.
|
||||
|
||||
## 8. Video Tutorial (step by step)
|
||||
- https://youtu.be/1HjtL_sF0GE
|
||||
73
docs/compiling/compiling-on-debian.md
Normal file
73
docs/compiling/compiling-on-debian.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Debian
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
The following command will install Git, CMake, a compiler and the libraries used by OTClient.
|
||||
|
||||
Git will be used to download the source code, and CMake will be used to generate the build files.
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
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) -y
|
||||
```
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Configure environment for vcpkg (important)
|
||||
|
||||
To ensure **CMake presets and CLion detect vcpkg automatically without modifying the preset**, export `VCPKG_ROOT` globally for the user:
|
||||
|
||||
```bash
|
||||
echo "VCPKG_ROOT=/home/$USER/vcpkg" | sudo tee -a /etc/environment && source /etc/environment
|
||||
```
|
||||
Now **log out and log in again** (or reboot), then verify:
|
||||
|
||||
```bash
|
||||
echo $VCPKG_ROOT
|
||||
# Expected output:
|
||||
# /home/<user>/vcpkg
|
||||
```
|
||||
Also validate the toolchain file exists:
|
||||
|
||||
```bash
|
||||
test -f "$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" && echo "vcpkg OK" || echo "vcpkg not found"
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
cd otclient
|
||||
```
|
||||
|
||||
## 4. Folder structure
|
||||
|
||||
```bash
|
||||
.
|
||||
├── otclient
|
||||
└── vcpkg
|
||||
```
|
||||
|
||||
## 5. Configure and build
|
||||
|
||||
```bash
|
||||
cmake --preset linux-release -DTOGGLE_BIN_FOLDER=ON
|
||||
cmake --build --preset linux-release -j4
|
||||
```
|
||||
|
||||
> -- 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!**
|
||||
|
||||
---
|
||||
84
docs/compiling/compiling-on-ubuntu-24.04.md
Normal file
84
docs/compiling/compiling-on-ubuntu-24.04.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Ubuntu 24.04
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
The following command will install Git, CMake, a compiler and the libraries used by OTClient.
|
||||
|
||||
Git will be used to download the source code, and CMake will be used to generate the build files.
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
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) -y
|
||||
```
|
||||
|
||||
- Update gcc
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Configure environment for vcpkg (important)
|
||||
|
||||
To ensure **CMake presets and CLion detect vcpkg automatically without modifying the preset**, export `VCPKG_ROOT` globally for the user:
|
||||
|
||||
```bash
|
||||
echo "VCPKG_ROOT=/home/$USER/vcpkg" | sudo tee -a /etc/environment && source /etc/environment
|
||||
```
|
||||
Now **log out and log in again** (or reboot), then verify:
|
||||
|
||||
```bash
|
||||
echo $VCPKG_ROOT
|
||||
# Expected output:
|
||||
# /home/<user>/vcpkg
|
||||
```
|
||||
Also validate the toolchain file exists:
|
||||
|
||||
```bash
|
||||
test -f "$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" && echo "vcpkg OK" || echo "vcpkg not found"
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
cd otclient
|
||||
```
|
||||
|
||||
## 4. Folder structure
|
||||
|
||||
```bash
|
||||
.
|
||||
├── otclient
|
||||
└── vcpkg
|
||||
```
|
||||
|
||||
## 5. Configure and build
|
||||
|
||||
```bash
|
||||
cmake --preset linux-release -DTOGGLE_BIN_FOLDER=ON
|
||||
cmake --build --preset linux-release -j4
|
||||
```
|
||||
|
||||
> -- 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!**
|
||||
|
||||
---
|
||||
64
docs/compiling/compiling-on-windows-(cmake).md
Normal file
64
docs/compiling/compiling-on-windows-(cmake).md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Windows 11
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
To compile on Windows, you will need to download and install:
|
||||
- [Git](https://git-scm.com/download/win)
|
||||
- [Visual Studio 2026 Community](https://visualstudio.microsoft.com/vs/) (compiler and english language pack)
|
||||
- [vcpkg](https://github.com/Microsoft/vcpkg) (package manager)
|
||||
|
||||
You must install **Visual Studio 2026** with the "Desktop development with C++" workload selecting the following components:
|
||||
|
||||
- MSVC Build Tools for x64/x86 (Latest)
|
||||
- C++ ATL for x64/x86 (Latest MSVC)
|
||||
- C++ Build Insights
|
||||
- C++ profiling tools
|
||||
- C++ CMake tools for Windows
|
||||
- Windows 11 SDK
|
||||
|
||||
**Important:** Do not select to install the option "vcpkg package manager" on Visual Studio.
|
||||
|
||||
You must also install the **English** language pack.
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
Make sure to follow full installation of `vcpkg`, per [Official Quickstart](https://github.com/Microsoft/vcpkg#quick-start) execute the following in _Powershell_:
|
||||
|
||||
To open Powershell navigate to your desired directory e.g. `C:\` and choose `Open PowerShell window here` (shift + right click).
|
||||
|
||||
Then you can safely proceed with configuring vcpkg:
|
||||
|
||||
```powershell
|
||||
git clone https://github.com/Microsoft/vcpkg
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
.\vcpkg integrate install
|
||||
```
|
||||
|
||||
Execute the following command in _Powershell_ with Administrator permission to set vcpkg environment variable:
|
||||
|
||||
**Note:** If you cloned vcpkg to a different directory, replace 'C:\vcpkg' in the command below with the correct path.
|
||||
|
||||
```powershell
|
||||
[System.Environment]::SetEnvironmentVariable('VCPKG_ROOT','C:\vcpkg', [System.EnvironmentVariableTarget]::Machine)
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
```powershell
|
||||
cd C:\
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
```
|
||||
|
||||
## 4. Build
|
||||
|
||||
- Open Visual Studio. In "**Get started**", select "**Open a local folder**" and open the otclient main folder.
|
||||
|
||||
- Wait for the Visual Studio to load. It will automatically install the libraries and generate the cmake cache. (Be patient, the first cache may take a few minutes).
|
||||
|
||||
- After the cmake cache is successfully generated, you can compile the otclient by going to the menu **Build** and choose **Build All**.
|
||||
|
||||
---
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Windows 11
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
To compile on Windows, you will need to download and install:
|
||||
- [Git](https://git-scm.com/download/win)
|
||||
- [Visual Studio 2026 Community](https://visualstudio.microsoft.com/vs/) (compiler and english language pack)
|
||||
- [vcpkg](https://github.com/Microsoft/vcpkg) (package manager)
|
||||
|
||||
You must install **Visual Studio 2026** with the "Desktop development with C++" workload selecting the following components:
|
||||
|
||||
- MSVC Build Tools for x64/x86 (Latest)
|
||||
- C++ ATL for x64/x86 (Latest MSVC)
|
||||
- C++ Build Insights
|
||||
- C++ profiling tools
|
||||
- C++ CMake tools for Windows
|
||||
- Windows 11 SDK
|
||||
|
||||
**Important:** Do not select to install the option "vcpkg package manager" on Visual Studio.
|
||||
|
||||
You must also install the **English** language pack.
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
Make sure to follow full installation of `vcpkg`, per [Official Quickstart](https://github.com/Microsoft/vcpkg#quick-start) execute the following in _Powershell_:
|
||||
|
||||
To open Powershell navigate to your desired directory e.g. `C:\` and choose `Open PowerShell window here` (shift + right click).
|
||||
|
||||
Then you can safely proceed with configuring vcpkg:
|
||||
|
||||
```powershell
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
.\vcpkg integrate install
|
||||
```
|
||||
|
||||
Execute the following command in _Powershell_ with Administrator permission to set vcpkg environment variable:
|
||||
|
||||
**Note:** If you cloned vcpkg to a different directory, replace 'C:\vcpkg' in the command below with the correct path.
|
||||
|
||||
```powershell
|
||||
[System.Environment]::SetEnvironmentVariable('VCPKG_ROOT','C:\vcpkg', [System.EnvironmentVariableTarget]::Machine)
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
```powershell
|
||||
cd C:\
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
```
|
||||
|
||||
## 4. Build
|
||||
|
||||
- Open **`vc18\otclient.sln`**. This should launch Visual Studio.
|
||||
|
||||
- Choose build configuration from the drop-downs (DirectX or OpenGL and x64).
|
||||
|
||||
- To start compiling go to the menu Build and choose Build Solution.
|
||||
|
||||
---
|
||||
91
docs/compiling/compiling-on-wsl-debian.md
Normal file
91
docs/compiling/compiling-on-wsl-debian.md
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Windows 11 + WSL2 with Debian
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
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-amd64 xorg-dev -y
|
||||
```
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Configure environment for vcpkg (important)
|
||||
|
||||
To ensure **CMake presets and CLion detect vcpkg automatically without modifying the preset**, export `VCPKG_ROOT` globally for the user:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/environment.d
|
||||
echo 'VCPKG_ROOT=$HOME/vcpkg' > ~/.config/environment.d/10-vcpkg.conf
|
||||
```
|
||||
|
||||
Note: This approach requires systemd. If `systemctl status` shows "unit not found", enable systemd by editing `/etc/wsl.conf` (e.g., `sudo nano /etc/wsl.conf`) and adding:
|
||||
|
||||
```ini
|
||||
[boot]
|
||||
systemd=true
|
||||
```
|
||||
|
||||
Then run `wsl --shutdown` in _Powershell_ and restart WSL.
|
||||
|
||||
Fallback (for non-systemd setups):
|
||||
```bash
|
||||
echo 'export VCPKG_ROOT=$HOME/vcpkg' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Now **log out and log in again** (or reboot), then verify:
|
||||
|
||||
```bash
|
||||
echo $VCPKG_ROOT
|
||||
# Expected output:
|
||||
# /home/<user>/vcpkg
|
||||
```
|
||||
|
||||
Also validate the toolchain file exists:
|
||||
|
||||
```bash
|
||||
test -f "$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" && echo "vcpkg OK" || echo "vcpkg not found"
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
cd otclient
|
||||
```
|
||||
|
||||
## 4. Folder structure
|
||||
|
||||
```bash
|
||||
.
|
||||
├── otclient
|
||||
└── vcpkg
|
||||
```
|
||||
|
||||
## 5. Configure and build
|
||||
|
||||
```bash
|
||||
cmake --preset linux-release -DTOGGLE_BIN_FOLDER=ON
|
||||
cmake --build --preset linux-release -j4
|
||||
```
|
||||
|
||||
> -- 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!**
|
||||
|
||||
---
|
||||
102
docs/compiling/compiling-on-wsl-ubuntu-24.04.md
Normal file
102
docs/compiling/compiling-on-wsl-ubuntu-24.04.md
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
# OTClient Redemption
|
||||
|
||||
## Supported OS
|
||||
|
||||
- Windows 11 + WSL2 with Ubuntu 24.04
|
||||
|
||||
## 1. Install the required software
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
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 gcc
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
## 2. Set up vcpkg
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Configure environment for vcpkg (important)
|
||||
|
||||
To ensure **CMake presets and CLion detect vcpkg automatically without modifying the preset**, export `VCPKG_ROOT` globally for the user:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/environment.d
|
||||
echo 'VCPKG_ROOT=$HOME/vcpkg' > ~/.config/environment.d/10-vcpkg.conf
|
||||
```
|
||||
|
||||
Note: This approach requires systemd. If `systemctl status` shows "unit not found", enable systemd by editing `/etc/wsl.conf` (e.g., `sudo nano /etc/wsl.conf`) and adding:
|
||||
|
||||
```ini
|
||||
[boot]
|
||||
systemd=true
|
||||
```
|
||||
|
||||
Then run `wsl --shutdown` in _Powershell_ and restart WSL.
|
||||
|
||||
Fallback (for non-systemd setups):
|
||||
```bash
|
||||
echo 'export VCPKG_ROOT=$HOME/vcpkg' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Now **log out and log in again** (or reboot), then verify:
|
||||
|
||||
```bash
|
||||
echo $VCPKG_ROOT
|
||||
# Expected output:
|
||||
# /home/<user>/vcpkg
|
||||
```
|
||||
|
||||
Also validate the toolchain file exists:
|
||||
|
||||
```bash
|
||||
test -f "$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" && echo "vcpkg OK" || echo "vcpkg not found"
|
||||
```
|
||||
|
||||
## 3. Download the source code
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/opentibiabr/otclient.git
|
||||
cd otclient
|
||||
```
|
||||
|
||||
## 4. Folder structure
|
||||
|
||||
```bash
|
||||
.
|
||||
├── otclient
|
||||
└── vcpkg
|
||||
```
|
||||
|
||||
## 5. Configure and build
|
||||
|
||||
```bash
|
||||
cmake --preset linux-release -DTOGGLE_BIN_FOLDER=ON
|
||||
cmake --build --preset linux-release -j4
|
||||
```
|
||||
|
||||
> -- 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!**
|
||||
|
||||
---
|
||||
Loading…
Add table
Add a link
Reference in a new issue