pop-os / popsicle

Multiple USB File Flasher
MIT License
633 stars 76 forks source link

Add Flatpak manifest #187

Closed cassidyjames closed 1 year ago

cassidyjames commented 1 year ago

This matches the manifest at Flathub, with the following changes:

The reason for adding the manifest in-tree is that it enables using GNOME Builder to one-click build and run Popsicle; this makes it far, far easier for people like me to contribute. :smile:

leviport commented 1 year ago

I haven't had to build a Flatpak locally yet, so I am referencing https://docs.flatpak.org/en/latest/first-build.html

I'm not sure if I'm doing something wrong, but I'm getting a failure in the sed line:

$ flatpak run org.flatpak.Builder --user --install --force-clean build-dir com.system76.Popsicle.json
Can't open /home/levi/repos/popsicle/generated-sources.json

(flatpak-builder:2): Json-WARNING **: 13:44:09.032: Failed to deserialize "sources" property of type "gpointer" for an object of type "BuilderModule"
Emptying app dir 'build-dir'
Downloading sources
Starting build of com.system76.Popsicle
Cache miss, checking out last cache hit
========================================================================
Building module popsicle in /home/levi/repos/popsicle/.flatpak-builder/build/popsicle-6
========================================================================
Running: sed -i 's|</launchable>|</launchable>\n<icon type="remote" height="512" width="512">https://raw.githubusercontent.com/pop-os/popsicle/master/gtk/assets/icons/512x512/apps/com.system76.Popsicle.png</icon>|' gtk/assets/com.system76.Popsicle.appdata.xml
sed: can't read gtk/assets/com.system76.Popsicle.appdata.xml: No such file or directory
Error: module popsicle: Child process exited with code 2

I don't really understand the failure though, because gtk/assets/com.system76/Popsicle.appdata.xml does exist. I've run without the --user and the --install flags, but I get the same error each time. Perhaps I am building the flatpak incorrectly?

cassidyjames commented 1 year ago

@leviport the way I would recommend testing this would be to use GNOME Builder (e.g. from Flathub) and open the project. It should prompt you to install any SDKs needed in the environment, then let you one-click build and run it. But I can check what's needed (and maybe add to the README!) to do it all from the CLI.