feat: set wivrn launch options in the default profile

This commit is contained in:
Gabriele Musco 2025-02-05 07:59:12 +01:00
commit 338e711455
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
2 changed files with 5 additions and 4 deletions

View file

@ -5,6 +5,7 @@ use crate::{
prepare_ld_library_path, Profile, ProfileFeatures, ProfileOvrCompatibilityModule, prepare_ld_library_path, Profile, ProfileFeatures, ProfileOvrCompatibilityModule,
XRServiceType, XRServiceType,
}, },
ui::job_worker::internal_worker::LAUNCH_OPTS_CMD_PLACEHOLDER,
}; };
use std::collections::HashMap; use std::collections::HashMap;
@ -28,6 +29,9 @@ pub fn wivrn_profile() -> Profile {
features: ProfileFeatures { features: ProfileFeatures {
..Default::default() ..Default::default()
}, },
xrservice_launch_options: format!(
"{LAUNCH_OPTS_CMD_PLACEHOLDER} --no-instructions --no-manage-active-runtime"
),
environment, environment,
prefix, prefix,
can_be_built: true, can_be_built: true,

View file

@ -155,7 +155,7 @@ impl Worker for InternalJobWorker {
} }
} }
const LAUNCH_OPTS_CMD_PLACEHOLDER: &str = "%command%"; pub const LAUNCH_OPTS_CMD_PLACEHOLDER: &str = "%command%";
impl InternalJobWorker { impl InternalJobWorker {
pub fn xrservice_worker_from_profile( pub fn xrservice_worker_from_profile(
@ -193,9 +193,6 @@ impl InternalJobWorker {
} else { } else {
launch_opts launch_opts
}; };
if !launch_opts.contains(" --no-instructions") {
launch_opts.push_str(" --no-instructions");
}
let (command, args) = match launch_opts.is_empty() { let (command, args) = match launch_opts.is_empty() {
false => ( false => (
"sh".into(), "sh".into(),