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

[RFC] Deprecating cefpython #116

Open
mrjackv opened this issue Mar 8, 2020 · 4 comments
Open

[RFC] Deprecating cefpython #116

mrjackv opened this issue Mar 8, 2020 · 4 comments

Comments

@mrjackv
Copy link
Contributor

mrjackv commented Mar 8, 2020

I'm writing this issue in order to spark a discussion regarding the use of cef in this project.
While cef allows the use of html+css+js to create an appropriately themed splash screen for
big picture mode, it has some drawbacks:

  • The project has been going at a snail's pace for the last year and a half with no new releases past v66 (chromium is currently on v78)
  • cefpython is not packaged in any linux distribution, and needs to be installed manually via pip
  • The python wheel bundles the spotify build of chromium, which might not be pleasing for the more security-oriented linux users (then again steam is a giant ball of binary blobs 🤷‍♂️ )
  • Even with some stripping, an installation of cefpython is around 200MB
  • Building cefpython with any version of python > 3.7 (e.g. Arch or Ubuntu Focal) is really hard
  • Spawining an entire browser in order to show a progress bar seems a bit excessive

The options for a replacement are multiple (pySide, pyGobject, kivy and others).
IMHO I would pick kivy among the contenders as it has the following advantages:

  • Low footprint both in terms of computing power and in terms of required dependencies (basically sdl2)
  • An interface similar to cef can be written in a few hundred lines
  • Does not use a desktop-oriented toolkit (e.g. gtk/qt) and therefore it is easier to write a borderless splash that does blend well with big picture mode

I'm eager to know what others think on the matter.

@soredake
Copy link
Contributor

soredake commented Mar 8, 2020

@mrjackv
Copy link
Contributor Author

mrjackv commented Mar 8, 2020

I made that package...

@simons-public
Copy link
Owner

I've used Kivy in the past for other projects and think it would be a great replacement. My only reason for using cef initially was because of the quick prototyping that could be done in html and wanting the splash to match bigpicture for my use case.

There's also the option of using pysdl2 directly. Kivy is good for it's widgets, but like cef is kind of heavy for a simple splash. This would require more coding than using a UI framework though.

Another option would be tkinter, which may or may not be built with python depending on the distribution. I haven't worked with it much, but I have a friend working on a project written in it and it seems pretty decent.

I was also reading up on using a custom theme for zenity. zenity is pretty reliably available since it is kind of bundled with the steam-runtime and is a dependency for steam in most package managers. It also supports progress bars and labels which I think are really the only controls needed. Right now I'm only able to find info for gtk2, but I'll keep looking.

At the end of the day I'm willing to merge anything splash-related as long as it stays optional if it has external dependencies, and I agree with deprecating cefpython.

@pchome
Copy link
Contributor

pchome commented Mar 9, 2020

Maybe something really simple, like semi-transparent image, see e.g. http://www.imagemagick.org/Usage/text/ and pango_markup section. Or window with background and text.

@mrjackv mrjackv mentioned this issue Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants