CEF4Delphi/demos/Lazarus_any_OS/AppHelper/AppHelper.lpr
2021-02-21 22:57:18 +01:00

35 lines
887 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+}
{$I cef.inc}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
uCEFApplicationCore, uCEFTypes, uCEFConstants, LazFileUtils, sysutils;
begin
GlobalCEFApp := TCefApplicationCore.Create;
// 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.