Added xdelta3 requirement during initial setup

This commit is contained in:
Observer KRypt0n_ 2022-08-02 20:31:28 +02:00
parent ceffbe795a
commit e021b79ae7
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 11 additions and 9 deletions

View file

@ -41,7 +41,7 @@ Gtk.Box page {
} }
Gtk.Entry { Gtk.Entry {
text: "sudo pacman -Syu git"; text: "sudo pacman -Syu git xdelta3";
editable: false; editable: false;
} }
} }
@ -56,7 +56,7 @@ Gtk.Box page {
} }
Gtk.Entry { Gtk.Entry {
text: "sudo apt install git"; text: "sudo apt install git xdelta3";
editable: false; editable: false;
} }
} }
@ -71,7 +71,7 @@ Gtk.Box page {
} }
Gtk.Entry { Gtk.Entry {
text: "sudo dnf install git"; text: "sudo dnf install git xdelta";
editable: false; editable: false;
} }
} }

View file

@ -35,7 +35,7 @@ fn blp_process_dir(dir: String) {
create_dir_all(&dist_dir).expect("UI dist dir couldn't be created"); create_dir_all(&dist_dir).expect("UI dist dir couldn't be created");
} }
println!("cargo:rerun-if-changed={}/*.blp", &source_dir); // println!("cargo:rerun-if-changed={}/*.blp", &source_dir);
for entry in entries { for entry in entries {
if let Ok(entry) = entry { if let Ok(entry) = entry {

View file

@ -172,16 +172,18 @@ impl App {
match action { match action {
Actions::FirstPageContinue => { Actions::FirstPageContinue => {
match Command::new("git").stdout(Stdio::null()).spawn() { match Command::new("git").stdout(Stdio::null()).spawn() {
Ok(_) => this.widgets.carousel.scroll_to(&this.widgets.page_3.page, true), Ok(_) => match Command::new("xdelta3").stdout(Stdio::null()).spawn() {
Ok(_) => this.widgets.carousel.scroll_to(&this.widgets.page_3.page, true),
Err(_) => this.widgets.carousel.scroll_to(&this.widgets.page_2.page, true)
},
Err(_) => this.widgets.carousel.scroll_to(&this.widgets.page_2.page, true) Err(_) => this.widgets.carousel.scroll_to(&this.widgets.page_2.page, true)
} }
} }
Actions::SecondPageCheck => { Actions::SecondPageCheck => {
match Command::new("git").stdout(Stdio::null()).spawn() { if let Ok(_) = Command::new("git").stdout(Stdio::null()).spawn() {
Ok(_) => this.widgets.carousel.scroll_to(&this.widgets.page_3.page, true), if let Ok(_) = Command::new("xdelta3").stdout(Stdio::null()).spawn() {
Err(_) => { this.widgets.carousel.scroll_to(&this.widgets.page_3.page, true);
// todo
} }
} }
} }