Add ability to build GTK app AppImage (#240)

#238 Add AppImage build support

Implements

- Downgrade to libadwaita 1.3 for wider distro support
- Add build script, workflow, and docs for AppImage
- Add build docs for Debian (apt) and Void Linux
- Building AppImage in CI
This commit is contained in:
David Zhong 2024-02-15 19:27:14 -08:00 committed by GitHub
parent 44ecf042a3
commit ab73183b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 311 additions and 147 deletions

View file

@ -81,16 +81,28 @@ impl AsyncComponent for App {
let view_switcher_bar = adw::ViewSwitcherBar::builder().stack(&view_stack).build();
view_switcher_bar.set_reveal(true);
let toolbar = adw::ToolbarView::new();
toolbar.add_top_bar(
// When libadwaita 1.4 support becomes more avaliable, this approach is more appropriate
//
// let toolbar = adw::ToolbarView::new();
// toolbar.add_top_bar(
// &adw::HeaderBar::builder()
// .title_widget(&gtk::Label::new(Some("Burrow")))
// .build(),
// );
// toolbar.add_bottom_bar(&view_switcher_bar);
// toolbar.set_content(Some(&view_stack));
// root.set_content(Some(&toolbar));
let content = gtk::Box::new(gtk::Orientation::Vertical, 0);
content.append(
&adw::HeaderBar::builder()
.title_widget(&gtk::Label::new(Some("Burrow")))
.build(),
);
toolbar.add_bottom_bar(&view_switcher_bar);
toolbar.set_content(Some(&view_stack));
content.append(&view_stack);
content.append(&view_switcher_bar);
root.set_content(Some(&toolbar));
root.set_content(Some(&content));
sender.input(AppMsg::PostInit);