Clone
7
How To Build
YZBruh edited this page 2025-10-28 08:50:06 +03:00
Building PMT from source
This guide teaches you how to compile PMT from source. It is aimed at enthusiasts and developers.
Requirements
- Android NDK
- Git, CMake and Ninja packages
- Linux system (any distro, it doesn't matter)
- Patience
Set upping Android NDK
- Download latest Android NDK release from Android Developers.
- Extract the NDK archive you downloaded in a convenient place in the terminal with the following command:
unzip android-ndk-*-linux.zip
- The reason we use the script is that some file managers do not create a direct symbolic link when extracting. For example, dolphin. If we were to use it, NDK's
clangwould not work properly. - Copy the path to the directory that the Android NDK files are in. You'll need it!
Installing required packages
- For
pacmanpackage manager (Arch Linux and Arch Linux based distros):
sudo pacman -S git cmake ninja
- For
dnfpackage manager (Fedora and Fedora based distros):
sudo dnf install git cmake ninja-build
- For
aptpackage manager (Debian/Ubuntu and Debian/Ubuntu based distros):
sudo apt install git cmake ninja-build
- For
zypperpackage manager (OpenSUSE and OpenSUSE based distros):
sudo zypper install git cmake ninja
Downloading PMT from GitHub
- PMT is managed from a single branch. In general, it is always in the development phase. There may be bugs, etc. So my suggestion is to clone the repository via published tags.
# Example: clone 1.1.0 version release tag. You can also look at tags from the repository on GitHub.
git clone -b 20250821 https://git.yzbruh.space/YZBruh/pmt-renovated
- Or you can clone the repository directly (don't specify a branch only with
-b) and switch between tags withgit switch. - Or just to work on or try out the unreleased version that may be in development...
Building PMT with build script
- Enter the cloned repository directory.
- Save the path to the NDK directory you copied earlier to the variable named
ANDROID_NDKusingexport. If you want, you can also addbashrcorzshrcto your files so that you don't repeat the continuous process. For me, the command is like this:
# I extracted it on my desktop.
export ANDROID_NDK="/home/yzbruh/Desktop/Development/android-ndk-r28c"
- Now all you have to do is run build.sh!
bash build.sh build
Extra Notes
- To clean up the compiled files, use the following command:
bash build.sh clean
- To recompile (clean + build), use the following command:
bash build.sh rebuild
- Currently, only
arm64-v8aandarmeabi-v7aare compiled. If you want to compile in other ABIs, etc., you need to edit theTARGET_ABI_LISTstring on line 19 in thebuild.sh. Also, only the following ABIs are supported by the Android NDK:arm64-v8aarmeabi-v7ax86_64x86 - The thread to use is calculated based on:
$(($(nproc) - 2))
# The two threads are not used during compilation to make your computer a little more comfortable. You can also edit it within build.sh if you want
Notes for developers
- I would be glad if you could let me know all the help you can do for PMT by opening a pull request! Your help will always be valuable!