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

Flatpak config files to run in gnome runtime #811

Open
1 of 2 tasks
wusyong opened this issue Dec 13, 2022 · 5 comments
Open
1 of 2 tasks

Flatpak config files to run in gnome runtime #811

wusyong opened this issue Dec 13, 2022 · 5 comments
Assignees
Labels

Comments

@wusyong
Copy link
Member

wusyong commented Dec 13, 2022

Is your feature request related to a problem? Please describe.
I just pushed 0.16 branch which should work in gnome runtime. It upgrades gtk-rs crates to 0.16 and bumps webkit2gtk version to 4.1 so we can use libsoup3. This should help fix #717

Describe the solution you'd like
Add necessary config files to build flatpak application. It should use gnome runtime 43 with rust extension.
If possible, please also write down steps to build the application.

Describe alternatives you've considered
No, this is the only way to keep my sanity.

Would you assign yourself to implement this feature?

  • Yes, but I'm not familiar with flatpak. I hope anyone already understand it can help me.
  • No

Additional context

@wusyong wusyong self-assigned this Dec 13, 2022
@wusyong wusyong added help wanted Help is requested to fix this issue type: feature request platform: Linux priority: medium Great to have labels Dec 13, 2022
@FabianLars
Copy link
Member

Just for reference, @Beanow's experiments on this:
tauri-apps/tauri#3619
tauri-apps/tauri#4426
https://github.com/Beanow/hi-flatpak

(p.s. i can also spend some/much time on flatpaks now as i have to pause development on the new appimages for a bit because i apparently can't seem to fix a blocking appimage-builder issue.)

@Beanow
Copy link
Member

Beanow commented Dec 13, 2022

with rust extension.

Note, this extension should only be necessary during build.
So it's Gnome SDK + Rust extention (+ Node extension) to build.

And only Gnome runtime to run.

@FabianLars
Copy link
Member

I don't have a share-able file yet but the 0.16 branches seem to work correctly in flatpak apps. I'll try to clean it up and post it today when i'm back home.

For testing i build the app outside of the sdk and used that bundled binary as a source instead (so my manifest may not be that helpful in the long run).
But imho i think we should start with that approach first (re-use the .deb, or the binary and icons etc directly), make the apps work correctly, look at all the portals stuff, and then later in another iteration look at building the app inside the sdk. This way we could get it faster to users, and it's potentially easier to use/integrate into existing pipelines, and users don't have to build the app twice (that one is a "maybe").

@FabianLars
Copy link
Member

Sorry for the delay, here's a really simple config which expects you to build the wry binary outside of the SDK for now, since all the actual tooling development will be in Tauri anyway i think this should be enough for wry.
fp.zip
This zip file contains the config, the .desktop file, and 2 icons (i didn't really test the icons much but the paths and config should be correct but are not displayed)

steps to run

  • sudo apt install flatpak flatpak-builder
  • build one of the examples and copy the example binary into some dir, or cd into the target/debug|release/examples dir
  • if you want to test tray icons: git clone https://github.com/flathub/shared-modules in the dir mentioned above
  • if you don't want to test tray icons you can remove the libappindicator line from the config if you don't wanna clone the repo
  • flatpak-builder --user --install --force-clean build-dir org.tauri.wry-test.json
  • flatpak run org.tauri.wry-test

I do tend to change the config from json to yaml so that we can add comments, i just copy pasted that from rustdesk tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📬Proposal
Development

No branches or pull requests

3 participants