Compare commits
4 Commits
raylib/v5.
...
raylib/v5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21bb9ab18e | ||
|
|
2341b89849 | ||
|
|
7d158432af | ||
|
|
c81badf4a5 |
@@ -6,10 +6,17 @@ cd "$DIR"
|
|||||||
|
|
||||||
INSTALL_DIR="$DIR/raylib/install"
|
INSTALL_DIR="$DIR/raylib/install"
|
||||||
|
|
||||||
# Idempotent: skip if already built
|
# Idempotent: skip if already fully built
|
||||||
|
# On x86_64 Linux, also require the offscreen variant
|
||||||
|
NEED_OFFSCREEN=0
|
||||||
|
if [[ "$(uname)" == "Linux" && "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
NEED_OFFSCREEN=1
|
||||||
|
fi
|
||||||
if [ -f "$INSTALL_DIR/lib/libraylib.a" ]; then
|
if [ -f "$INSTALL_DIR/lib/libraylib.a" ]; then
|
||||||
|
if [ "$NEED_OFFSCREEN" -eq 0 ] || [ -f "$INSTALL_DIR/lib/libraylib_offscreen.a" ]; then
|
||||||
echo "raylib already present, skipping build."
|
echo "raylib already present, skipping build."
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NJOBS="$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)"
|
NJOBS="$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)"
|
||||||
@@ -83,6 +90,18 @@ cp raylib-src/src/raylib.h raylib-src/src/raymath.h raylib-src/src/rlgl.h "$INST
|
|||||||
# On x86_64 Linux, also build the offscreen variant for CI headless rendering
|
# On x86_64 Linux, also build the offscreen variant for CI headless rendering
|
||||||
if [[ "$(uname)" == "Linux" && "$(uname -m)" == "x86_64" && "$RAYLIB_PLATFORM" != "PLATFORM_OFFSCREEN" ]]; then
|
if [[ "$(uname)" == "Linux" && "$(uname -m)" == "x86_64" && "$RAYLIB_PLATFORM" != "PLATFORM_OFFSCREEN" ]]; then
|
||||||
echo "Building offscreen variant..."
|
echo "Building offscreen variant..."
|
||||||
|
|
||||||
|
# Install EGL/GL dev packages needed for offscreen build + bundling
|
||||||
|
if command -v dnf &>/dev/null; then
|
||||||
|
dnf install -y mesa-libEGL-devel mesa-libGL-devel libglvnd-opengl libglvnd-core-devel 2>/dev/null || true
|
||||||
|
elif command -v apt-get &>/dev/null; then
|
||||||
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
|
apt-get update && apt-get install -y libegl-dev libgl-dev
|
||||||
|
else
|
||||||
|
sudo apt-get update && sudo apt-get install -y libegl-dev libgl-dev
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cd raylib-src/src
|
cd raylib-src/src
|
||||||
make clean
|
make clean
|
||||||
make -j"$NJOBS" PLATFORM=PLATFORM_OFFSCREEN
|
make -j"$NJOBS" PLATFORM=PLATFORM_OFFSCREEN
|
||||||
@@ -92,8 +111,9 @@ if [[ "$(uname)" == "Linux" && "$(uname -m)" == "x86_64" && "$RAYLIB_PLATFORM" !
|
|||||||
# Bundle GLVND dispatchers so offscreen rendering works without extra system packages
|
# Bundle GLVND dispatchers so offscreen rendering works without extra system packages
|
||||||
MESA_DIR="$INSTALL_DIR/lib/mesa"
|
MESA_DIR="$INSTALL_DIR/lib/mesa"
|
||||||
mkdir -p "$MESA_DIR"
|
mkdir -p "$MESA_DIR"
|
||||||
|
ldconfig 2>/dev/null || true
|
||||||
for lib in libEGL.so.1 libOpenGL.so.0 libGLdispatch.so.0; do
|
for lib in libEGL.so.1 libOpenGL.so.0 libGLdispatch.so.0; do
|
||||||
src="$(ldconfig -p 2>/dev/null | grep "$lib" | grep 'x86-64' | awk '{print $NF}' | head -1)"
|
src="$(ldconfig -p 2>/dev/null | grep "$lib" | grep -E 'x86.64|libc6,' | awk '{print $NF}' | head -1)"
|
||||||
if [ -n "$src" ] && [ -f "$src" ]; then
|
if [ -n "$src" ] && [ -f "$src" ]; then
|
||||||
cp -L "$src" "$MESA_DIR/"
|
cp -L "$src" "$MESA_DIR/"
|
||||||
# Create unversioned symlink for the linker
|
# Create unversioned symlink for the linker
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "raylib"
|
name = "raylib"
|
||||||
version = "5.5.0.5"
|
version = "5.5.0.8"
|
||||||
description = "raylib + pyray Python bindings (commaai fork)"
|
description = "raylib + pyray Python bindings (commaai fork)"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
dependencies = ["cffi>=1.17.1"]
|
dependencies = ["cffi>=1.17.1"]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "5.5.0.5"
|
__version__ = "5.5.0.8"
|
||||||
@@ -18,9 +18,12 @@ class BuildRaylib(build_py):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
pkg_dir = os.path.dirname(os.path.abspath(__file__))
|
pkg_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
marker = os.path.join(pkg_dir, "raylib", "install", "lib", "libraylib.a")
|
lib_dir = os.path.join(pkg_dir, "raylib", "install", "lib")
|
||||||
|
marker = os.path.join(lib_dir, "libraylib.a")
|
||||||
|
offscreen_marker = os.path.join(lib_dir, "libraylib_offscreen.a")
|
||||||
|
need_offscreen = platform.system() == "Linux" and platform.machine() == "x86_64"
|
||||||
|
|
||||||
if not os.path.exists(marker):
|
if not os.path.exists(marker) or (need_offscreen and not os.path.exists(offscreen_marker)):
|
||||||
build_script = os.path.join(pkg_dir, "build.sh")
|
build_script = os.path.join(pkg_dir, "build.sh")
|
||||||
subprocess.check_call(["bash", build_script], cwd=pkg_dir)
|
subprocess.check_call(["bash", build_script], cwd=pkg_dir)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user