Skip to content

Commit

Permalink
build: share desktop file between flatpak and snap
Browse files Browse the repository at this point in the history
Fix zoeyfyi#192

I'm hoping I didn't just break the snap
  • Loading branch information
ZanderBrown committed Dec 26, 2020
1 parent b640e6f commit 32445cd
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 424 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn add_files(xml: &mut String, folder: &str) {
continue;
}

if path.file_type().unwrap().is_file() {
if path.path().is_file() {
xml.push_str(&format!(
"\t\t<file>{}</file>\n",
path.path()
Expand All @@ -27,7 +27,7 @@ fn add_files(xml: &mut String, folder: &str) {
.replace("\\", "/")
.trim_start_matches("resources/")
));
} else if path.file_type().unwrap().is_dir() {
} else if path.path().is_dir() {
add_files(xml, &path.path().display().to_string());
} else {
panic!("expected file or folder");
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
10 changes: 5 additions & 5 deletions flatpak/fyi.zoey.Boop-GTK.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"ls -al target/release/gn_out/obj",
"cargo --offline build --release",
"install -Dm755 ./target/release/boop-gtk -t /app/bin/",
"install -Dm644 ./flatpak/data/${FLATPAK_ID}.metainfo.xml -t /app/share/metainfo/",
"install -Dm644 ./flatpak/data/${FLATPAK_ID}.desktop -t /app/share/applications/",
"install -Dm644 ./flatpak/data/${FLATPAK_ID}.svg -t /app/share/icons/hicolor/scalable/apps/",
"install -Dm644 ./flatpak/data/${FLATPAK_ID}.png -t /app/share/icons/hicolor/256x256/apps/",
"install -Dm644 ./flatpak/data/${FLATPAK_ID}-symbolic.svg -t /app/share/icons/hicolor/symbolic/apps/"
"install -Dm644 ./data/${FLATPAK_ID}.metainfo.xml -t /app/share/metainfo/",
"install -Dm644 ./data/${FLATPAK_ID}.desktop -t /app/share/applications/",
"install -Dm644 ./data/${FLATPAK_ID}.svg -t /app/share/icons/hicolor/scalable/apps/",
"install -Dm644 ./data/${FLATPAK_ID}.png -t /app/share/icons/hicolor/256x256/apps/",
"install -Dm644 ./data/${FLATPAK_ID}-symbolic.svg -t /app/share/icons/hicolor/symbolic/apps/"
],
"sources": [
{
Expand Down
10 changes: 0 additions & 10 deletions snap/gui/boop-gtk.desktop

This file was deleted.

Loading

0 comments on commit 32445cd

Please sign in to comment.