baiyunping333 / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Linux support + Ubuntu 32bit binaries #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Feature request: remove the requirement to run it on Windows.

Original issue reported on code.google.com by johanneswilm on 5 Jul 2012 at 3:03

GoogleCodeExporter commented 9 years ago
Use of compile time definitions and conditional statements will be helpful when 
creating linux port: 
http://docs.cython.org/src/userguide/language_basics.html#conditional-statements

Original comment by czarek.t...@gmail.com on 5 Jul 2012 at 3:30

GoogleCodeExporter commented 9 years ago
Are there any plans to have this run on OSX?

Original comment by rattray....@gmail.com on 15 Jul 2012 at 12:54

GoogleCodeExporter commented 9 years ago
@rattray.alex, go create an appropriate issue. MacOSX version should be easier 
to create than linux as there are ready binaries on chromiumembedded project. 
The priority for me is to have a 1.00 version for windows with complete api, 
which should take about 2 months, after that I can start working on 
linux/macosx ports. If someone wants to help with linux/macosx we could have it 
earlier.

Original comment by czarek.t...@gmail.com on 15 Jul 2012 at 4:46

GoogleCodeExporter commented 9 years ago
The linux distribution for which I plan to release binaries is Ubuntu, as it 
will be probably too much hassle to do it for all the distributions, if you 
want binaries for other distros (Debian, Fedora or OpenSuse - look for 
supported one here: 
http://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding) you will 
have to compile it by yourself.

I will provide 2 example applications within the binary, one using PyGTK, the 
other wxPython - that should be enough.

I will have to remove OS dependencies from CEF Python, I will do that by 
introducing interfaces named "WindowsAPI" and "LinuxAPI" that will have to 
implement some of the functions to manage windows, I looked briefly at the code 
and I see that we need functions:

IsWindow
EnforceWindowTitle
EnforceWindowIcon
CefStringToPyString (uses WideCharToMultiByte to convert wide string to utf-8)

When initializing CEF you have provide an object that implements this 
interface, for linux there will be 2 versions of this interface, one for PyGTK, 
the other for wxPython.

I'm still not sure which Ubuntu version I have to use, if I compile on version 
12.10 will the generated .so files be compatible with earlier versions of 
Ubuntu (10.04)?

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 12:44

GoogleCodeExporter commented 9 years ago
Why not use tkinter for window management?  It is included with python, and 
would avoid introducing a dependency on gtk or wx.  

Original comment by jlv@ensigntech.com on 4 Sep 2012 at 1:44

GoogleCodeExporter commented 9 years ago
A quote from here:
http://pygtk.org/downloads.html

'''PyGTK is included in most Linux distributions (including Debian, Fedora, 
Ubuntu, Opensuse, Gentoo, Mandrake, Redhat, SUSE...); the source code can also 
be downloaded and compiled from the links below.'''

Does tkinter allow embedding win32 native controls?  If so, we can create an 
example using tkinter too. From what I know tkinter is somewhat limited, last 
time I tried it to set application's icon that had many sizes, but couldn't 
make it work the way I wanted, small icon in tkinter was ugly compared to win32 
native app. I will try to create a tkinter example, but let's not make it the 
only option, pyGTK and wxpython should also co-exist.

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 2:49

GoogleCodeExporter commented 9 years ago
'''Does tkinter allow embedding win32 native controls?'''

As it is linux we talk here, I meant whether we can get window handle and embed 
cef control inside it.

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 2:53

GoogleCodeExporter commented 9 years ago
I've googled and tkinter seems a good choice, it will definitely work, and as 
jlv said there is no dependency.

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 2:59

GoogleCodeExporter commented 9 years ago
I envision using the GUI framework to simply create the window, very few of the 
toolkit features would actually be used in my use case, everything else would 
be rendered by CEF.

Unfortunately, I am no expert.  I use tkinter because it is simple.  From what 
I understand, the newer versions of tk look much better than it used to.

I did some searching, to try to answer your question.  I may be completely 
misunderstanding, but I found this thread that talks about getting the window 
handle in wx and the equivalent in tkinter- 
http://code.activestate.com/lists/python-list/343819/

I hope that helps in some way.

Original comment by jlv@ensigntech.com on 4 Sep 2012 at 3:42

GoogleCodeExporter commented 9 years ago
I've found this link too earlier when googled, but thanks anyway. Like I said 
it will work, we will have tkinter.

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 3:45

GoogleCodeExporter commented 9 years ago
There is some more work involved to make it work on linux, there are separate 
VS projects that implement some of the functionality in C++, they are required 
when compiling with cython:
 * httpauth - this will require implementing dialog prompt for login/password using some linux native window api, in windows we used DialogBoxIndirect
 * v8functionhandler
 * clienthandler

Original comment by czarek.t...@gmail.com on 4 Sep 2012 at 4:04

GoogleCodeExporter commented 9 years ago
It is not possible to embed browser control in a tkinter-window, it is required 
to install a third party package called "tksteal" to be able to do that. Linux 
and mac example apps will require an external gui framework, one of: wxPython, 
PyGTK, PyQt.

Original comment by czarek.t...@gmail.com on 17 Nov 2012 at 2:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 3 Jan 2013 at 9:49

GoogleCodeExporter commented 9 years ago
Binaries for Linux have been released, specifically for Ubuntu 12.04 LTS
32-bit. Only Python 2.7 is supported as of now. Examples for wxPython
and PyGTK are included. Go to downloads and have fun.

Next on the target is a python package installer for Linux.

Original comment by czarek.t...@gmail.com on 6 May 2013 at 9:19

GoogleCodeExporter commented 9 years ago
The Linux release was sponsored by Cyan Inc. See the announcement on the forum:
https://groups.google.com/d/topic/cefpython/PlEHlLGzoxA/discussion

Original comment by czarek.t...@gmail.com on 6 May 2013 at 9:32

GoogleCodeExporter commented 9 years ago
64-bit binaries for linux have been released.

Package Setup binaries are available along with portable zips.

You can build custom binaries for your Linux version by following the 
instructions on the BuildOnLinux wiki page.

Original comment by czarek.t...@gmail.com on 12 May 2013 at 2:57

GoogleCodeExporter commented 9 years ago
CEF 3 Linux port is complete, see revision 690b771871ef.

Original comment by czarek.t...@gmail.com on 24 Jun 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/1

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:22