| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
20 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | .idea/ | |
| 2 | 2 | build/ | |
| 3 | + dist/ | ||
| 3 | 4 | *.log | |
| 4 | 5 | __pycache__/ | |
| 5 | 6 | *.pyc | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,14 +3,15 @@ | |||
| 3 | 3 | Table of contents: | |
| 4 | 4 | * [Introduction](#introduction) | |
| 5 | 5 | * [Major sponsors](#major-sponsors) | |
| 6 | - * [Funding request - v60.0 release](#funding-request---v600-release) | ||
| 6 | + * [Funding for v60.0 release](#funding-for-v600-release) | ||
| 7 | 7 | * [Install](#install) | |
| 8 | 8 | * [Tutorial](#tutorial) | |
| 9 | 9 | * [Examples](#examples) | |
| 10 | 10 | * [Support](#support) | |
| 11 | 11 | * [Support development](#support-development) | |
| 12 | 12 | * [Thanks](#thanks) | |
| 13 | 13 | * [Releases](#releases) | |
| 14 | + * [Other READMEs](#other-readmes) | ||
| 14 | 15 | * [Quick links](#quick-links) | |
| 15 | 16 | ||
| 16 | 17 | ||
@@ -23,7 +24,7 @@ projects. The Chromium project focuses mainly on Google Chrome application | |||
| 23 | 24 | development, while CEF focuses on facilitating embedded browser use cases | |
| 24 | 25 | in third-party applications. Lots of applications use CEF control, there are | |
| 25 | 26 | more than [100 million CEF instances](http://en.wikipedia.org/wiki/Chromium_Embedded_Framework#Applications_using_CEF) | |
| 26 | - installed around the world. [Examples of embedding](examples/Examples-README.md) | ||
| 27 | + installed around the world. [Examples of embedding](examples/README-examples.md) | ||
| 27 | 28 | Chrome browser are available for many popular GUI toolkits including: | |
| 28 | 29 | wxPython, PyGTK, PyQt, PySide, Kivy, Panda3D and PyGame/PyOpenGL. | |
| 29 | 30 | ||
@@ -60,7 +61,7 @@ See the [Support development](#support-development) section for a list of | |||
| 60 | 61 | all the individuals and companies supporting CEF Python. | |
| 61 | 62 | ||
| 62 | 63 | ||
| 63 | - ## Funding request - v60.0 release | ||
| 64 | + ## Funding for v60.0 release | ||
| 64 | 65 | ||
| 65 | 66 | For those interested in sponsoring a v60.0 release please see | |
| 66 | 67 | [Issue #370](../../issues/370). | |
@@ -88,13 +89,13 @@ See the [Tutorial.md](docs/Tutorial.md) file. | |||
| 88 | 89 | ||
| 89 | 90 | ## Examples | |
| 90 | 91 | ||
| 91 | - See the [Examples-README.md](examples/Examples-README.md) file. | ||
| 92 | + See the [README-examples.md](examples/README-examples.md) file. | ||
| 92 | 93 | ||
| 93 | 94 | ||
| 94 | 95 | ## Support | |
| 95 | 96 | ||
| 96 | 97 | - Ask questions, report problems and issues on the [Forum](https://groups.google.com/group/cefpython) | |
| 97 | - - Supported examples are listed in the [Examples-README.md](examples/Examples-README.md) file | ||
| 98 | + - Supported examples are listed in the [README.md](examples/README-examples.md) file | ||
| 98 | 99 | - Documentation is in the [docs/](docs) directory: | |
| 99 | 100 | - [Build instructions](docs/Build-instructions.md) | |
| 100 | 101 | - [Contributing code](docs/Contributing-code.md) | |
@@ -193,6 +194,12 @@ Additional information for v31.2 release: | |||
| 193 | 194 | - API reference is available in revision [169a1b2](../../tree/169a1b20d3cd09879070d41aab28cfa195d2a7d5/docs/api) | |
| 194 | 195 | ||
| 195 | 196 | ||
| 197 | + ## Other READMEs | ||
| 198 | + | ||
| 199 | + - [PyInstaller packager](examples/pyinstaller/README-pyinstaller.md) | ||
| 200 | + | ||
| 201 | + | ||
| 202 | + | ||
| 196 | 203 | ## Quick links | |
| 197 | 204 | ||
| 198 | 205 | ### Docs | |
@@ -203,8 +210,8 @@ Additional information for v31.2 release: | |||
| 203 | 210 | - [Tutorial](docs/Tutorial.md) | |
| 204 | 211 | ||
| 205 | 212 | ||
| 206 | - ### API categories | ||
| 207 | - | ||
| 213 | + ### API categories | ||
| 214 | + | ||
| 208 | 215 | #### Modules | |
| 209 | 216 | ||
| 210 | 217 | * [cefpython](api/cefpython.md#cefpython) module | |
@@ -259,11 +266,12 @@ Additional information for v31.2 release: | |||
| 259 | 266 | * [StringVisitor](api/StringVisitor.md#stringvisitor-interface) interface | |
| 260 | 267 | * [WebRequestClient](api/WebRequestClient.md#webrequestclient-interface) interface | |
| 261 | 268 | ||
| 262 | - | ||
| 263 | - ### API index | ||
| 264 | - | ||
| 269 | + | ||
| 270 | + ### API index | ||
| 271 | + | ||
| 265 | 272 | * [Application settings](api/ApplicationSettings.md#application-settings) | |
| 266 | 273 | * [accept_language_list](api/ApplicationSettings.md#accept_language_list) | |
| 274 | + * [app_user_model_id](api/ApplicationSettings.md#app_user_model_id) | ||
| 267 | 275 | * [auto_zooming](api/ApplicationSettings.md#auto_zooming) | |
| 268 | 276 | * [background_color](api/ApplicationSettings.md#background_color) | |
| 269 | 277 | * [browser_subprocess_path](api/ApplicationSettings.md#browser_subprocess_path) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | 5 | * [Application settings](ApplicationSettings.md#application-settings) | |
| 6 | 6 | * [accept_language_list](ApplicationSettings.md#accept_language_list) | |
| 7 | + * [app_user_model_id](ApplicationSettings.md#app_user_model_id) | ||
| 7 | 8 | * [auto_zooming](ApplicationSettings.md#auto_zooming) | |
| 8 | 9 | * [background_color](ApplicationSettings.md#background_color) | |
| 9 | 10 | * [browser_subprocess_path](ApplicationSettings.md#browser_subprocess_path) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ Table of contents: | |||
| 8 | 8 | * [Introduction](#introduction) | |
| 9 | 9 | * [Settings](#settings) | |
| 10 | 10 | * [accept_language_list](#accept_language_list) | |
| 11 | + * [app_user_model_id](#app_user_model_id) | ||
| 11 | 12 | * [auto_zooming](#auto_zooming) | |
| 12 | 13 | * [background_color](#background_color) | |
| 13 | 14 | * [browser_subprocess_path](#browser_subprocess_path) | |
@@ -67,6 +68,19 @@ If both values are empty then "en-US,en" will be used. Can be overridden | |||
| 67 | 68 | for individual CefRequestContext instances via the | |
| 68 | 69 | CefRequestContextSettings.accept_language_list value. | |
| 69 | 70 | ||
| 71 | + | ||
| 72 | + ### app_user_model_id | ||
| 73 | + | ||
| 74 | + This is setting is applied only on Windows. | ||
| 75 | + It sets [AppUserModelID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) | ||
| 76 | + (also known as AppID) for all processes (Browser, Renderer, GPU, etc.). | ||
| 77 | + Setting this is required on Windows 10 to workaround issues related to | ||
| 78 | + pinning app to Taskbar. More details can be found in [Issue #395](https://github.com/cztomczak/cefpython/issues/395). | ||
| 79 | + | ||
| 80 | + Internally this setting will append "--app-user-model-id" switch to | ||
| 81 | + all processes. | ||
| 82 | + | ||
| 83 | + | ||
| 70 | 84 | ### auto_zooming | |
| 71 | 85 | ||
| 72 | 86 | (string) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | 1 | # Examples | |
| 2 | 2 | ||
| 3 | 3 | Examples are available in the examples/ root directory. See | |
| 4 | - the [Examples-README.md](../examples/Examples-README.md) file. | ||
| 4 | + the [README-examples.md](../examples/README-examples.md) file. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ basics. This tutorial will discuss the three featured examples: | |||
| 9 | 9 | [hello_world.py](../examples/hello_world.py), | |
| 10 | 10 | [tutorial.py](../examples/tutorial.py) | |
| 11 | 11 | and [screenshot.py](../examples/screenshot.py). There are many | |
| 12 | - more examples that you can find in the [Examples-README.md](../examples/Examples-README.md) | ||
| 12 | + more examples that you can find in the [README-examples.md](../examples/README-examples.md) | ||
| 13 | 13 | file, but these examples are out of scope for this tutorial. | |
| 14 | 14 | ||
| 15 | 15 | ||
@@ -423,7 +423,7 @@ Frame object also has the same methods. | |||
| 423 | 423 | You can also serve requests directly in CEF using for example | |
| 424 | 424 | [ResourceHandler](../api/ResourceHandler.md) object. You can find | |
| 425 | 425 | an example usage of this object in one of examples listed in | |
| 426 | - the [Examples-README.md](../examples/Examples-README.md) file. | ||
| 426 | + the [README-examples.md](../examples/README-examples.md) file. | ||
| 427 | 427 | ||
| 428 | 428 | On a side note, upstream CEF also supports custom scheme handlers, | |
| 429 | 429 | however these APIs were not yet exposed to CEF Python. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ maintained. If there are any issues in examples read top comments | |||
| 25 | 25 | in sources to see whether this is a known issue with available | |
| 26 | 26 | workarounds. | |
| 27 | 27 | ||
| 28 | + | ||
| 28 | 29 | **Featured** | |
| 29 | 30 | ||
| 30 | 31 | - [hello_world.py](hello_world.py) - Basic example, doesn't require any | |
@@ -35,6 +36,7 @@ workarounds. | |||
| 35 | 36 | discussed in great details in Tutorial in the [Off-screen rendering](../docs/Tutorial.md#off-screen-rendering) | |
| 36 | 37 | section. | |
| 37 | 38 | ||
| 39 | + | ||
| 38 | 40 | **Embedding using various GUI frameworks** | |
| 39 | 41 | ||
| 40 | 42 | - [gtk2.py](gtk2.py): example for [PyGTK](http://www.pygtk.org/) | |
@@ -49,6 +51,14 @@ workarounds. | |||
| 49 | 51 | - [wxpython.py](wxpython.py): example for [wxPython](https://wxpython.org/) | |
| 50 | 52 | toolkit | |
| 51 | 53 | ||
| 54 | + | ||
| 55 | + **Build executable using Python packagers** | ||
| 56 | + | ||
| 57 | + - [PyInstaller example](pyinstaller/README-pyinstaller.md): | ||
| 58 | + example of packaging app using [PyInstaller](http://www.pyinstaller.org/) | ||
| 59 | + packager | ||
| 60 | + | ||
| 61 | + | ||
| 52 | 62 | **Unit tests** | |
| 53 | 63 | ||
| 54 | 64 | There are also available unit tests and its usage of the API can | |
@@ -58,7 +68,7 @@ be of some use. See [main_test.py](../unittests/main_test.py). | |||
| 58 | 68 | ## More examples | |
| 59 | 69 | ||
| 60 | 70 | There are even more examples available, some of them are externally | |
| 61 | - maintained. | ||
| 71 | + maintained. | ||
| 62 | 72 | ||
| 63 | 73 | - Kivy framework: | |
| 64 | 74 | see [Kivy](https://github.com/cztomczak/cefpython/wiki/Kivy) wiki page. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,116 @@ | |||
| 1 | + # PyInstaller example | ||
| 2 | + | ||
| 3 | + Table of contents: | ||
| 4 | + * [Package app](#package-app) | ||
| 5 | + * [When it succeeds](#when-it-succeeds) | ||
| 6 | + * [Fatal error](#fatal-error) | ||
| 7 | + * [Debug app](#debug-app) | ||
| 8 | + * [More details](#more-details) | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + ## Package app | ||
| 12 | + | ||
| 13 | + This is an example of using [PyInstaller](http://www.pyinstaller.org/) | ||
| 14 | + packager to build executable from one of CEF Python's examples | ||
| 15 | + (wxpython.py). Only Windows platform is currently supported. | ||
| 16 | + | ||
| 17 | + To install required packages type: | ||
| 18 | + ``` | ||
| 19 | + pip install --upgrade pyinstaller pycrypto | ||
| 20 | + ``` | ||
| 21 | + | ||
| 22 | + To package example type: | ||
| 23 | + ``` | ||
| 24 | + python pyinstaller.py | ||
| 25 | + ``` | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + ## When it succeeds | ||
| 29 | + | ||
| 30 | + If packaging succeeds you should see "dist/cefapp/" directory open | ||
| 31 | + in explorer on Windows. In there you will find "cefapp.exe" executable | ||
| 32 | + that you can launch. | ||
| 33 | + | ||
| 34 | +  | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + ## Fatal error | ||
| 38 | + | ||
| 39 | + If there is a "Fatal Error!" message box appearing when running app | ||
| 40 | + then see the next section for how to debug app. | ||
| 41 | + | ||
| 42 | +  | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + ## Debug app | ||
| 46 | + | ||
| 47 | + In case of a fatal error to debug app pass "--debug" flag when | ||
| 48 | + packaging app: | ||
| 49 | + | ||
| 50 | + ``` | ||
| 51 | + python pyinstaller.py --debug | ||
| 52 | + ``` | ||
| 53 | + | ||
| 54 | + After packaging completes on Windows it will open a new CMD window | ||
| 55 | + and run the cefapp.exe inside it. You should see detailed logs | ||
| 56 | + in console like these: | ||
| 57 | + | ||
| 58 | + ``` | ||
| 59 | + [6708] PyInstaller Bootloader 3.x | ||
| 60 | + [6708] LOADER: executable is \examples\pyinstaller\dist\cefapp\cefapp.exe | ||
| 61 | + [6708] LOADER: homepath is \examples\pyinstaller\dist\cefapp | ||
| 62 | + [6708] LOADER: _MEIPASS2 is NULL | ||
| 63 | + [6708] LOADER: archivename is \examples\pyinstaller\dist\cefapp\cefapp.exe | ||
| 64 | + [6708] LOADER: No need to extract files to run; setting extractionpath to homepath | ||
| 65 | + [6708] LOADER: SetDllDirectory(\examples\pyinstaller\dist\cefapp) | ||
| 66 | + [6708] LOADER: Already in the child - running user's code. | ||
| 67 | + [6708] LOADER: Python library: \examples\pyinstaller\dist\cefapp\python27.dll | ||
| 68 | + [6708] LOADER: Loaded functions from Python library. | ||
| 69 | + [6708] LOADER: Manipulating environment (sys.path, sys.prefix) | ||
| 70 | + [6708] LOADER: sys.prefix is C:\github\CEFPYT~2\examples\PYINST~1\dist\cefapp | ||
| 71 | + [6708] LOADER: Setting runtime options | ||
| 72 | + [6708] LOADER: Initializing python | ||
| 73 | + [6708] LOADER: Overriding Python's sys.path | ||
| 74 | + [6708] LOADER: Post-init sys.path is \examples\pyinstaller\dist\cefapp | ||
| 75 | + [6708] LOADER: Setting sys.argv | ||
| 76 | + [6708] LOADER: setting sys._MEIPASS | ||
| 77 | + [6708] LOADER: importing modules from CArchive | ||
| 78 | + [6708] LOADER: extracted pyimod00_crypto_key | ||
| 79 | + [6708] LOADER: callfunction returned... | ||
| 80 | + [6708] LOADER: extracted struct | ||
| 81 | + [6708] LOADER: callfunction returned... | ||
| 82 | + [6708] LOADER: extracted pyimod01_os_path | ||
| 83 | + [6708] LOADER: callfunction returned... | ||
| 84 | + [6708] LOADER: extracted pyimod02_archive | ||
| 85 | + [6708] LOADER: callfunction returned... | ||
| 86 | + [6708] LOADER: extracted pyimod03_importers | ||
| 87 | + [6708] LOADER: callfunction returned... | ||
| 88 | + [6708] LOADER: Installing PYZ archive with Python modules. | ||
| 89 | + [6708] LOADER: PYZ archive: out00-PYZ.pyz | ||
| 90 | + [6708] LOADER: Running pyiboot01_bootstrap.py | ||
| 91 | + [6708] LOADER: Running wxpython.py | ||
| 92 | + Traceback (most recent call last): | ||
| 93 | + File "wxpython.py", line 11, in <module> | ||
| 94 | + File "c:\python27\lib\site-packages\PyInstaller-3.3-py2.7.egg\ | ||
| 95 | + PyInstaller\loader\pyimod03_importers.py", line 396, | ||
| 96 | + in load_module exec(bytecode, module.__dict__) | ||
| 97 | + File "site-packages\cefpython3\__init__.py", line 50, in <module> | ||
| 98 | + File "c:\python27\lib\site-packages\PyInstaller-3.3-py2.7.egg\ | ||
| 99 | + PyInstaller\loader\pyimod03_importers.py", line 687, | ||
| 100 | + in load_module module = imp.load_module(fullname, fp, filename, | ||
| 101 | + ext_tuple) | ||
| 102 | + File "cefpython_py27.pyx", line 283, in init cefpython_py27 | ||
| 103 | + (cefpython_py27.cpp:110881) | ||
| 104 | + ImportError: No module named json | ||
| 105 | + [6708] Failed to execute script wxpython | ||
| 106 | + [6708] LOADER: OK. | ||
| 107 | + [6708] LOADER: Cleaning up Python interpreter. | ||
| 108 | + ``` | ||
| 109 | + | ||
| 110 | + | ||
| 111 | + ## More details | ||
| 112 | + | ||
| 113 | + The corresponding issue in the tracker is [Issue #135](https://github.com/cztomczak/cefpython/issues/135). | ||
| 114 | + | ||
| 115 | + See also the [Build executable](https://github.com/cztomczak/cefpython/blob/master/docs/Tutorial.md#build-executable) | ||
| 116 | + section in Tutorial. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments