Giter VIP home page Giter VIP logo

cefnet's Introduction

CefNet

CefNet is a .NET CLR binding for the Chromium Embedded Framework (CEF).

Getting Started

Since CefNet is a wrapper, you need to have the Chromium Embedded Framework somewhere on your development system (and redistribute it with your application).

(1) Download the Chromium Embedded Framework from: https://cef-builds.spotifycdn.com/index.html

Note: The major and minor version numbers of CEF and CefNet must match.

(2) Create an instance of the CefNetApplication and initialize it with your settings:

var settings = new CefSettings();
settings.NoSandbox = true;
settings.MultiThreadedMessageLoop = false; // or true
settings.WindowlessRenderingEnabled = true;
settings.LocalesDirPath = "path_to_cef/locales";
settings.ResourcesDirPath = "path_to_cef";

var app = new CefNetApplication();
app.Initialize("path_to_cef", settings);

(3) Add a WebView control to the form of your application.

(4) Run event loop, for example:

CefNetApplication.Run();

Note: You can use the event loop of the UI-framework you are using.

(5) You need to explicitly call CefNetApplication.Shutdown() from the main thread before you exit your application:

app.Shutdown();
app.Dispose();

For more information, see the sample applications.

Features

  • Cross-platform
  • Full managed code

Warning

The API of this project is not frozen and is subject to change.

Develop

  1. Install .NET Core SDK
  2. Install the DotAsm tool: dotnet tool install -g DotAsm
  3. Run git clone https://github.com/CefNet/CefNet.git
  4. Download a CEF package. See Directory.Build.props for the required CEF version.
  5. Extract all files into the cef/ directory.
  6. Copy cef/Resources/icudtl.dat into cef/Release/.

Migration to other CEF build

  1. Download a CEF package (standard or minimal).
  2. Extract all header files into the cef/include directory.
  3. Build and run CefGen.sln in debug mode to generate the generated files. Watch the output for errors.
  4. Build CefNet.sln
  5. If the build fails, make the necessary changes.

Similar projects and links

cefnet's People

Contributors

aigiol avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.