Page 1 of 1

cef_initialize

Posted: Fri Sep 06, 2019 1:26 pm
by X11
screen http://prntscr.com/p2of8i


dpr

Code: Select all

begin
  CreateGlobalCEFApp;

  if GlobalCEFApp.StartMainProcess then
  begin
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
    Application.Title := 'Береста 5';
    Application.CreateForm(TDM, DM);
    Application.CreateForm(TfmMain, fmMain);
    Application.Run;
  end;

  DestroyGlobalCEFApp;
unit

Code: Select all

procedure CreateGlobalCEFApp;
begin
  GlobalCEFApp                            := TCefApplication.Create;
  GlobalCEFApp.OnProcessMessageReceived   := GlobalCEFApp_OnProcessMessageReceived;
  GlobalCEFApp.WindowlessRenderingEnabled := True;
  GlobalCEFApp.EnableHighDPISupport       := false;

  GlobalCEFApp.DisableFeatures            := 'NetworkService,VizDisplayCompositor';

  GlobalCEFApp.FrameworkDirPath           := 'D:\Dev\Chromium\CEF4Delphi\bin';
  GlobalCEFApp.LocalesDirPath             := 'D:\Dev\Chromium\CEF4Delphi\bin\locales';
  GlobalCEFApp.ResourcesDirPath           := 'D:\Dev\Chromium\CEF4Delphi\bin';
end;

Re: cef_initialize

Posted: Sat Sep 07, 2019 8:50 am
by salvadordf
Hi,

There are some issues with the OSR mode in the current version of the CEF libraries.
If you really need to use the OSR mode then use an older release version of CEF4Delphi.

Re: cef_initialize

Posted: Mon Sep 09, 2019 9:25 am
by X11
Why does another application launch with the same settings?

Re: cef_initialize

Posted: Mon Sep 09, 2019 9:36 am
by salvadordf
It's hard to tell without the source code of both apps but I would use any previous CEF4Delphi release to avoid OSR issues :
https://github.com/salvadordf/CEF4Delphi/releases

Re: cef_initialize

Posted: Tue Sep 10, 2019 12:10 pm
by X11
this is test project with error: https://app.box.com/s/ytcl6njjgexj5538hmklu9f2v44nujon

in Unit2 comment out 2 lines
1. uses aspr_api;
2. self.Caption := String(PAnsiChar(GetHardwareID));
then the application starts without errors

do not forget to specify the paths for CEF on your computer in uMyCEF4Delphi.pas in procedure CreateGlobalCEFApp.

Note. I user ASProtect SKE (aspack.com/asprotect32.html) for protect my application.

Re: cef_initialize

Posted: Wed Sep 11, 2019 8:17 pm
by salvadordf
I looked at the sources and they seem to be fine.

Perhaps there's a compatibility issue between CEF and aspr.dll