first of all I am pretty new to lazarus, but as I am using delphi on my pc I am pretty sure I can handle some stuff.
After installing CEF4Delphi and adding the binaries, I am now able to successfully run the demos.
In my application I want to add a very simple browser. I just want to show the weather forecast - I will provide the links and the only thing CEF4Delphi needs to do is to show those websites.
I copied most of the code from the SimpleBrowser Demo.
Code: Select all
program project1;
{$mode objfpc}{$H+}
{$I cef.inc}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, main, alsa_mixer
{ you can add units after this },
uCEFApplication;
{$R *.res}
begin
GlobalCEFApp := TCEFApplication.Create; // <------ crash occurs in this line
if GlobalCEFApp.StartMainProcess Then
begin
CustomWidgetSetInitialization;
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
CustomWidgetSetFinalization;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
end.
Debugging step by step I found out that
Code: Select all
FCustomCommandLines := TStringList.Create;
At this point I am stuck - any help is greatly appreciated...