mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 15:55:56 +01:00
34 lines
716 B
ObjectPascal
34 lines
716 B
ObjectPascal
program consolebrowser;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
uses
|
|
{$IFDEF UNIX}
|
|
cthreads,
|
|
{$ENDIF}
|
|
// "Interfaces" is a custom unit used to initialize the LCL WidgetSet
|
|
// We keep the same name to avoid a Lazarus warning.
|
|
Interfaces, // this includes the LCL widgetset
|
|
Classes, SysUtils, uCEFApplication, uencapsulatedbrowser;
|
|
|
|
begin
|
|
try
|
|
try
|
|
CreateGlobalCEFApp;
|
|
|
|
// The LCL Widgetset must be initialized after the CEF initialization
|
|
CustomWidgetSetInitialization;
|
|
|
|
if WaitForMainAppEvent then
|
|
WriteResult;
|
|
except
|
|
on E: Exception do
|
|
Writeln(E.ClassName, ': ', E.Message);
|
|
end;
|
|
finally
|
|
CustomWidgetSetFinalization;
|
|
DestroyGlobalCEFApp;
|
|
end;
|
|
end.
|
|
|