mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-04 15:18:58 +00:00
fix: change wivrn upstream url; remove legacy pico apk
This commit is contained in:
parent
58ceb44984
commit
06f2b2608a
2 changed files with 8 additions and 52 deletions
|
@ -21,7 +21,7 @@ pub fn get_build_wivrn_jobs(profile: &Profile, clean_build: bool) -> VecDeque<Wo
|
||||||
repo: profile
|
repo: profile
|
||||||
.xrservice_repo
|
.xrservice_repo
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap_or(&"https://github.com/Meumeu/WiVRn".into())
|
.unwrap_or(&"https://github.com/WiVRn/WiVRn".into())
|
||||||
.clone(),
|
.clone(),
|
||||||
dir: profile.xrservice_path.clone(),
|
dir: profile.xrservice_path.clone(),
|
||||||
branch: profile
|
branch: profile
|
||||||
|
|
|
@ -11,14 +11,9 @@ use crate::{
|
||||||
downloader::download_file_sync,
|
downloader::download_file_sync,
|
||||||
paths::wivrn_apk_download_path,
|
paths::wivrn_apk_download_path,
|
||||||
profile::{Profile, XRServiceType},
|
profile::{Profile, XRServiceType},
|
||||||
stateless_action,
|
|
||||||
};
|
};
|
||||||
use gtk::{glib::clone, prelude::*};
|
use gtk::{glib::clone, prelude::*};
|
||||||
use relm4::{
|
use relm4::{new_action_group, new_stateless_action, prelude::*};
|
||||||
actions::{ActionGroupName, RelmAction, RelmActionGroup},
|
|
||||||
new_action_group, new_stateless_action,
|
|
||||||
prelude::*,
|
|
||||||
};
|
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
const DOWNLOAD_ERROR: &str = "download error";
|
const DOWNLOAD_ERROR: &str = "download error";
|
||||||
|
@ -63,15 +58,6 @@ impl SimpleComponent for InstallWivrnBox {
|
||||||
type Input = InstallWivrnBoxMsg;
|
type Input = InstallWivrnBoxMsg;
|
||||||
type Output = ();
|
type Output = ();
|
||||||
|
|
||||||
menu! {
|
|
||||||
install_wivrn_menu: {
|
|
||||||
section! {
|
|
||||||
"_Standard (Oculus and other devices)" => WivrnApkStandardAction,
|
|
||||||
"_Pico" => WivrnApkPicoAction,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
gtk::Box {
|
gtk::Box {
|
||||||
set_orientation: gtk::Orientation::Vertical,
|
set_orientation: gtk::Orientation::Vertical,
|
||||||
|
@ -100,13 +86,17 @@ impl SimpleComponent for InstallWivrnBox {
|
||||||
set_wrap: true,
|
set_wrap: true,
|
||||||
set_wrap_mode: gtk::pango::WrapMode::Word,
|
set_wrap_mode: gtk::pango::WrapMode::Word,
|
||||||
},
|
},
|
||||||
gtk::MenuButton {
|
gtk::Button {
|
||||||
add_css_class: "suggested-action",
|
add_css_class: "suggested-action",
|
||||||
set_label: "Install WiVRn",
|
set_label: "Install WiVRn",
|
||||||
set_halign: gtk::Align::Start,
|
set_halign: gtk::Align::Start,
|
||||||
#[track = "model.changed(Self::install_wivrn_status())"]
|
#[track = "model.changed(Self::install_wivrn_status())"]
|
||||||
set_sensitive: model.install_wivrn_status != InstallWivrnStatus::InProgress,
|
set_sensitive: model.install_wivrn_status != InstallWivrnStatus::InProgress,
|
||||||
set_menu_model: Some(&install_wivrn_menu),
|
connect_clicked[sender] => move |_| {
|
||||||
|
sender.input(Self::Input::InstallWivrnApk(
|
||||||
|
"https://github.com/WiVRn/WiVRn/releases/latest/download/WiVRn-standard-release.apk".into()
|
||||||
|
))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
gtk::Label {
|
gtk::Label {
|
||||||
add_css_class: "error",
|
add_css_class: "error",
|
||||||
|
@ -244,40 +234,6 @@ impl SimpleComponent for InstallWivrnBox {
|
||||||
|
|
||||||
let widgets = view_output!();
|
let widgets = view_output!();
|
||||||
|
|
||||||
let mut actions = RelmActionGroup::<InstallWivrnActionGroup>::new();
|
|
||||||
|
|
||||||
stateless_action!(
|
|
||||||
actions,
|
|
||||||
WivrnApkStandardAction,
|
|
||||||
clone!(
|
|
||||||
#[strong]
|
|
||||||
sender,
|
|
||||||
move |_| {
|
|
||||||
sender.input(Self::Input::InstallWivrnApk(
|
|
||||||
"https://github.com/Meumeu/WiVRn/releases/latest/download/WiVRn-standard-release.apk".into()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
stateless_action!(
|
|
||||||
actions,
|
|
||||||
WivrnApkPicoAction,
|
|
||||||
clone!(
|
|
||||||
#[strong]
|
|
||||||
sender,
|
|
||||||
move |_| {
|
|
||||||
sender.input(Self::Input::InstallWivrnApk(
|
|
||||||
"https://github.com/Meumeu/WiVRn/releases/latest/download/WiVRn-pico-release.apk".into()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
root.insert_action_group(
|
|
||||||
InstallWivrnActionGroup::NAME,
|
|
||||||
Some(&actions.into_action_group()),
|
|
||||||
);
|
|
||||||
|
|
||||||
ComponentParts { model, widgets }
|
ComponentParts { model, widgets }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue