ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
333 stars 90 forks source link

Implement webkit browser using CEF3 library #249

Closed ryzom-pipeline closed 4 years ago

ryzom-pipeline commented 9 years ago

Original report by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


Chromium Embedded Framework can be found here

Cef offscreen rendering can be used to grab rendered web page and display it in ingame window.

ryzom-pipeline commented 9 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


I pushed related code to branch feature-246-cef3

CEF library

To compile, you need cef library (I used cef_binary_3.2171.1979_linux64)

You also need to compile libcef_dll yourself (easy cmake build) and copy libcef_dll_wrapper.a into 'Release' directory where you find 'libcef.so'

Sandbox binary is not required.

Compiling

CMake options -DWITH_CEF3=ON and -DCEF3_ROOT=<path-to-cef-binary-dir>

Running

Copy libcef.so, libffmpegsumo.so from cef/Release and everything from cef/Resources into directory where compiled ryzom_client is. Cef daily build also has natives_blob.bin and snapshot_blob.bin which are required.

If you dont use sanbox binary, then you can launch client with ./ryzom_client --disable-setuid-sandbox

Ingame interface is defined in webkit.xml and webkit.lua. Copy those two to user or data directory where game can find them, and add webkit.xml into XMLInterfaceFiles list (client_default.cfg)

Use the /webkit <url> command to open browser.