2020-12-13 18:36:10 +01:00
|
|
|
program ConsoleBrowser2_sp;
|
2018-06-17 14:18:11 +02:00
|
|
|
|
|
|
|
uses
|
2020-12-13 18:36:10 +01:00
|
|
|
uCEFApplicationCore;
|
2018-06-17 14:18:11 +02:00
|
|
|
|
2023-11-26 19:28:28 +01:00
|
|
|
const
|
|
|
|
IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020;
|
|
|
|
|
|
|
|
// CEF needs to set the LARGEADDRESSAWARE ($20) flag which allows 32-bit processes to use up to 3GB of RAM.
|
|
|
|
{$IFDEF WIN32}{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}{$ENDIF}
|
2018-06-17 14:18:11 +02:00
|
|
|
|
|
|
|
begin
|
2020-12-13 18:36:10 +01:00
|
|
|
GlobalCEFApp := TCefApplicationCore.Create;
|
|
|
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
|
|
|
GlobalCEFApp.ShowMessageDlg := False;
|
|
|
|
GlobalCEFApp.BlinkSettings := 'hideScrollbars';
|
2020-12-14 13:27:19 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
// In case you use a custom directory for the CEF binaries you have to set these properties
|
|
|
|
// here and in the main process
|
|
|
|
GlobalCEFApp.FrameworkDirPath := 'c:\cef';
|
|
|
|
GlobalCEFApp.ResourcesDirPath := 'c:\cef';
|
|
|
|
GlobalCEFApp.LocalesDirPath := 'c:\cef\locales';
|
|
|
|
GlobalCEFApp.SetCurrentDir := True;
|
|
|
|
}
|
|
|
|
|
2020-12-13 18:36:10 +01:00
|
|
|
GlobalCEFApp.StartSubProcess;
|
2018-06-17 14:18:11 +02:00
|
|
|
DestroyGlobalCEFApp;
|
|
|
|
end.
|
2020-12-13 18:36:10 +01:00
|
|
|
|