diff --git a/src/builders/build_basalt.rs b/src/builders/build_basalt.rs index 056d107..3d896a9 100644 --- a/src/builders/build_basalt.rs +++ b/src/builders/build_basalt.rs @@ -28,7 +28,7 @@ pub fn get_build_basalt_jobs(profile: &Profile, clean_build: bool) -> VecDeque = HashMap::new(); - cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "Release".into()); + cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "RelWithDebInfo".into()); cmake_vars.insert("CMAKE_INSTALL_PREFIX".into(), profile.prefix.clone()); cmake_vars.insert("BUILD_TESTS".into(), "OFF".into()); cmake_vars.insert("BASALT_INSTANTIATIONS_DOUBLE".into(), "OFF".into()); diff --git a/src/builders/build_libsurvive.rs b/src/builders/build_libsurvive.rs index 4c0e2bc..0d1134e 100644 --- a/src/builders/build_libsurvive.rs +++ b/src/builders/build_libsurvive.rs @@ -31,7 +31,7 @@ pub fn get_build_libsurvive_jobs(profile: &Profile, clean_build: bool) -> VecDeq profile.features.libsurvive.path.as_ref().unwrap() ); let mut cmake_vars: HashMap = HashMap::new(); - cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "Release".into()); + cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "RelWithDebInfo".into()); cmake_vars.insert("ENABLE_api_example".into(), "OFF".into()); cmake_vars.insert("USE_HIDAPI".into(), "ON".into()); cmake_vars.insert("CMAKE_SKIP_INSTALL_RPATH".into(), "YES".into()); diff --git a/src/builders/build_monado.rs b/src/builders/build_monado.rs index 0dcea4c..9d2713d 100644 --- a/src/builders/build_monado.rs +++ b/src/builders/build_monado.rs @@ -9,11 +9,7 @@ use std::{ path::Path, }; -pub fn get_build_monado_jobs( - profile: &Profile, - clean_build: bool, - debug_build: bool, -) -> VecDeque { +pub fn get_build_monado_jobs(profile: &Profile, clean_build: bool) -> VecDeque { let mut jobs = VecDeque::::new(); let git = Git { @@ -37,36 +33,17 @@ pub fn get_build_monado_jobs( format!("{}/lib/pkgconfig", profile.prefix), ); let mut cmake_vars: HashMap = HashMap::new(); - cmake_vars.insert( - "CMAKE_BUILD_TYPE".into(), - (if debug_build { "Debug" } else { "Release" }).into(), - ); + cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "RelWithDebInfo".into()); cmake_vars.insert("XRT_HAVE_SYSTEM_CJSON".into(), "NO".into()); cmake_vars.insert("CMAKE_LIBDIR".into(), format!("{}/lib", profile.prefix)); cmake_vars.insert("CMAKE_INSTALL_PREFIX".into(), profile.prefix.clone()); cmake_vars.insert( "CMAKE_C_FLAGS".into(), - format!( - "-Wl,-rpath='{}/lib'{}", - profile.prefix, - if debug_build { - " -g -march=native -O3 -fno-omit-frame-pointer" - } else { - "" - } - ), + format!("-Wl,-rpath='{}/lib'", profile.prefix,), ); cmake_vars.insert( "CMAKE_CXX_FLAGS".into(), - format!( - "-Wl,-rpath='{}/lib'{}", - profile.prefix, - if debug_build { - " -g -march=native -O3 -fno-omit-frame-pointer" - } else { - "" - } - ), + format!("-Wl,-rpath='{}/lib'", profile.prefix,), ); profile.xrservice_cmake_flags.iter().for_each(|(k, v)| { if k == "CMAKE_C_FLAGS" || k == "CMAKE_CXX_FLAGS" { diff --git a/src/builders/build_opencomposite.rs b/src/builders/build_opencomposite.rs index 72394d1..d9bb785 100644 --- a/src/builders/build_opencomposite.rs +++ b/src/builders/build_opencomposite.rs @@ -9,11 +9,7 @@ use std::{ path::Path, }; -pub fn get_build_opencomposite_jobs( - profile: &Profile, - clean_build: bool, - debug_build: bool, -) -> VecDeque { +pub fn get_build_opencomposite_jobs(profile: &Profile, clean_build: bool) -> VecDeque { let mut jobs = VecDeque::::new(); let git = Git { @@ -32,10 +28,7 @@ pub fn get_build_opencomposite_jobs( let build_dir = format!("{}/build", profile.opencomposite_path); let mut cmake_vars: HashMap = HashMap::new(); - cmake_vars.insert( - "CMAKE_BUILD_TYPE".into(), - (if debug_build { "Debug" } else { "Release" }).into(), - ); + cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "RelWithDebInfo".into()); let cmake = Cmake { env: None, vars: Some(cmake_vars), diff --git a/src/builders/build_openhmd.rs b/src/builders/build_openhmd.rs index 8d4a47e..26c3b7e 100644 --- a/src/builders/build_openhmd.rs +++ b/src/builders/build_openhmd.rs @@ -28,7 +28,7 @@ pub fn get_build_openhmd_jobs(profile: &Profile, clean_build: bool) -> VecDeque< let build_dir = format!("{}/build", profile.features.openhmd.path.as_ref().unwrap()); let mut cmake_vars: HashMap = HashMap::new(); - cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "Release".into()); + cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "RelWithDebInfo".into()); cmake_vars.insert("CMAKE_INSTALL_PREFIX".into(), profile.prefix.clone()); cmake_vars.insert( "CMAKE_INSTALL_LIBDIR".into(), diff --git a/src/builders/build_wivrn.rs b/src/builders/build_wivrn.rs index 536a89e..9836fcc 100644 --- a/src/builders/build_wivrn.rs +++ b/src/builders/build_wivrn.rs @@ -9,11 +9,7 @@ use std::{ path::Path, }; -pub fn get_build_wivrn_jobs( - profile: &Profile, - clean_build: bool, - debug_build: bool, -) -> VecDeque { +pub fn get_build_wivrn_jobs(profile: &Profile, clean_build: bool) -> VecDeque { let mut jobs = VecDeque::::new(); let git = Git { diff --git a/src/ui/app.rs b/src/ui/app.rs index d6033d2..b7a24cb 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -115,7 +115,7 @@ pub enum Msg { OnBuildLog(Vec), OnBuildExit(i32), ClockTicking, - BuildProfile(bool, bool), + BuildProfile(bool), CancelBuild, EnableDebugViewChanged(bool), DoStartStopXRService, @@ -425,7 +425,7 @@ impl SimpleComponent for App { } } }, - Msg::BuildProfile(clean_build, debug_build) => { + Msg::BuildProfile(clean_build) => { let profile = self.get_selected_profile(); let mut missing_deps = vec![]; let mut jobs = VecDeque::::new(); @@ -452,20 +452,12 @@ impl SimpleComponent for App { jobs.push_back(get_build_mercury_job(&profile)); } jobs.extend(match profile.xrservice_type { - XRServiceType::Monado => { - get_build_monado_jobs(&profile, clean_build, debug_build) - } - XRServiceType::Wivrn => { - get_build_wivrn_jobs(&profile, clean_build, debug_build) - } + XRServiceType::Monado => get_build_monado_jobs(&profile, clean_build), + XRServiceType::Wivrn => get_build_wivrn_jobs(&profile, clean_build), }); // no listed deps for opencomp } - jobs.extend(get_build_opencomposite_jobs( - &profile, - clean_build, - debug_build, - )); + jobs.extend(get_build_opencomposite_jobs(&profile, clean_build)); if !missing_deps.is_empty() { missing_deps.sort_unstable(); missing_deps.dedup(); // dedup only works if sorted, hence the above @@ -772,7 +764,6 @@ impl SimpleComponent for App { root_win: root.clone().into(), }) .forward(sender.input_sender(), |message| match message { - MainViewOutMsg::EnableDebugViewChanged(val) => Msg::EnableDebugViewChanged(val), MainViewOutMsg::DoStartStopXRService => Msg::DoStartStopXRService, MainViewOutMsg::StartWithDebug => Msg::StartWithDebug, MainViewOutMsg::RestartXRService => Msg::RestartXRService, @@ -823,28 +814,14 @@ impl SimpleComponent for App { actions, BuildProfileAction, clone!(@strong sender => move |_| { - sender.input_sender().emit(Msg::BuildProfile(false, false)); + sender.input_sender().emit(Msg::BuildProfile(false)); }) ); stateless_action!( actions, BuildProfileCleanAction, clone!(@strong sender => move |_| { - sender.input_sender().emit(Msg::BuildProfile(true, false)); - }) - ); - stateless_action!( - actions, - BuildProfileDebugAction, - clone!(@strong sender => move |_| { - sender.input_sender().emit(Msg::BuildProfile(false, true)); - }) - ); - stateless_action!( - actions, - BuildProfileCleanDebugAction, - clone!(@strong sender => move |_| { - sender.input_sender().emit(Msg::BuildProfile(true, true)); + sender.input_sender().emit(Msg::BuildProfile(true)); }) ); stateless_action!( @@ -922,8 +899,6 @@ new_action_group!(pub AppActionGroup, "win"); new_stateless_action!(pub AboutAction, AppActionGroup, "about"); new_stateless_action!(pub BuildProfileAction, AppActionGroup, "buildprofile"); new_stateless_action!(pub BuildProfileCleanAction, AppActionGroup, "buildprofileclean"); -new_stateless_action!(pub BuildProfileDebugAction, AppActionGroup, "buildprofiledebug"); -new_stateless_action!(pub BuildProfileCleanDebugAction, AppActionGroup, "buildprofilecleandebug"); new_stateless_action!(pub ConfigFbtAction, AppActionGroup, "configfbt"); new_stateless_action!(pub QuitAction, AppActionGroup, "quit"); new_stateful_action!(pub DebugViewToggleAction, AppActionGroup, "debugviewtoggle", (), bool); diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index b5751b0..28be410 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -14,8 +14,8 @@ use crate::gpu_profile::{ use crate::profile::{LighthouseDriver, Profile, XRServiceType}; use crate::steamvr_utils::chaperone_info_exists; use crate::ui::app::{ - AboutAction, BuildProfileAction, BuildProfileCleanAction, BuildProfileCleanDebugAction, - BuildProfileDebugAction, ConfigFbtAction, DebugViewToggleAction, + AboutAction, BuildProfileAction, BuildProfileCleanAction, ConfigFbtAction, + DebugViewToggleAction, }; use crate::ui::profile_editor::ProfileEditorInit; use crate::ui::steamvr_calibration_box::SteamVrCalibrationBoxMsg; @@ -76,7 +76,6 @@ pub enum MainViewMsg { #[derive(Debug)] pub enum MainViewOutMsg { - EnableDebugViewChanged(bool), DoStartStopXRService, StartWithDebug, RestartXRService, @@ -123,10 +122,6 @@ impl SimpleComponent for MainView { "C_lean Build Profile" => BuildProfileCleanAction, "Configure Full Body _Tracking" => ConfigFbtAction, }, - section! { - "Build Profile with Debug Symbols" => BuildProfileDebugAction, - "Clean Build Profile with Debug Symbols" => BuildProfileCleanDebugAction, - }, section! { "_About" => AboutAction, }