Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add flatpak output and GHA build step #5609

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

ndom91
Copy link
Contributor

@ndom91 ndom91 commented Nov 19, 2024

☕️ Reasoning

  • Test Flatpak build

🧢 Changes

  • Add flatpak manifest
  • Add flatpak xml metadata file
  • Add build:flatpak root package.json script
  • Add GHA jobs for buliding and uploading flatpak output
    • Unfortunately this can't be totally parallel, because the flatpak relies on consuming the .deb output.

Copy link

vercel bot commented Nov 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 9:30am
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 9:30am

@Milkfat32
Copy link

Milkfat32 commented Nov 26, 2024

Hello

Unfortunately this can't be totally parallel, because the flatpak relies on consuming the .deb output.

It is possible to build the flatpak from source. I have done this on a tauri app before, both v1 and v2. You need to use the flatpak-node-generator for the node dependencies and flatpak-cargo-generator for the rust dependencies. Then you can run the build in offline mode, since the flatpak builder cannot access the internet during build. All of this can also be automated in a workflow.

@ndom91
Copy link
Contributor Author

ndom91 commented Nov 27, 2024

Hello

Unfortunately this can't be totally parallel, because the flatpak relies on consuming the .deb output.

It is possible to build the flatpak from source. I have done this on a tauri app before, both v1 and v2. You need to use the flatpak-node-generator for the node dependencies and flatpak-cargo-generator for the rust dependencies. Then you can run the build in offline mode, since the flatpak builder cannot access the internet during build. All of this can also be automated in a workflow.

Hey thanks for chiming in. I know its possible, but reusing the .deb was much quicker and simpler.

I'm curious though, are there any other advantages to building it again separately for flatpak? If you have any links for a tauri v2 flatpak build from scratch I'd love to take a look

@Milkfat32
Copy link

Hmm I believe the biggest advantage would be the applying any flatpak specific patches. I know of one Tauri flatpak that has a patch that disables the tauri updater, since updating is handled by the flatpak package manager. Other than that, it is mostly licensing and reproducability that some people care deeply about.

I don't know of any Tauri v2 flatpaks built from source, the one I maintain is still v1 for now. But I have built the dev branch of v2 as a flatpak.
The only difference I found between v1 and v2 were all the dependencies I had to pull in. For tauri v2 all the dependencies already exist in the gnome sdk runtime, so it is much easier. The process is simply writing the build commands and the cached dependencies.
You can check out the Cinny flatpak or OpenGOAL flatpak manifest files

@ndom91
Copy link
Contributor Author

ndom91 commented Nov 27, 2024

@Milkfat32 awesome, thanks for sharing. Yeah removing the tauri-updater here would be great for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants