mirror of https://github.com/wayvr-org/wayvr.git
bundle xwayland-satellite with appimage
This commit is contained in:
parent
d6268c0c20
commit
28442ac6a8
|
|
@ -29,6 +29,9 @@ jobs:
|
|||
- name: Cargo Build
|
||||
run: |
|
||||
../.github/workflows/scripts/appimage_build_wlx.sh
|
||||
- name: Build xwayland-satellite
|
||||
run: |
|
||||
../.github/workflows/scripts/appimage_build_satellite.sh
|
||||
- name: Package AppImage
|
||||
run: |
|
||||
../.github/workflows/scripts/appimage_package.sh
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
sudo apt install \
|
||||
xwayland \
|
||||
libxcb1-dev \
|
||||
libxcb-cursor-dev \
|
||||
clang \
|
||||
pkg-config
|
||||
|
||||
git clone https://github.com/Supreeeme/xwayland-satellite.git
|
||||
cd xwayland-satellite
|
||||
|
||||
cargo build --release
|
||||
chmod +x ../target/release/xwayland-satellite
|
||||
cd ..
|
||||
|
||||
cp xwayland-satellite/target/release/xwayland-satellite ${APPDIR}/usr/bin
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
use std::{
|
||||
ffi::OsStr,
|
||||
io::Read,
|
||||
os::unix::net::UnixStream,
|
||||
path::PathBuf,
|
||||
|
|
@ -97,7 +98,7 @@ impl WayVRCompositor {
|
|||
) -> anyhow::Result<Self> {
|
||||
let (wayland_env, listener) = create_wayland_listener()?;
|
||||
|
||||
let xwayland_satellite = Command::new("xwayland-satellite")
|
||||
let xwayland_satellite = Command::new(bundled_executable("xwayland-satellite"))
|
||||
.arg(wayland_env.display_num_string())
|
||||
.env("WAYLAND_DISPLAY", wayland_env.wayland_display_num_string())
|
||||
.spawn()
|
||||
|
|
@ -392,3 +393,11 @@ fn accumulate_discrete_scroll(acc: &mut f32, delta_v120: i32) -> i32 {
|
|||
|
||||
steps
|
||||
}
|
||||
|
||||
/// Runs executable from APPDIR, falling back to PATH
|
||||
fn bundled_executable(name: impl AsRef<std::path::Path>) -> PathBuf {
|
||||
match std::env::var_os("APPDIR") {
|
||||
Some(appdir) => PathBuf::from(appdir).join("usr").join("bin").join(name),
|
||||
None => PathBuf::from(name.as_ref()),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue