diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbab1e4..1263a85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ cargo:test: stage: test script: - apt-get update - - apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev curl -y + - apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev curl yelp yelp-tools -y - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh - chmod +x /tmp/rustup.sh - /tmp/rustup.sh -y @@ -38,7 +38,7 @@ appimage: stage: deploy script: - apt-get update - - apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev curl -y + - apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev curl yelp yelp-tools -y - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh - chmod +x /tmp/rustup.sh - /tmp/rustup.sh -y diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index 3d6ca44..f228116 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -26,10 +26,12 @@ depends=( polkit base-devel jq + yelp ) makedepends=( meson rust + yelp-tools ) optdepends=( 'libudev0-shim: steamvr_lh lighthouse driver support' diff --git a/help/C/index.page b/help/C/index.page new file mode 100644 index 0000000..029a086 --- /dev/null +++ b/help/C/index.page @@ -0,0 +1,46 @@ + + + + Envision + Envision + Envision + + + + + Gabriele Musco + gabmus@disroot.org + 2024 + + + + + + Envision is a FOSS VR orchestrator for setting up Monado and WiVRn, along with Basalt, Mercury and OpenHMD. + + + + <media type="image" its:translate="no" mime="image/svg+xml" height="48px" width="48px" src="media/org.gabmus.envision.svg" /> + Envision + + + + + + + diff --git a/help/C/legal.xml b/help/C/legal.xml new file mode 100644 index 0000000..09cd8c8 --- /dev/null +++ b/help/C/legal.xml @@ -0,0 +1,6 @@ + +

This work is licensed under a + Creative Commons + Attribution-ShareAlike 3.0 Unported License.

+
diff --git a/help/C/media/org.gabmus.envision.svg b/help/C/media/org.gabmus.envision.svg new file mode 100644 index 0000000..fec378e --- /dev/null +++ b/help/C/media/org.gabmus.envision.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 0000000..b0effe3 --- /dev/null +++ b/help/meson.build @@ -0,0 +1,13 @@ +pages = [ + 'index.page', + 'legal.xml', +] + +media = [ + 'media/org.gabmus.envision.svg', +] + +gnome.yelp(meson.project_name(), + sources: pages, + media: media, +) diff --git a/meson.build b/meson.build index 7da240b..b6ed35e 100644 --- a/meson.build +++ b/meson.build @@ -73,6 +73,7 @@ global_conf.set('CMD_NAME', meson.project_name()) global_conf.set('REPO_URL', upstream_repo) subdir('data') +subdir('help') subdir('po') subdir('src') subdir('scripts') diff --git a/src/ui/app.rs b/src/ui/app.rs index c7e6f2b..65a9661 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -44,8 +44,9 @@ use crate::ui::debug_view::{DebugViewInit, DebugViewOutMsg}; use crate::ui::libsurvive_setup_window::LibsurviveSetupMsg; use crate::ui::main_view::{MainView, MainViewInit, MainViewOutMsg}; use crate::xr_devices::XRDevice; +use gtk::gdk::AppLaunchContext; use gtk::glib::clone; -use gtk::prelude::*; +use gtk::{gio, prelude::*}; use relm4::actions::{AccelsPlus, ActionGroupName, RelmAction, RelmActionGroup}; use relm4::adw::traits::MessageDialogExt; use relm4::adw::ResponseAppearance; @@ -860,6 +861,13 @@ impl SimpleComponent for App { abd_sender.send(()).unwrap(); }); } + stateless_action!(actions, HelpAction, move |_| { + if let Err(e) = + gio::AppInfo::launch_default_for_uri("help:envision", AppLaunchContext::NONE) + { + eprintln!("Error opening help page: {e}") + } + }); stateless_action!( actions, QuitAction, @@ -897,6 +905,7 @@ impl SimpleComponent for App { app.set_accelerators_for_action::(&["q"]); app.set_accelerators_for_action::(&["F5"]); app.set_accelerators_for_action::(&["F5"]); + app.set_accelerators_for_action::(&["F1"]); } model.main_view.sender().emit(MainViewMsg::UpdateProfiles( @@ -920,6 +929,7 @@ impl SimpleComponent for App { new_action_group!(pub AppActionGroup, "win"); new_stateless_action!(pub AboutAction, AppActionGroup, "about"); +new_stateless_action!(pub HelpAction, AppActionGroup, "help"); new_stateless_action!(pub BuildProfileAction, AppActionGroup, "buildprofile"); new_stateless_action!(pub BuildProfileCleanAction, AppActionGroup, "buildprofileclean"); new_stateless_action!(pub ConfigFbtAction, AppActionGroup, "configfbt"); diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index 20d2466..ebde577 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -15,7 +15,7 @@ use crate::profile::{LighthouseDriver, Profile, XRServiceType}; use crate::steamvr_utils::chaperone_info_exists; use crate::ui::app::{ AboutAction, BuildProfileAction, BuildProfileCleanAction, ConfigFbtAction, - DebugViewToggleAction, + DebugViewToggleAction, HelpAction, }; use crate::ui::profile_editor::ProfileEditorInit; use crate::ui::steamvr_calibration_box::SteamVrCalibrationBoxMsg; @@ -121,6 +121,7 @@ impl SimpleComponent for MainView { "Configure Full Body _Tracking" => ConfigFbtAction, }, section! { + "_Help" => HelpAction, "_About" => AboutAction, } }