CEF4Delphi/demos/Lazarus_any_OS/BrowserWindowOsrDom/AppHelper/AppHelper.lpr
Salvador Díaz Fau 9e5b90303c Use the main cef.inc file in all demos
Remove unused uCEFSentinel references.
Remove duplicated licenses.
2023-11-27 18:21:07 +01:00

37 lines
1013 B
ObjectPascal

program AppHelper;
(*
* The compiled exe should be copied into
* SimpleBrowser.app/Content/Frameworks/SimpleBrowser2 Helper.app/Content/MacOS/SimpleBrowser2 Helper
* including app bundle in SimpleBrowser2.app/Content/Frameworks/SimpleBrowser2 Helper.app
*)
{$mode objfpc}{$H+}
{$IFDEF MSWINDOWS}{$I ..\..\..\..\source\cef.inc}{$ELSE}{$I ../../../../source/cef.inc}{$ENDIF}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
uHelperProcessDom,
uCEFApplication, uCEFTypes, uCEFConstants, LazFileUtils, sysutils;
begin
GlobalCEFApp := TCefApplication.Create;
InitProcessMessagesHandler;
// The main process and the subprocess *MUST* have the same GlobalCEFApp
// properties and events, specially FrameworkDirPath, ResourcesDirPath,
// LocalesDirPath, cache and UserDataPath paths.
{$IFDEF MACOSX}
GlobalCEFApp.InitLibLocationFromArgs;
{$ENDIF}
GlobalCEFApp.StartSubProcess;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
end.