diff --git a/src/ui/first_run/dependencies.rs b/src/ui/first_run/dependencies.rs index d9d217b..715abf5 100644 --- a/src/ui/first_run/dependencies.rs +++ b/src/ui/first_run/dependencies.rs @@ -41,7 +41,7 @@ impl SimpleAsyncComponent for DependenciesApp { gtk::Label { set_label: &tr!("missing-dependencies-message"), - + set_justify: gtk::Justification::Center, set_wrap: true, set_margin_top: 32 @@ -68,7 +68,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo pacman -Syu git libwebp", + set_text: "sudo pacman -Syu git p7zip libwebp", set_editable: false } }, @@ -85,7 +85,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo apt install git webp", + set_text: "sudo apt install git p7zip-full webp", set_editable: false } }, @@ -102,7 +102,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo dnf install git libwebp-tools", + set_text: "sudo dnf install git p7zip libwebp-tools", set_editable: false } }, @@ -119,6 +119,10 @@ impl SimpleAsyncComponent for DependenciesApp { set_title: "git" }, + adw::ActionRow { + set_title: "p7zip" + }, + adw::ActionRow { set_title: "libwebp" } @@ -130,7 +134,7 @@ impl SimpleAsyncComponent for DependenciesApp { add = &adw::PreferencesGroup { set_valign: gtk::Align::Center, set_vexpand: true, - + gtk::Box { set_orientation: gtk::Orientation::Horizontal, set_halign: gtk::Align::Center, @@ -202,6 +206,18 @@ impl SimpleAsyncComponent for DependenciesApp { } } + // 7z sometimes has different binaries + if !is_available("7z") && !is_available("7za") { + sender.output(Self::Output::Toast { + title: tr!("package-not-available", { + "package" = "7z" + }), + description: None + }); + + return; + } + sender.output(Self::Output::ScrollToDefaultPaths); } diff --git a/src/ui/first_run/tos_warning.rs b/src/ui/first_run/tos_warning.rs index cd6c0d0..d1b4a0f 100644 --- a/src/ui/first_run/tos_warning.rs +++ b/src/ui/first_run/tos_warning.rs @@ -48,12 +48,12 @@ impl SimpleAsyncComponent for TosWarningApp { add = &adw::PreferencesGroup { set_valign: gtk::Align::Center, set_vexpand: true, - + gtk::Box { set_orientation: gtk::Orientation::Horizontal, set_halign: gtk::Align::Center, set_spacing: 8, - + gtk::Button { set_label: &tr!("continue"), set_css_classes: &["suggested-action", "pill"], @@ -105,7 +105,8 @@ impl SimpleAsyncComponent for TosWarningApp { "continue" => { let installed = is_available("git") && - is_available("dwebp"); + is_available("dwebp") && + (is_available("7z") || is_available("7za")); if installed { sender.output(Self::Output::ScrollToDefaultPaths);