mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-11 18:50:10 +00:00
fix: xrizer deps
This commit is contained in:
parent
d0df943e48
commit
4709a50483
3 changed files with 70 additions and 2 deletions
|
@ -6,6 +6,7 @@ pub mod mercury_deps;
|
||||||
pub mod monado_deps;
|
pub mod monado_deps;
|
||||||
pub mod openhmd_deps;
|
pub mod openhmd_deps;
|
||||||
pub mod wivrn_deps;
|
pub mod wivrn_deps;
|
||||||
|
pub mod xrizer_deps;
|
||||||
|
|
||||||
use crate::linux_distro::LinuxDistro;
|
use crate::linux_distro::LinuxDistro;
|
||||||
use std::{collections::HashMap, env, fmt::Display, path::Path};
|
use std::{collections::HashMap, env, fmt::Display, path::Path};
|
||||||
|
|
57
src/depcheck/xrizer_deps.rs
Normal file
57
src/depcheck/xrizer_deps.rs
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
use super::{DepType, Dependency, DependencyCheckResult};
|
||||||
|
use crate::linux_distro::LinuxDistro;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
fn xrizer_deps() -> Vec<Dependency> {
|
||||||
|
vec![
|
||||||
|
Dependency {
|
||||||
|
name: "glslc".into(),
|
||||||
|
dep_type: DepType::Executable,
|
||||||
|
filename: "glslc".into(),
|
||||||
|
packages: HashMap::from([
|
||||||
|
(LinuxDistro::Arch, "shaderc".into()),
|
||||||
|
(LinuxDistro::Debian, "glslc".into()),
|
||||||
|
(LinuxDistro::Fedora, "glslc".into()),
|
||||||
|
(LinuxDistro::Alpine, "glslc".into()),
|
||||||
|
(LinuxDistro::Gentoo, "dev-util/glslang".into()),
|
||||||
|
(LinuxDistro::Suse, "shaderc".into()),
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
Dependency {
|
||||||
|
name: "libxcb-glx".into(),
|
||||||
|
dep_type: DepType::Include,
|
||||||
|
filename: "xcb/glx.h".into(),
|
||||||
|
packages: HashMap::from([
|
||||||
|
(LinuxDistro::Arch, "libxcb".into()),
|
||||||
|
(LinuxDistro::Debian, "libxcb-glx0-dev".into()),
|
||||||
|
(LinuxDistro::Fedora, "libxcb-devel".into()),
|
||||||
|
(LinuxDistro::Gentoo, "x11-libs/libxcb".into()),
|
||||||
|
(LinuxDistro::Suse, "libxcb-devel".into()),
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
Dependency {
|
||||||
|
name: "libclang".into(),
|
||||||
|
dep_type: DepType::SharedObject,
|
||||||
|
filename: "libclang.so".into(),
|
||||||
|
packages: HashMap::from([
|
||||||
|
(LinuxDistro::Arch, "clang".into()),
|
||||||
|
(LinuxDistro::Debian, "libclang-19-dev".into()),
|
||||||
|
(LinuxDistro::Fedora, "clang19-devel".into()),
|
||||||
|
(LinuxDistro::Gentoo, "llvm-core/clang-runtime".into()),
|
||||||
|
(LinuxDistro::Suse, "clang19-devel".into()),
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn check_xrizer_deps() -> Vec<DependencyCheckResult> {
|
||||||
|
Dependency::check_many(xrizer_deps())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_missing_xrizer_deps() -> Vec<Dependency> {
|
||||||
|
check_xrizer_deps()
|
||||||
|
.iter()
|
||||||
|
.filter(|res| !res.found)
|
||||||
|
.map(|res| res.dependency.clone())
|
||||||
|
.collect()
|
||||||
|
}
|
|
@ -2,7 +2,8 @@ use crate::{
|
||||||
depcheck::{
|
depcheck::{
|
||||||
basalt_deps::get_missing_basalt_deps, libsurvive_deps::get_missing_libsurvive_deps,
|
basalt_deps::get_missing_basalt_deps, libsurvive_deps::get_missing_libsurvive_deps,
|
||||||
mercury_deps::get_missing_mercury_deps, monado_deps::get_missing_monado_deps,
|
mercury_deps::get_missing_mercury_deps, monado_deps::get_missing_monado_deps,
|
||||||
openhmd_deps::get_missing_openhmd_deps, wivrn_deps::get_missing_wivrn_deps, Dependency,
|
openhmd_deps::get_missing_openhmd_deps, wivrn_deps::get_missing_wivrn_deps,
|
||||||
|
xrizer_deps::get_missing_xrizer_deps, Dependency,
|
||||||
},
|
},
|
||||||
file_builders::active_runtime_json::ActiveRuntime,
|
file_builders::active_runtime_json::ActiveRuntime,
|
||||||
paths::{get_data_dir, BWRAP_SYSTEM_PREFIX, SYSTEM_PREFIX},
|
paths::{get_data_dir, BWRAP_SYSTEM_PREFIX, SYSTEM_PREFIX},
|
||||||
|
@ -282,6 +283,15 @@ impl OvrCompatibilityModuleType {
|
||||||
pub fn iter() -> Iter<'static, Self> {
|
pub fn iter() -> Iter<'static, Self> {
|
||||||
[Self::Opencomposite, Self::Xrizer, Self::Vapor].iter()
|
[Self::Opencomposite, Self::Xrizer, Self::Vapor].iter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_missing_deps(&self) -> Vec<Dependency> {
|
||||||
|
match self {
|
||||||
|
OvrCompatibilityModuleType::Xrizer => get_missing_xrizer_deps(),
|
||||||
|
OvrCompatibilityModuleType::Opencomposite | OvrCompatibilityModuleType::Vapor => {
|
||||||
|
Vec::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromStr for OvrCompatibilityModuleType {
|
impl FromStr for OvrCompatibilityModuleType {
|
||||||
|
@ -737,7 +747,7 @@ impl Profile {
|
||||||
if self.features.mercury_enabled {
|
if self.features.mercury_enabled {
|
||||||
missing_deps.extend(get_missing_mercury_deps());
|
missing_deps.extend(get_missing_mercury_deps());
|
||||||
}
|
}
|
||||||
// no listed deps for opencomp
|
missing_deps.extend(self.ovr_comp.mod_type.get_missing_deps());
|
||||||
}
|
}
|
||||||
missing_deps.sort_unstable();
|
missing_deps.sort_unstable();
|
||||||
missing_deps.dedup(); // dedup only works if sorted, hence the above
|
missing_deps.dedup(); // dedup only works if sorted, hence the above
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue