1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-02 21:57:37 +02:00

Fixed issue #527 : Demo ExternalPumpBrowser Helper (GPU) crash on MacOs 14 Sonoma - Lazarus x86_64-darwin

This commit is contained in:
Salvador Díaz Fau 2024-09-09 13:16:03 +02:00
parent e2815ed2f4
commit a42f3dfd5f
8 changed files with 32 additions and 11 deletions

View File

@ -64,6 +64,9 @@
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options> <Options>
<Win32> <Win32>
<GraphicApplication Value="True"/> <GraphicApplication Value="True"/>
@ -71,7 +74,8 @@
</Options> </Options>
</Linking> </Linking>
<Other> <Other>
<CustomOptions Value="-dUseCthreads"/> <CustomOptions Value="-WM11.0
-dUseCthreads"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>
<Debugging> <Debugging>

View File

@ -29,8 +29,8 @@ uses
begin begin
RequireDerivedFormResource:=True; RequireDerivedFormResource:=True;
Application.Title := 'External Pump Browser'; Application.Title:='External Pump Browser';
Application.Scaled := True; Application.Scaled:=True;
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);
Application.Run; Application.Run;

View File

@ -18,7 +18,12 @@ You should have:
Libraries/* Libraries/*
Resources/* Resources/*
3) Open project "AppHelper" (from demos/Lazarus_any_OS ), create App Bundle and compile the AppHelper. 3) Open project "AppHelper" (from demos/Lazarus_any_OS ), create App Bundle and compile the AppHelper.
Run create_mac_helper.sh Run demos/Lazarus_Mac/ExternalPumpBrowser/create_mac_helper.sh
4) Open project ExternalPumpBrowser, compile and run 4) Open project ExternalPumpBrowser, compile and run
CEF4Delphi may report an invalid macOS version. In that case, use the -WMxx.y custom option to set a higher minimum macOS version for that project.
You might also need to sign the application with an "Outgoing network socket" entitlement in the helpers.
Set LSUIElement=1 in the info.plist to hide the helpers in the dock.

View File

@ -6,7 +6,7 @@ unit GlobalCefApplication;
interface interface
uses uses
uCEFApplication, uCEFWorkScheduler; uCEFApplication, uCEFWorkScheduler, uCEFConstants;
procedure CreateGlobalCEFApp; procedure CreateGlobalCEFApp;
@ -36,12 +36,11 @@ begin
(* Enable the below to prevent being asked for permission to access "Chromium Safe Storage" (* Enable the below to prevent being asked for permission to access "Chromium Safe Storage"
If set to true, Cookies will not be encrypted. If set to true, Cookies will not be encrypted.
*) *)
//GlobalCEFApp.UseMockKeyChain := True; GlobalCEFApp.UseMockKeyChain := True;
//GlobalCEFApp.EnableGPU := False;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
{
GlobalCEFApp.LogFile := 'cef.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
}
end; end;
end. end.

View File

@ -79,5 +79,8 @@
</Win32> </Win32>
</Options> </Options>
</Linking> </Linking>
<Other>
<CustomOptions Value="-WM11.0"/>
</Other>
</CompilerOptions> </CompilerOptions>
</CONFIG> </CONFIG>

View File

@ -27,6 +27,11 @@ begin
GlobalCEFApp.InitLibLocationFromArgs; GlobalCEFApp.InitLibLocationFromArgs;
{$ENDIF} {$ENDIF}
GlobalCEFApp.UseMockKeyChain := True;
//GlobalCEFApp.EnableGPU := False;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
GlobalCEFApp.StartSubProcess; GlobalCEFApp.StartSubProcess;
GlobalCEFApp.Free; GlobalCEFApp.Free;
GlobalCEFApp := nil; GlobalCEFApp := nil;

View File

@ -0,0 +1,5 @@
CEF4Delphi may report an invalid macOS version. In that case, use the -WMxx.y custom option to set a higher minimum macOS version for that project.
You might also need to sign the application with an "Outgoing network socket" entitlement in the helpers.
Set LSUIElement=1 in the info.plist to hide the helpers in the dock.

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 652, "InternalVersion" : 653,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "128.4.9" "Version" : "128.4.9"
} }