feat: install scripts and run them from the proper path

This commit is contained in:
Gabriele Musco 2023-06-18 13:35:18 +02:00
commit 5b4f4ab085
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
5 changed files with 11 additions and 6 deletions

View file

@ -73,6 +73,7 @@ global_conf.set('REPO_URL', upstream_repo)
subdir('data')
subdir('po')
subdir('src')
subdir('scripts')
gnome.post_install(
gtk_update_icon_cache: true,

4
scripts/meson.build Normal file
View file

@ -0,0 +1,4 @@
install_data('_clone_or_pull.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')

View file

@ -1,10 +1,10 @@
use crate::{profile::Profile, runner::Runner};
use crate::{profile::Profile, runner::Runner, constants::PKG_DATA_DIR};
use expect_dialog::ExpectDialog;
pub fn get_build_libsurvive_runner(profile: Profile) -> Runner {
let runner = Runner::new(
None,
"./scripts/build_libsurvive.sh".into(),
format!("{sysdata}/scripts/build_libsurvive.sh", sysdata = PKG_DATA_DIR),
vec![
profile
.libsurvive_path

View file

@ -1,9 +1,9 @@
use crate::{runner::Runner, profile::Profile};
use crate::{runner::Runner, profile::Profile, constants::PKG_DATA_DIR};
pub fn get_build_monado_runner(profile: Profile) -> Runner {
let runner = Runner::new(
None,
"./scripts/build_monado.sh".into(),
format!("{sysdata}/scripts/build_monado.sh", sysdata = PKG_DATA_DIR),
vec![
profile.monado_path,
profile.prefix,

View file

@ -1,9 +1,9 @@
use crate::{profile::Profile, runner::Runner};
use crate::{profile::Profile, runner::Runner, constants::PKG_DATA_DIR};
pub fn get_build_opencomposite_runner(profile: Profile) -> Runner {
let runner = Runner::new(
None,
"./scripts/build_opencomposite.sh".into(),
format!("{sysdata}/scripts/build_opencomposite.sh", sysdata = PKG_DATA_DIR),
vec![
profile.opencomposite_path,
]