Skip to content

Latest commit

 

History

History
executable file
·
184 lines (117 loc) · 4 KB

BUILD-FROM-SOURCE.md

File metadata and controls

executable file
·
184 lines (117 loc) · 4 KB

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

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 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_IOS=0
export BUILD_IOS=1

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.

scripts\languagelist_updater.bat
chmod +x scripts/languagelist_updater.sh
bash scripts/languagelist_updater.sh

Build GLFW Stub

./gradlew :jre_lwjgl3glfw:build
gradle :jre_lwjgl3glfw:build

Build the Launcher

./gradlew.bat :app_pojavlauncher:assembleDebug
./gradlew :app_pojavlauncher:assembleDebug