CEF4Delphi/demos/Lazarus_Linux_Console/ConsoleBrowser/consolebrowser.lpr
2024-03-14 20:03:16 +01:00

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.