mirror of
https://github.com/ClassicWasTaken/HaloCE-SteamFrame.git
synced 2026-10-23 06:00:26 +02:00
41 lines
2.0 KiB
Bash
41 lines
2.0 KiB
Bash
#!/bin/bash
|
|
# Runs as root ONLY inside an unprivileged, rootless Podman container.
|
|
set -euo pipefail
|
|
cd /build
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
export NINJA_STATUS='[%f/%t] '
|
|
phase() { printf 'HFI_BUILD_PHASE %s %s\n' "$1" "$2"; }
|
|
phase dependencies 'Installing isolated ARM64 build dependencies...'
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends ca-certificates curl gnupg git python3 \
|
|
ninja-build cmake make pkg-config ccache file \
|
|
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxfixes-dev \
|
|
libxtst-dev libxkbcommon-dev libwayland-dev wayland-protocols libegl-dev libgles-dev \
|
|
libgl-dev libdrm-dev libgbm-dev libpulse-dev libpipewire-0.3-dev libasound2-dev \
|
|
libudev-dev libdbus-1-dev libdecor-0-dev
|
|
# The upstream ARM64 ILP32 guest needs recent LLVM. Use LLVM's signed apt repository.
|
|
phase toolchain 'Downloading and installing the LLVM 22 ARM64 compiler...'
|
|
curl --fail --silent --show-error --location https://apt.llvm.org/llvm-snapshot.gpg.key \
|
|
-o /build/llvm-archive-key.asc
|
|
gpg --batch --yes --dearmor --output /usr/share/keyrings/llvm-archive-keyring.gpg \
|
|
/build/llvm-archive-key.asc
|
|
printf '%s\n' 'deb [arch=arm64 signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/jammy/ llvm-toolchain-jammy-22 main' \
|
|
> /etc/apt/sources.list.d/llvm22.list
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends clang-22 lld-22 llvm-22
|
|
for tool in clang ld.lld llvm-ar; do
|
|
ln -sf "/usr/bin/$tool-22" "/usr/local/bin/$tool"
|
|
done
|
|
clang --version
|
|
cd /build/src
|
|
phase configure 'Configuring the native ARM64 OpenXR game and downloading its build sources...'
|
|
python3 configure.py --release --vr --linux-arm64-cc clang
|
|
export CMAKE_BUILD_PARALLEL_LEVEL=4
|
|
export NINJAFLAGS=-j4
|
|
phase sdl 'Configuring and compiling SDL3; the native game build follows...'
|
|
# The monitor reads SDL's own logs and advances to compile on native Ninja jobs.
|
|
ninja -j4 linux_arm64
|
|
phase build-check 'Checking the completed native ARM64 VR executable...'
|
|
file build/linux_arm64/halo
|
|
echo 'Native ARM64 VR build completed.'
|