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

Support linking to GTK 3 when building CEF from sources and when building cefpython module. PATCH attached in comments. #446

Open
cztomczak opened this issue Aug 6, 2018 · 6 comments

Comments

@cztomczak
Copy link
Owner

cztomczak commented Aug 6, 2018

UPDATE: Patch attached in comments.

Currently there are some issues when running GTK 3 example, like for example Issue #434 ("Print support in GTK 3 example (gtk3.py) on Linux"). The solution is to link to GTK 3 library when building CEF/Chromium from sources. This issue is to add --use-gtk3 flag to automate.py script. For further instructions on building see the Build-instructions.md document.

Additionally add support for the --use-gtk3 flag in the build.py and cython_setup.py scripts used for building the cefpython3 module. Currently the cefpython3 module links to GTK 2 libraries as found in the cython_setup.py file:

        libraries.extend([
            "X11",
            "gobject-2.0",
            "glib-2.0",
            "gtk-x11-2.0",
            "gdk-x11-2.0",

Also there are multiple places with include headers pointing to GTK 2 locations:

  1. cython_setup.py (and Mac section as well)
  2. cpp_utils/Makefile
  3. subprocess/Makefile
  4. subprocess/Makefile-libcefpythonapp
  5. client_handler/Makefile

We might consider providing cefpython releases for GTK 3 in the future. See Issue #447 for details ("Provide CEF Python releases for GTK 3 on Linux and Mac").

Related issue: #467 ("GTK 2 dependency will be removed in CEF v70+").

Related patch by Joseph Kogut that removes GTK 2 dependency in cefpython: jakogut@f35475f

@cztomczak cztomczak added this to the v66 milestone Aug 6, 2018
@cztomczak cztomczak changed the title Support linking to GTK 3 when building CEF from sources Support linking to GTK 3 when building CEF from sources and when building cefpython module Aug 6, 2018
@cztomczak
Copy link
Owner Author

Added --use-gtk3 flag to automate.py in rev 5bf5d19.

@pinebit
Copy link

pinebit commented Aug 14, 2018

@cztomczak when do you think the "next release 2" is going to happen?

@cztomczak
Copy link
Owner Author

@pinebit Tag "next release 2" is used for marking tasks to be done for one of next releases. There is no known schedule for this issue at the moment. You should be able to make the necessary changes quite easily, I've already outlined all the places that need to be modified (and replace 2.0 to 3.0 I guess). See the Build Instructions doc on how to build CEF Python from sources. It's best to use master branch and the v66-upstream GitHub release prebuilt binaries.

@pinebit
Copy link

pinebit commented Aug 16, 2018

@cztomczak I'm done porting to GTK3, please find the patch attached.
Keep in mind that I've built cefpython with chromium 68 and cef 3440 (and these were built from sources with use_gtk3=true of course). Also, I tested it on Fedora 27 only.

Porting-to-GTK-3.patch.txt

@cztomczak
Copy link
Owner Author

@pinebit Thanks. Have you tested it with the gtk3.py example?

@pinebit
Copy link

pinebit commented Aug 16, 2018

I tested it with other tests that are based on gtk3.py, so I think gtk3 will also work.

@cztomczak cztomczak changed the title Support linking to GTK 3 when building CEF from sources and when building cefpython module Support linking to GTK 3 when building CEF from sources and when building cefpython module. PATCH attached. Aug 16, 2018
@cztomczak cztomczak changed the title Support linking to GTK 3 when building CEF from sources and when building cefpython module. PATCH attached. Support linking to GTK 3 when building CEF from sources and when building cefpython module. PATCH attached in comments. Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants