CEF4Delphi/demos/Lazarus_Windows/JavaScript/JSWindowBindingSubProcess/JSSimpleWindowBinding.lpr
salvadordf a0c8eda6e0 Update to CEF 120.1.10
Added Lazarus 3.0 support
2023-12-23 18:58:40 +01:00

46 lines
1.3 KiB
ObjectPascal

program JSSimpleWindowBinding;
{$MODE Delphi}
{$I ..\..\..\..\source\cef.inc}
uses
Forms,
LCLIntf, LCLType, LMessages, Interfaces,
uCEFApplication,
uJSSimpleWindowBinding in 'uJSSimpleWindowBinding.pas' {JSSimpleWindowBindingFrm};
{.$R *.res}
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
{$SetPEFlags $20}
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.SetCurrentDir := True;
// This is the same demo than the JSSimpleWindowBinding but using a different executable for the subprocesses.
// Notice that GlobalCEFApp.OnContextCreated is now defined in the SubProcess.
// Follow these steps to test this demo :
// 1. Build the SubProcess project in this directory.
// 2. Copy the CEF binaries to the BIN directory in CEF4Delphi.
// 3. Build this project : JSSimpleWindowBinding
// 4. Run this demo : JSSimpleWindowBinding
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
{$IFDEF DELPHI11_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.CreateForm(TJSSimpleWindowBindingFrm, JSSimpleWindowBindingFrm);
Application.Run;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
end.