Path: blob/main/markdown/wiki/getting_started/BUILD-FROM-SOURCE.md
1450 views
Building from source
Even though it is well-explained, building from source requires skill, internet and time.
You can try building on Android with Termux, but no support will be included for it.
It is recommended to clone the PojavLauncher repository before starting Setting Up JRE
git clone https://github.com/PojavLauncherTeam/PojavLauncher
Setting up JRE
You can download it from CI Auto Builds if you don't want to/can't build.
Android
Clone the git repository of PojavLauncherTeam/android-openjdk-build-multiarch
Change the directory to the cloned repository
Download Android NDK r10e from here and place it in this directory with a file explorer. (Can't automatically download because of EULA)
::: warning Do not attempt to build using a newer or older NDK, it will lead to compilation errors. :::
iOS
Get the latest Xcode (tested with Xcode 12).
Platform and architecture specific environment variables
| Platform | Architecture | Target | Target_JDK |
|---|---|---|---|
| Android | armv8/aarch64 | aarch64-linux-android | aarch64 |
| Android | armv7/aarch32 | arm-linux-androideabi | arm |
| Android | x86/i686 | i686-linux-android | x86 |
| Android | x86_64/amd64 | x86_64-linux-android | x86_64 |
| iOS/iPadOS | armv8/aarch64 | aarch64-macos-ios | aarch64 |
Building JRE (Java Runtime Environment)
export BUILD_FREETYPE_VERSION=[2.10.4]
::: tip You can use versions between 2.6.2 and 2.10.4 but 2.10.4 is preferred. :::
export JDK_DEBUG_LEVEL=[release]
::: tip You can use release, fastdebug and debug, but release is preferred :::
export JVM_VARIANTS=[client]
::: tip You can use client and server variants, Client is for aarch32 and server is for other architectures :::
(Android only)
./extractndk.sh
./maketoolchain.sh
Get CUPS, Freetype and build Freetype
./getlibs.sh
./buildlibs.sh
Clone JDK, run once
./clonejdk.sh
Configure JDK and build
./buildjdk.sh
::: tip If no configuration is changed, run sh makejdkwithoutconfigure.sh instead :::
Pack the built JDK
./removejdkdebuginfo.sh
./tarjdk.sh
LWJGL
Coming soon
Building the Launcher
Updating translations
Updating translations is easier thanks to language list updater scripts
Just run this command and it'll be automatically updated from Crowdin.