# 通过源代码构建

  • Even though it is well-explained, building from source requires skill, internet and time.

  • You can try building on Android with Termux (opens new window), 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

# Android

  • Clone the git repository of PojavLauncherTeam/android-openjdk-build-multiarch
git clone https://github.com/PojavLauncherTeam/android-openjdk-build-multiarch
  • Change the directory to the cloned repository
cd android-openjdk-build-multiarch
  • Download Android NDK r10e from here (opens new window) 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

# 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)

  • Android
  • iOS
export BUILD_IOS=0

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.

  • Windows
  • Linux/MacOS
scripts\languagelist_updater.bat

# Build GLFW Stub

  • Windows
  • Linux/MacOS
./gradlew :jre_lwjgl3glfw:build

# Build the Launcher

  • Windows
  • Linux/MacOS
./gradlew.bat :app_pojavlauncher:assembleDebug