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
|
- name: Cargo Build
|
||||||
run: |
|
run: |
|
||||||
../.github/workflows/scripts/appimage_build_wlx.sh
|
../.github/workflows/scripts/appimage_build_wlx.sh
|
||||||
|
- name: Build xwayland-satellite
|
||||||
|
run: |
|
||||||
|
../.github/workflows/scripts/appimage_build_satellite.sh
|
||||||
- name: Package AppImage
|
- name: Package AppImage
|
||||||
run: |
|
run: |
|
||||||
../.github/workflows/scripts/appimage_package.sh
|
../.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::{
|
use std::{
|
||||||
|
ffi::OsStr,
|
||||||
io::Read,
|
io::Read,
|
||||||
os::unix::net::UnixStream,
|
os::unix::net::UnixStream,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
|
|
@ -97,7 +98,7 @@ impl WayVRCompositor {
|
||||||
) -> anyhow::Result<Self> {
|
) -> anyhow::Result<Self> {
|
||||||
let (wayland_env, listener) = create_wayland_listener()?;
|
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())
|
.arg(wayland_env.display_num_string())
|
||||||
.env("WAYLAND_DISPLAY", wayland_env.wayland_display_num_string())
|
.env("WAYLAND_DISPLAY", wayland_env.wayland_display_num_string())
|
||||||
.spawn()
|
.spawn()
|
||||||
|
|
@ -392,3 +393,11 @@ fn accumulate_discrete_scroll(acc: &mut f32, delta_v120: i32) -> i32 {
|
||||||
|
|
||||||
steps
|
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