Skip to content

Commit

Permalink
Linux arm64 build (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
electronstudio authored Sep 29, 2024
1 parent 5903092 commit 4f2d694
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
28 changes: 26 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# download at https://api.cirrus-ci.com/v1/artifact/github/electronstudio/jaylib/main/binary.zip


task:
mac_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
env:
Expand All @@ -24,4 +24,28 @@ task:
- ./build-java.sh
- ./build-native.sh
artifacts:
path: "./*macos*.jar"
path: "./*macos*.jar"

pi_task:
arm_container:
image: dtcooper/raspberrypi-os:python-bullseye
env:
RAYLIB_PLATFORM: linux-arm64
RAYLIB_VERSION: 5.0.0-0
setup_script:
- apt update
- apt -y install openjdk-11-jdk cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
build_raylib_script:
- git submodule update --init --recursive
- cd raylib
- mkdir build
- cd build
- cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j2
- make install
- find /usr/lib
build_script:
- ./build-java.sh
- ./build-native.sh
artifacts:
path: "./*linux*.jar"
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ they are auto-generated. See [How To Build](#how-to-build)

## Platforms

4.5+ release includes binaries for:
5.5+ release includes binaries for:
* Windows x86_64
* Macos x86_64
* Macos ARM64
* Linux x86_64

The 4.2 release included Linux ARM64 for Raspberry Pi, but I no longer have a Pi on which to build them.
* Linux ARM64 (Raspberry Pi Bullseye, 64 bit only, untested)

## Docs

Expand Down
9 changes: 8 additions & 1 deletion src/com/raylib/RaylibConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@
include = {"raylib.h", "rlgl.h", "raymath.h", "physac.h", "raygui.h"},
compiler = {"!default","foo"}
),

@Platform(
value = {"linux-arm64"},
linkpath = {"/usr/lib/aarch64-linux-gnu/"},
link = {"X11", "raylib"},
//includepath = {"/home/richard/jaylib"},
include = {"raylib.h", "rlgl.h", "raymath.h", "physac.h", "raygui.h"},
compiler = {"!default","foo"}
),
@Platform(
value = {"linux-arm"},
linkpath = {"/usr/lib/arm-linux-gnueabihf/"},
Expand Down

0 comments on commit 4f2d694

Please sign in to comment.