protonfixes icon indicating copy to clipboard operation
protonfixes copied to clipboard

[RFC] Deprecating cefpython

Open mrjackv opened this issue 4 years ago • 4 comments

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 :man_shrugging: )
  • 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.

mrjackv avatar Mar 08 '20 15:03 mrjackv

https://aur.archlinux.org/packages/python-cef/

soredake avatar Mar 08 '20 15:03 soredake

I made that package...

mrjackv avatar Mar 08 '20 15:03 mrjackv

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.

simons-public avatar Mar 08 '20 22:03 simons-public

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.

pchome avatar Mar 09 '20 19:03 pchome