mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-07-28 11:48:53 +00:00
feat: basalt dependencies and dummy build script
This commit is contained in:
parent
e905fa7569
commit
d1eadcd912
7 changed files with 132 additions and 4 deletions
21
scripts/build_basalt.sh
Normal file
21
scripts/build_basalt.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ev
|
||||
|
||||
echo "Basalt is currently unsupported"
|
||||
exit 1
|
||||
#
|
||||
# REPO_DIR=$1
|
||||
#
|
||||
# PREFIX=$2
|
||||
#
|
||||
# if [[ -z $REPO_DIR ]] || [[ -z $PREFIX ]]; then
|
||||
# echo "Usage: $0 REPO_DIR PREFIX"
|
||||
# exit 1
|
||||
# fi
|
||||
#
|
||||
# "$(dirname -- "$0")/_clone_or_pull.sh" "https://github.com/cntools/libsurvive" "$REPO_DIR"
|
||||
#
|
||||
# cd "$REPO_DIR"
|
||||
# mkdir -p build
|
||||
# cd build
|
|
@ -1,4 +1,5 @@
|
|||
install_data('_clone_or_pull.sh', install_dir: pkgdatadir / 'scripts')
|
||||
install_data('build_basalt.sh', install_dir: pkgdatadir / 'scripts')
|
||||
install_data('build_libsurvive.sh', install_dir: pkgdatadir / 'scripts')
|
||||
install_data('build_monado.sh', install_dir: pkgdatadir / 'scripts')
|
||||
install_data('build_opencomposite.sh', install_dir: pkgdatadir / 'scripts')
|
||||
|
|
17
src/builders/build_basalt.rs
Normal file
17
src/builders/build_basalt.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use expect_dialog::ExpectDialog;
|
||||
|
||||
use crate::{constants::PKG_DATA_DIR, profile::Profile, runner::Runner};
|
||||
|
||||
pub fn get_build_basalt_runner(profile: Profile) -> Runner {
|
||||
let runner = Runner::new(
|
||||
None,
|
||||
format!("{sysdata}/scripts/build_basalt.sh", sysdata = PKG_DATA_DIR),
|
||||
vec![
|
||||
profile
|
||||
.basalt_path
|
||||
.expect_dialog("Missing basalt path for given profile"),
|
||||
profile.prefix,
|
||||
],
|
||||
);
|
||||
runner
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
pub mod build_monado;
|
||||
pub mod build_libsurvive;
|
||||
pub mod build_opencomposite;
|
||||
pub mod build_basalt;
|
||||
|
|
85
src/dependencies/basalt_deps.rs
Normal file
85
src/dependencies/basalt_deps.rs
Normal file
|
@ -0,0 +1,85 @@
|
|||
use crate::depcheck::{check_dependencies, Dependency, DependencyCheckResult, DepType};
|
||||
|
||||
fn basalt_deps() -> Vec<Dependency> {
|
||||
vec![
|
||||
Dependency {
|
||||
name: "boost".into(),
|
||||
dep_type: DepType::SharedObject,
|
||||
// just one of the many shared objects boost provides
|
||||
filename: "libboost_system.so".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "boost-dev".into(),
|
||||
dep_type: DepType::Include,
|
||||
// just one of the many headers boost provides
|
||||
filename: "boost/filesystem.hpp".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "bzip2".into(),
|
||||
dep_type: DepType::SharedObject,
|
||||
filename: "libbz2.so".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "bzip2-dev".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "bzlib.h".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "eigen".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "eigen3/Eigen/src/Core/EigenBase.h".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "fmt".into(),
|
||||
dep_type: DepType::SharedObject,
|
||||
filename: "libfmt.so".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "fmt-dev".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "fmt/core.h".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "glew".into(),
|
||||
dep_type: DepType::SharedObject,
|
||||
filename: "libGLEW.so".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "glew-dev".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "GL/glew.h".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "gtest".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "gtest/gtest.h".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "opencv".into(),
|
||||
dep_type: DepType::Include,
|
||||
filename: "opencv4/opencv2/core/hal/hal.hpp".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "python3".into(),
|
||||
dep_type: DepType::Executable,
|
||||
filename: "python3".into(),
|
||||
},
|
||||
Dependency {
|
||||
name: "bc".into(),
|
||||
dep_type: DepType::Executable,
|
||||
filename: "bc".into(),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn check_basalt_deps() -> Vec<DependencyCheckResult> {
|
||||
check_dependencies(basalt_deps())
|
||||
}
|
||||
|
||||
pub fn get_missing_basalt_deps() -> Vec<Dependency> {
|
||||
check_basalt_deps()
|
||||
.iter()
|
||||
.filter(|res| !res.found)
|
||||
.map(|res| res.dependency.clone())
|
||||
.collect()
|
||||
}
|
|
@ -1,2 +1,3 @@
|
|||
pub mod monado_deps;
|
||||
pub mod libsurvive_deps;
|
||||
pub mod basalt_deps;
|
||||
|
|
|
@ -3,11 +3,13 @@ use super::build_window::{BuildStatus, BuildWindow};
|
|||
use super::debug_view::{DebugView, DebugViewMsg};
|
||||
use super::libsurvive_setup_window::LibsurviveSetupWindow;
|
||||
use super::main_view::MainViewMsg;
|
||||
use crate::builders::build_basalt::get_build_basalt_runner;
|
||||
use crate::builders::build_libsurvive::get_build_libsurvive_runner;
|
||||
use crate::builders::build_monado::get_build_monado_runner;
|
||||
use crate::builders::build_opencomposite::get_build_opencomposite_runner;
|
||||
use crate::config::{get_config, save_config, Config};
|
||||
use crate::constants::APP_NAME;
|
||||
use crate::dependencies::basalt_deps::get_missing_basalt_deps;
|
||||
use crate::dependencies::libsurvive_deps::get_missing_libsurvive_deps;
|
||||
use crate::dependencies::monado_deps::get_missing_monado_deps;
|
||||
use crate::file_builders::active_runtime_json::{
|
||||
|
@ -260,10 +262,10 @@ impl SimpleComponent for App {
|
|||
missing_deps.extend(get_missing_libsurvive_deps());
|
||||
runners.push(get_build_libsurvive_runner(profile.clone()));
|
||||
}
|
||||
// if profile.basalt_enabled {
|
||||
// missing_deps.extend(get_missing_basalt_deps());
|
||||
// runners.push(get_build_basalt_runner(profile.clone()));
|
||||
// }
|
||||
if profile.basalt_enabled {
|
||||
missing_deps.extend(get_missing_basalt_deps());
|
||||
runners.push(get_build_basalt_runner(profile.clone()));
|
||||
}
|
||||
// if profile.mercury_enabled {
|
||||
// missing_deps.extend(get_missing_mercury_deps());
|
||||
// runners.push(get_build_mercury_runner(profile.clone()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue