mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-19 18:49:19 +01:00
1.2 KiB
1.2 KiB
How to compile LWJGL2 for Apple Silicon
LWJGL2 does not provide official native ARM support, therefore Ocelot uses a specially modified version by shadowfacts
Article: https://shadowfacts.net/2022/lwjgl-arm64/
Repository: https://github.com/shadowfacts/lwjgl2-arm64
This procedure is completely optional, as the precompiled library is already checked into the repository at lib/native/liblwjgl-arm64.dylib
Compilation
This assumes that you are running macOS on Apple Silicon (cross-compiling LWJGL seems to be impossible)
- Acquire a JDK8 built for ARM - for example, Zulu 8 JDK, and add it to your
JAVA_HOME - Get
mavenandant- you may install them viabrew, but be careful, as they will try to install a JDK as a dependency - Clone the LWJGL repository:
% git clone https://github.com/shadowfacts/lwjgl-arm64.git
- Run the following commands in the repo:
% ant generate-all
% ant jars
% ant compile-native
- Copy the compiled library from
libs/macosx/liblwjgl.dylibinto theocelot-desktopproject aslib/native/liblwjgl-arm64.dylib