FpCEF3

This is an old revision of FpCEF3, edited by Michl at . The current revision is 106263.

/* Installation */

Deutsch (de) | English (en)

Description

Chromium is a open source project (from Google), to create a own browser for different platforms. Among other things the browser Chrome is based on this source data.

The Chromium Embedded Framework (CEF) is an open source framework for embedding a browser control based on Chromium. It can be used on Linux, Mac OS X and Windows in 32 and 64 bit versions. CEF is there in the versions CEF1 and CEF3 where CEF1 is no longer maintained.

There is a framework for Delphi (Delphi Chromium Embedded Framework - DCEF3) and two branches, which can be used for Lazarus/FreePascal (fpCEF3 and WACEF).

Installation

In addition to Lazarus package even the framework itself must be downloaded and made available to the project. It is important that the framework for the package fits. Which it is and some more helpful installation instructions can be found at Github: https://github.com/dliw/fpCEF3

At the time of the revision of this description (October 2015), CEF 3.2454.1342 is the required framework.

Download Package

fpCEF3 with Git

git://github.com/dliw/fpCEF3.git

You can also download a zipped package:

master.zip

Package Installation

After downloading of package fpCEF3, it can be installed in Lazarus:

Download Framework CEF3

You can now download the framework and made the libraries available for a particular project. You can download it from the following pages:
https://cefbuilds.com
http://www.magpcss.net/cef_downloads (or a older version from here)

You'll be sure which framework version with the current fpCEF3 can be used! See Installation

Usage

A minimal example with a simple browser is created.

Windows

The CEF libraries are needed for loading, so it makes sense to create a new project folder, to save the project and the libraries in it together.

Now build the project with Lazarus

procedure TForm1.edtURLClick(Sender: TObject);
begin
  Chromium.Load(UTF8Decode(edtURL.Text));
end;
procedure TForm1.ChromiumLoadEnd(Sender: TObject; const Browser: ICefBrowser;
  const Frame: ICefFrame; httpStatusCode: Integer);
begin
  edtURL.Text:=UTF8Encode(Browser.MainFrame.Url);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
  CefResourcesDirPath:='Resources';
  CefLocalesDirPath:='Resources\locales';
  CefInitDefault;
  edtURL.Text:='http://www.lazarus-ide.org/';
end;

Further Informations

--Michl 22:58, 1 June 2015 (CEST)