mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-02-16 09:49:46 +03:00
feat: Added 7z dependency requirement
This commit is contained in:
parent
87a0bd6f96
commit
3e57468a3f
3 changed files with 23 additions and 6 deletions
|
@ -98,10 +98,10 @@ fn main() -> anyhow::Result<()> {
|
|||
// Run the game
|
||||
let mut run_game = false;
|
||||
|
||||
// Forcely run the game
|
||||
// Force run the game
|
||||
let mut just_run_game = false;
|
||||
|
||||
// Forcely disable verbode tracing output in stdout
|
||||
// Force disable verbose tracing output in stdout
|
||||
let mut no_verbose_tracing = false;
|
||||
|
||||
let args = std::env::args().collect::<Vec<_>>();
|
||||
|
|
|
@ -69,7 +69,7 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
},
|
||||
|
||||
gtk::Entry {
|
||||
set_text: "sudo pacman -Syu git xdelta3",
|
||||
set_text: "sudo pacman -Syu git xdelta3 p7zip",
|
||||
set_editable: false
|
||||
}
|
||||
},
|
||||
|
@ -86,7 +86,7 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
},
|
||||
|
||||
gtk::Entry {
|
||||
set_text: "sudo apt install git xdelta3",
|
||||
set_text: "sudo apt install git xdelta3 p7zip-full",
|
||||
set_editable: false
|
||||
}
|
||||
},
|
||||
|
@ -103,7 +103,7 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
},
|
||||
|
||||
gtk::Entry {
|
||||
set_text: "sudo dnf install git xdelta",
|
||||
set_text: "sudo dnf install git xdelta p7zip",
|
||||
set_editable: false
|
||||
}
|
||||
}
|
||||
|
@ -185,6 +185,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,12 @@ impl SimpleAsyncComponent for WelcomeApp {
|
|||
match msg {
|
||||
#[allow(unused_must_use)]
|
||||
WelcomeAppMsg::Continue => {
|
||||
if is_available("git") && is_available("xdelta3") {
|
||||
let installed =
|
||||
is_available("git") &&
|
||||
is_available("xdelta3") &&
|
||||
(is_available("7z") || is_available("7za"));
|
||||
|
||||
if installed {
|
||||
sender.output(Self::Output::ScrollToDefaultPaths);
|
||||
} else {
|
||||
sender.output(Self::Output::ScrollToDependencies);
|
||||
|
|
Loading…
Add table
Reference in a new issue