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

Standard packaging (eg. Flatpak, etc.) #74

Open
zeptofine opened this issue Mar 4, 2024 · 4 comments
Open

Standard packaging (eg. Flatpak, etc.) #74

zeptofine opened this issue Mar 4, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@zeptofine
Copy link
Collaborator

The different Linux building techniques have been common pressure points in GitHub issues, and the more these pile up, the more these containerized and isolated packaging solutions sound enticing...

@zeptofine zeptofine added the help wanted Extra attention is needed label Mar 4, 2024
@zeptofine zeptofine changed the title Standard packaging (eg. Flathub, Appimage, etc.) Standard packaging (eg. Flatpak, Appimage, etc.) Mar 4, 2024
@zeptofine zeptofine changed the title Standard packaging (eg. Flatpak, Appimage, etc.) Standard packaging (eg. Flatpak, etc.) May 13, 2024
@Victor-IX Victor-IX moved this to Backlog in Blender Launcher V2 Nov 2, 2024
@manuel-imboden
Copy link

Personally, I would love to install Blender Launcher via Flatpak. I have never published on Flathub myself, but the process seems straightforward: https://docs.flathub.org/docs/for-app-authors/submission/

Am I missing something here? Is there anything I could contribute?

@Victor-IX
Copy link
Owner

@manuel-imboden Contributions to the project are welcome! You can help implement the Flatpak build and release process if you'd like.

@zeptofine
Copy link
Collaborator Author

@manuel-imboden

The two ways I have thought about Flatpak support is:

We just ship the pyinstaller bundle after every release. This feels wierd because it's sort of a bundle inside a bundle, where having just the raw program would be preferred. We also need to be extremely confident that whatever build we do upload actually works (we have had issues with the Ubuntu builder on GHA)

We make a builder that installs all the required packages and whatnot into the flatpak and runs our scripts. This would be preferred IMO but it would take more work because their automated solutions (flatpak-pip-generator) doesn't like our requirements, namely PySide6 and shiboken6. This list of explicit requirements are required because the flatpak build system requires all of the files to be given before it starts. pip and others do not have internet connection during the build stage
https://docs.flatpak.org/en/latest/python.html
https://docs.flatpak.org/en/latest/qt.html

We will also need to make hard assertions on where our library can be placed and all that
https://docs.flatpak.org/en/latest/sandbox-permissions.html

Here are at least some of the permissions Blender Launcher will need:

finish-args:
  # X11 + XShm access
  - --share=ipc
  - --socket=fallback-x11
  # Wayland access
  - --socket=wayland
  # Needs to talk to the network:
  - --share=network
  # Needs to save files locally
  - --filesystem=xdg-config
  - --filesystem=xdg-cache
  - --filesystem=??? # The max scope the library folder could be located, like `home`, `host`, `/mnt`, ...

I think we will also need to update our execution commands for Linux if we are inside of a flatpak environment
https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-spawn

@zeptofine
Copy link
Collaborator Author

I did a test for flatpaks a bit ago here, https://github.com/zeptofine/blv2-flatpak, i didn't upload it anywhere. I made it just so I could know where the weaknesses are and what we could improve

Initial notes

  • It does seem to launch
  • Pynput doesn't work
  • Some font errors in the terminal (probably not our fault)
  • Flatpak would prefer us use native dialogs for file explorers, and I would have to agree
  • The default library folder is invalid (/app/bin/ is read only)
  • You actually can launch builds inside the app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Backlog
Development

No branches or pull requests

3 participants