From 9e90a9347e7ac99845269b3d7a572b09535b165e Mon Sep 17 00:00:00 2001 From: YZBruh Date: Tue, 28 Oct 2025 08:50:06 +0300 Subject: [PATCH] Update How To Build --- How-To-Build.md | 170 ++++++++++++++++++++++++------------------------ 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/How-To-Build.md b/How-To-Build.md index 937ae97..d1f769b 100644 --- a/How-To-Build.md +++ b/How-To-Build.md @@ -1,85 +1,85 @@ -## 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](https://developer.android.com/ndk/downloads). - - Extract the NDK archive you downloaded in a convenient place in the terminal with the following command: -```bash -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 `clang` would not work properly. - - Copy the path to the directory that the Android NDK files are in. You'll need it! - ---- - -### Installing required packages - - For `pacman` package manager (Arch Linux and Arch Linux based distros): -```bash -sudo pacman -S git cmake ninja -``` - - For `dnf` package manager (Fedora and Fedora based distros): -```bash -sudo dnf install git cmake ninja-build -``` - - For `apt` package manager (Debian/Ubuntu and Debian/Ubuntu based distros): -```bash -sudo apt install git cmake ninja-build -``` - - For `zypper` package manager (OpenSUSE and OpenSUSE based distros): -```bash -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. -```bash -# Example: clone 1.1.0 version release tag. You can also look at tags from the repository on GitHub. -git clone -b 20250821 https://github.com/ShawkTeam/pmt-renovated -``` - - Or you can clone the repository directly (don't specify a branch only with `-b`) and switch between tags with `git 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_NDK` using `export`. If you want, you can also add `bashrc` or `zshrc` to your files so that you don't repeat the continuous process. For me, the command is like this: -```bash -# 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 -bash build.sh build -``` - ---- - -#### Extra Notes - - To clean up the compiled files, use the following command: -```bash -bash build.sh clean -``` - - To recompile (clean + build), use the following command: -```bash -bash build.sh rebuild -``` - - Currently, only `arm64-v8a` and `armeabi-v7a` are compiled. If you want to compile in other ABIs, etc., you need to edit the `TARGET_ABI_LIST` string on line 19 in the `build.sh`. Also, only the following ABIs are supported by the Android NDK: `arm64-v8a` `armeabi-v7a` `x86_64` `x86` - - The thread to use is calculated based on: -```bash -$(($(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! +## 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](https://developer.android.com/ndk/downloads). + - Extract the NDK archive you downloaded in a convenient place in the terminal with the following command: +```bash +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 `clang` would not work properly. + - Copy the path to the directory that the Android NDK files are in. You'll need it! + +--- + +### Installing required packages + - For `pacman` package manager (Arch Linux and Arch Linux based distros): +```bash +sudo pacman -S git cmake ninja +``` + - For `dnf` package manager (Fedora and Fedora based distros): +```bash +sudo dnf install git cmake ninja-build +``` + - For `apt` package manager (Debian/Ubuntu and Debian/Ubuntu based distros): +```bash +sudo apt install git cmake ninja-build +``` + - For `zypper` package manager (OpenSUSE and OpenSUSE based distros): +```bash +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. +```bash +# 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 with `git 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_NDK` using `export`. If you want, you can also add `bashrc` or `zshrc` to your files so that you don't repeat the continuous process. For me, the command is like this: +```bash +# 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 +bash build.sh build +``` + +--- + +#### Extra Notes + - To clean up the compiled files, use the following command: +```bash +bash build.sh clean +``` + - To recompile (clean + build), use the following command: +```bash +bash build.sh rebuild +``` + - Currently, only `arm64-v8a` and `armeabi-v7a` are compiled. If you want to compile in other ABIs, etc., you need to edit the `TARGET_ABI_LIST` string on line 19 in the `build.sh`. Also, only the following ABIs are supported by the Android NDK: `arm64-v8a` `armeabi-v7a` `x86_64` `x86` + - The thread to use is calculated based on: +```bash +$(($(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!