mirror of
https://github.com/wayvr-org/wayvr.git
synced 2026-12-04 15:52:28 -08:00
build aarch64 appimage
This commit is contained in:
1 parent
0eab390702
commit
c87bcee358
7 files changed
+84
-21
No files matched your search
@@ -1,6 +1,7 @@
|
||||
name: Build AppImage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
@@ -12,10 +13,17 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
|
||||
jobs:
|
||||
build_appimage:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-24.04
|
||||
arch: x86_64
|
||||
- runner: ubuntu-24.04-arm
|
||||
arch: aarch64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./wayvr
|
||||
@@ -38,5 +46,5 @@ jobs:
|
||||
- name: Upload AppImage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: WayVR-${{ github.ref_name }}-x86_64.AppImage
|
||||
path: ./wayvr/WayVR-x86_64.AppImage
|
||||
name: WayVR-${{ github.ref_name }}-${{ matrix.arch }}.AppImage
|
||||
path: ./wayvr/WayVR-${{ matrix.arch }}.AppImage
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
sudo apt install \
|
||||
sudo apt-get install -y \
|
||||
xwayland \
|
||||
libxcb1-dev \
|
||||
libxcb-cursor-dev \
|
||||
@@ -11,7 +12,7 @@ git clone https://github.com/Supreeeme/xwayland-satellite.git
|
||||
cd xwayland-satellite
|
||||
|
||||
cargo build --release
|
||||
chmod +x ../target/release/xwayland-satellite
|
||||
chmod +x target/release/xwayland-satellite
|
||||
cd ..
|
||||
|
||||
cp xwayland-satellite/target/release/xwayland-satellite ${APPDIR}/usr/bin
|
||||
cp xwayland-satellite/target/release/xwayland-satellite "${APPDIR}/usr/bin"
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cargo build --release
|
||||
chmod +x ../target/release/wayvr
|
||||
cp ../target/release/wayvr ${APPDIR}/usr/bin
|
||||
cp ../target/release/wayvr "${APPDIR}/usr/bin"
|
||||
@@ -1,4 +1,30 @@
|
||||
#!/bin/sh
|
||||
export VERSION=$GITHUB_REF_NAME
|
||||
./linuxdeploy-x86_64.AppImage -dwayvr.desktop -iwayvr.png --appdir=${APPDIR} --output appimage --exclude-library '*libpipewire*'
|
||||
mv WayVR-$VERSION-x86_64.AppImage WayVR-x86_64.AppImage
|
||||
set -eu
|
||||
|
||||
case "$(uname -m)" in
|
||||
x86_64|amd64)
|
||||
APPIMAGE_ARCH=x86_64
|
||||
;;
|
||||
aarch64|arm64)
|
||||
APPIMAGE_ARCH=aarch64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $(uname -m)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
LINUXDEPLOY="linuxdeploy-${APPIMAGE_ARCH}.AppImage"
|
||||
VERSION="${GITHUB_REF_NAME:-dev}"
|
||||
export VERSION
|
||||
|
||||
echo "Packaging AppImage for ${APPIMAGE_ARCH}"
|
||||
|
||||
"./${LINUXDEPLOY}" \
|
||||
-dwayvr.desktop \
|
||||
-iwayvr.png \
|
||||
--appdir="${APPDIR}" \
|
||||
--output appimage \
|
||||
--exclude-library '*libpipewire*'
|
||||
|
||||
mv "WayVR-${VERSION}-${APPIMAGE_ARCH}.AppImage" "WayVR-${APPIMAGE_ARCH}.AppImage"
|
||||
@@ -1,17 +1,39 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
case "$(uname -m)" in
|
||||
x86_64|amd64)
|
||||
APPIMAGE_ARCH=x86_64
|
||||
;;
|
||||
aarch64|arm64)
|
||||
APPIMAGE_ARCH=aarch64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $(uname -m)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
LINUXDEPLOY="linuxdeploy-${APPIMAGE_ARCH}.AppImage"
|
||||
|
||||
echo "Preparing AppImage environment for ${APPIMAGE_ARCH}"
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y fuse cmake pkg-config fontconfig libasound2-dev libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon-x11-dev \
|
||||
libopenxr-dev libfontconfig-dev libdbus-1-dev libpipewire-0.3-0 libpipewire-0.3-dev libspa-0.2-dev libx11-6 libxext6 libxrandr2 \
|
||||
libx11-dev libxext-dev libxrandr-dev libopenvr-dev libopenvr-api1 libwayland-dev libegl-dev libxcb-glx0 libxcb-glx0-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libopenvr-dev libopenvr-api1t64 libwayland-dev libegl-dev libxcb-glx0 libxcb-glx0-dev \
|
||||
dav1d libdav1d-dev libvulkan-dev glslc vulkan-tools libudev-dev libudev1 libinput-dev libinput10
|
||||
|
||||
rustup update
|
||||
|
||||
if [ "$APPDIR" != "" ]; then
|
||||
test -f linuxdeploy-x86_64.AppImage || wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
if [ -n "${APPDIR:-}" ]; then
|
||||
if [ ! -f "$LINUXDEPLOY" ]; then
|
||||
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/${LINUXDEPLOY}"
|
||||
fi
|
||||
chmod +x "$LINUXDEPLOY"
|
||||
|
||||
test -d ${APPDIR} && rm -rf ${APPDIR}
|
||||
mkdir -p ${APPDIR}/usr/bin
|
||||
if [ -d "$APPDIR" ]; then
|
||||
rm -rf "$APPDIR"
|
||||
fi
|
||||
mkdir -p "$APPDIR/usr/bin"
|
||||
fi
|
||||
@@ -274,9 +274,6 @@ fn auto_run(args: Args, used_backend: &mut Option<XrBackend>) {
|
||||
|
||||
#[cfg(not(any(feature = "openvr", feature = "openxr")))]
|
||||
compile_error!("No VR support! Enable either openvr or openxr features!");
|
||||
|
||||
#[cfg(not(any(feature = "wayland", feature = "x11")))]
|
||||
compile_error!("No desktop support! Enable either wayland or x11 features!");
|
||||
}
|
||||
|
||||
#[allow(dead_code, unused_variables)]
|
||||
|
||||
@@ -95,6 +95,13 @@ pub fn create_screens(app: &mut AppState) -> anyhow::Result<(ScreenCreateData, D
|
||||
|
||||
return Ok((x11::create_screens_xshm(app)?, DesktopBackend::X11));
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "x11"))]
|
||||
anyhow::bail!("No backends left to try.")
|
||||
{
|
||||
log::info!("Starting in headless mode.");
|
||||
Ok((
|
||||
ScreenCreateData { screens: vec![] },
|
||||
DesktopBackend::Headless,
|
||||
))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user