Skip to content

Commit

Permalink
add app metainfo (#114)
Browse files Browse the repository at this point in the history
* add app metainfo

* allow opening urls via xdg on linux, flatpak
  • Loading branch information
darrell-roberts authored Jan 3, 2025
1 parent 2c98a7f commit cf60649
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions assets/io.github.darrellroberts.hacker-news.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component type="desktop-application">
<id>io.github.darrellroberts.hacker-news</id>

<name>Hacker News</name>
<summary>Hacker News Reader</summary>

<metadata_license>MIT</metadata_license>
<project_license>MIT-open-group</project_license>

<categories>
<category>News</category>
</categories>

<developer id="io.github.darrellroberts">
<name>Darrell Roberts</name>
</developer>

<content_rating type="oars-1.1" />

<url type="homepage">https://github.com/darrell-roberts/hacker-news</url>
<description>
<p>
A Hacker News reader written in Rust using the iced GUI library.
View the top stories, new stories, and best stories from Hacker News.
</p>
</description>

<launchable
type="desktop-id"
>io.github.darrellroberts.hacker-news.desktop</launchable>

<releases>
<release version="0.1.4" type="stable" date="2025-01-03" />
<release version="0.1.3" type="stable" date="2025-01-02" />
</releases>
</component>
2 changes: 1 addition & 1 deletion hacker-news-iced/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hacker-news-iced"
version = "0.1.3"
version = "0.1.4"
license.workspace = true
edition.workspace = true
description = "Hacker News Desktop Reader"
Expand Down
2 changes: 1 addition & 1 deletion hacker-news-iced/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub fn update(app: &mut App, message: AppMsg) -> Task<AppMsg> {
Task::none()
}
AppMsg::OpenLink { url, item_id } => {
open::with_detached(url, "firefox")
open::that(url)
.inspect_err(|err| {
error!("Failed to open url {err}");
})
Expand Down
9 changes: 9 additions & 0 deletions io.github.darrellroberts.hacker-news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,20 @@ modules:
build-commands:
- mkdir -p /app/share
- install -Dm644 assets/io.github.darrellroberts.hacker-news.desktop -t /app/share/applications/
- install -Dm644 assets/io.github.darrellroberts.hacker-news.metainfo.xml -t /app/share/metainfo/
- tar zxvf assets/icons.tar.gz -C /app/share
# - unzip -o UbuntuSans.zip -d /app/share/fonts
# - unzip -o Ubuntu.zip -d /app/share/fonts
- cargo --offline fetch --manifest-path Cargo.toml
- cargo --offline build --release
- install -Dm755 ./target/release/hacker-news-iced -t /app/bin/
sources:
- type: dir
path: .
- cargo-sources.json
# - type: file
# url: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/UbuntuSans.zip
# sha256: 65d74bd6d3b5d4447fb6abe8da009fcc133a888a29b27be46baec98872f5dee9
# - type: file
# url: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/Ubuntu.zip
# sha256: aa64690dab5b4f5cb6f0223999d44ca30fa51d837d83fcd86eacec527ec4f598

0 comments on commit cf60649

Please sign in to comment.