From e46e13197f0fd80a9cd114393e67981cc543338a Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Sat, 3 Jun 2023 20:05:41 +0200 Subject: [PATCH] feat: check for monado dependencies --- src/dependencies/mod.rs | 3 ++ src/dependencies/monado_deps.rs | 70 +++++++++++++++++++++++++++++++++ src/main.rs | 1 + 3 files changed, 74 insertions(+) create mode 100644 src/dependencies/mod.rs create mode 100644 src/dependencies/monado_deps.rs diff --git a/src/dependencies/mod.rs b/src/dependencies/mod.rs new file mode 100644 index 0000000..5ac5b3a --- /dev/null +++ b/src/dependencies/mod.rs @@ -0,0 +1,3 @@ + +pub mod monado_deps; + diff --git a/src/dependencies/monado_deps.rs b/src/dependencies/monado_deps.rs new file mode 100644 index 0000000..d7b4e95 --- /dev/null +++ b/src/dependencies/monado_deps.rs @@ -0,0 +1,70 @@ +use crate::depcheck::{check_dependency, DepType, Dependency, DependencyCheckResult, check_dependencies}; + +pub fn monado_deps() -> Vec { + vec![ + Dependency { + name: "libdrm".into(), + dep_type: DepType::SharedObject, + filename: "libdrm.so".into(), + }, + Dependency { + name: "libgl".into(), + dep_type: DepType::SharedObject, + filename: "libdrm.so".into(), + }, + Dependency { + name: "openxr".into(), + dep_type: DepType::SharedObject, + filename: "libopenxr_loader.so".into(), + }, + Dependency { + name: "vulkan-icd-loader".into(), + dep_type: DepType::SharedObject, + filename: "libvulkan.so".into(), + }, + Dependency { + name: "wayland".into(), + dep_type: DepType::SharedObject, + filename: "libwayland-client.so".into(), + }, + Dependency { + name: "cmake".into(), + dep_type: DepType::Executable, + filename: "cmake".into(), + }, + Dependency { + name: "eigen".into(), + dep_type: DepType::Include, + filename: "eigen3/Eigen/src/Core/EigenBase.h".into(), + }, + Dependency { + name: "git".into(), + dep_type: DepType::Executable, + filename: "git".into(), + }, + Dependency { + name: "ninja".into(), + dep_type: DepType::Executable, + filename: "ninja".into(), + }, + Dependency { + name: "shaderc".into(), + dep_type: DepType::Executable, + filename: "glslc".into(), + }, + Dependency { + name: "vulkan-headers".into(), + dep_type: DepType::Include, + filename: "vulkan/vulkan.h".into(), + }, + Dependency { + name: "vulkan-headers".into(), + dep_type: DepType::Include, + filename: "vulkan/vulkan.h".into(), + }, + ] +} + +pub fn check_monado_deps() -> Vec { + check_dependencies(monado_deps()) +} diff --git a/src/main.rs b/src/main.rs index 7134386..f57115c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,6 +9,7 @@ pub mod constants; pub mod file_utils; pub mod profiles; pub mod depcheck; +pub mod dependencies; fn main() { MainWin::run(Settings::default());